OS: macOS Ventura; Linux Ubuntu 18.04 / 20.04 / 22.04; Mint Linux LMDE 5
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
CallDebugger
The error is older (PB v5.73) and unfortunately no one has tested it.