You can do.
include "sw.inc"
window 320,240,1
while key(27)=0
cls RGB 255,255,255
a = GetKey
select a
case vk_0
Text 0,0,"pressed " + chr(a),0
case vk_1
Text 0,0,"pressed " + chr(a),0
case vk_2
Text 0,0,"pressed " + chr(a),0
case vk_3
Text 0,0,"pressed " + chr(a),0
case vk_4
Text 0,0,"pressed " + chr(a),0
end select
Sync
wend
Quit