Console RawKey not work on Linux and macOS

Post bugreports for the Linux version here
User avatar
mk-soft
Always Here
Always Here
Posts: 5313
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Console RawKey not work on Linux and macOS

Post by mk-soft »

RawKey get always result code 27 ...

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
P.S.
The error is older (PB v5.73) and unfortunately no one has tested it.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive