I cannot verify if it does the same because I am not sitting at my A1 right now, but this is basically the program of Alfkil:
#include <proto/dos.h>
#include <proto/lowlevel.h>
int main (void)
{
ULONG key;
do {
Delay (10);
key = GetKey();
Printf ("0x%08lx\n",key);
}
while (key != 0x45);
return (0);
}