Danilo wrote:What happens when you add "ClearScreen($000000) : FlipBuffers()" inside your loop?
Maybe fullscreen event handling is done in FlipBuffers(), as the event handling is the only big difference
I see between the two codes, and you usually call FlipBuffers() in fullscreen loops.
Interesting thinking there
Danilo, and I see that
Idle has confirmed your speculation.
idle wrote:The keyboard works if you use flipbuffers()
ububtu 12.04 x64
Yes indeed all that I needed to do was add the mystery GRAPHICS command FlipBuffers() to seemingly get the keyboard to work!!! (Are you serious???)
Code: Select all
; ****** FULL SCREEN INTERFACE
InitSprite() : InitKeyboard()
OpenScreen(800,600,32,"SOFTWARE")
; WAIT FOR USER TO PRESS A KEY BEFORE CONTINUING
Repeat
FlipBuffers()
Delay(20) : ExamineKeyboard()
Until KeyboardPushed(#PB_Key_All)
ClearScreen($00FF00) : FlipBuffers() : Delay(2000) : End
OK......... thanks.
Now before closing this crazy thread. let's take a look at the next part of this situation...
Code: Select all
InitSprite() : InitKeyboard()
OpenWindow(0,0,0,640,480,"SOFTWARE",#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
OpenWindowedScreen(WindowID(0),0,0,640,480,#True,0,0)
ESCAPE= 0 : UPDATE= 0
Repeat
Delay(20)
Repeat
X= WindowEvent() : If X = #PB_Event_CloseWindow : End : EndIf
Until X = 0
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Escape) : ESCAPE+ 1
ElseIf KeyboardPushed(#PB_Key_Capital)
KEY$= "CAPITAL"
ElseIf KeyboardPushed(#PB_Key_LeftShift)
KEY$= "LEFT SHIFT"
ElseIf KeyboardPushed(#PB_Key_LeftControl)
KEY$= "LEFT CONTROL"
ElseIf KeyboardPushed(#PB_Key_Tab)
KEY$= "TAB"
ElseIf KeyboardPushed(#PB_Key_All)
KEY$= "something else"
Else
KEY$= "no keypress"
EndIf
UPDATE+ 1 : If Not(UPDATE % 50) : Debug KEY$ : EndIf
Until ESCAPE : End
This snippet works as I expect in Windows both 32 and 64 bits.
It almost works in UBUNTU but it fails for me in 32 bits the same way that it fails on my 64 bit system.
Even though I see the caps lock indicator light toggling, as far as the program can tell
it is as if the caps lock or tab keys can never, ever be pressed.
Is it just a bad UBUNTU keyboard configuration on my systems?