A3 won't work. The code says A1 and A2 and it works. prints out an "a"
To trigger keypress, short together pins A1 and A2.