Hello,
IAP is more related to the application note: AN4657 "STM32 in-application programming (IAP) using the USART" and the X Cube package: X-CUBE-IAP-USART.
So in the firmware check what was implemented for that "Key" and find how it could be changed.

Edit (After downloading the package and checked the code):
This is the code of the button (Tamper pin is used here) initialization in \IAP_Main\Src\main.c:
/* Initialize Key Button mounted on STM32L476G-EVAL board */
BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);
/* Test if Key push-button on STM32L476G-EVAL Board is pressed */
if (BSP_PB_GetState(BUTTON_TAMPER) == GPIO_PIN_SET)
{
/* Initialise Flash */
FLASH_If_Init();
/* Execute the IAP driver in order to reprogram the Flash */
IAP_Init();
/* Display main menu */
Main_Menu ();
}
/* Keep the user application running */
else
{
/* Test if user code is programmed starting from address "APPLICATION_ADDRESS" */
if (((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0x2FFE0000 ) == 0x20000000)
{
/* Jump to user application */
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
JumpToApplication = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
JumpToApplication();
}
}
This confirms my saying: You don't have to keep the key pressed during the programming. Just ensure the key is pressed for a moment after Reset then release it.
You can modify the code to use any other available pin.