Page 1 of 1

PB 6.21 RaspPi (arm64) KeyboardPushed Lag

Posted: Sun Jan 11, 2026 6:54 pm
by thyphoon
Here's some code that works on Windows and Debian 13, but on Raspberry Pi there's a lag of several seconds in key detection. And I even get a crash when pressing the spacebar... (not the actual pressing of the key, but...)
Try to quit with Esc ... and after test and press Espace ...

Code: Select all

InitSprite()
InitKeyboard()
ExamineScreenModes()
While NextScreenMode()
  Debug Str(ScreenModeWidth())+"x"+Str(ScreenModeHeight())+"x"+Str(ScreenModeDepth())+"@"+Str(ScreenModeRefreshRate())
Wend
If OpenScreen(1920, 1080, 32, "TEST", #PB_Screen_WaitSynchronization, 59)
  Repeat
    ClearScreen(0)
    ExamineKeyboard()
    If KeyboardPushed(#PB_Key_Space)
      StartDrawing(ScreenOutput())
      DrawText(20,20,"ESPACE")
      StopDrawing()
    EndIf
    FlipBuffers()
    Delay(1)
  Until KeyboardPushed(#PB_Key_Escape)
EndIf