EXTI
STM32's external interrupt and event controller — the block that turns an edge on a GPIO pin into something the CPU responds to.
The NVIC handles interrupts but knows nothing about pins. EXTI sits in between: each line can be set to trigger on a rising edge, a falling edge or both, masked as an interrupt or as an event, and carries a pending flag that software must clear. Event mode sends no vector at all; it simply wakes a core sleeping in WFE, which is the cheapest way there is to wait for a button press.
The catch is the numbering. Line 0 belongs to pin 0, but which port's pin 0 is chosen by a multiplexer in SYSCFG (AFIO on the F1). PA0 and PB0 therefore can't both interrupt, a fact usually discovered after the boards have been ordered. On the F1 and F4, lines 5–9 and 10–15 also share one vector each, so the handler has to read the flags to find out which pin moved.