RosettaCodeData/Task/Keyboard-input-Keypress-check/FutureBasic/keyboard-input-keypress-check.basic

25 lines
497 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
_window = 1
void local fn BuildWindow
subclass window _window, @"Keyboard input/Keypress check"
text,24
print %(180,190)@"Press any key"
end fn
void local fn DoDialog( ev as long, tag as long )
select ( ev )
case _windowKeyDown
select ( tag )
case _window
cls : printf %(180,190)@"\"%@\" key pressed",fn EventCharacters
DialogEventSetBool( YES )// we handled
end select
end select
end fn
fn BuildWindow
on dialog fn DoDialog
HandleEvents