To trigger keypress, short together pins A1 and A2.
You'll also need to connect VIN, GND, USB D+ to PA12/D2, and USB D- to PA11/D10.
VIN
GND
D+
PA12
D2
D-
PA11
D10