I used the example below as test, and I am working in PopOs 22.04 LTS
Code: Select all
If OpenConsole()
PrintN("Press Escape to exit")
Repeat
KeyPressed$ = Inkey()
If KeyPressed$ <> ""
PrintN("You pressed: " + KeyPressed$)
PrintN("It has a raw code of: "+Str(RawKey()))
ElseIf RawKey()
PrintN("You pressed a non ASCII key.")
PrintN("It has a raw code of: "+Str(RawKey()))
Else
Delay(20) ; Don't eat all the CPU time, we're on a multitask OS
EndIf
Until KeyPressed$ = Chr(27) ; Wait until escape is pressed
EndIf
