That should be easy to implement just before your wait for VDP end of frame. Something like this:
clr r1 ; keyboard column 0
li r12,>24 ; CRU address of the decoder
ldcr r1,>3 ; select the column
li r12,>6 ; address of the first row
stcr r1,>8 ; read 8 rows
andi r1,>1100 ; test both "fctn" and "=" (=QUIT)
jne label ; not pressed
blwp @>0000 ; reset