my pure basic version : pb 4.51 (x86), windows 7 64bit
a key of the keyboard is not correctly tested, this key is the key 'M' on qwerty keyboards and the "," key on french keyboards
to be sure this is a bug i'm using a loop to test the keys so all keys might be scanned.
run the code bellow the first part test the keyboard in qwerty mode, all keys works and flash the window background red
the second part use the international keyboard layout , all keys are responding and flash the window blue except the "M" (or "," key in french)
the third part use the same layout but scan the entire kevyboard using #pb_key_all and flash the screen magenta, the key is working
the fourthpart, use the international keyboard layout and enable system keys all keys including the "M" key (or "," key in french) flash the window green
it seems that the key is not polled in the second case .
Code: Select all
InitKeyboard()
main=OpenWindow(#PB_Any,0,0,640,200,"test",#PB_Window_ScreenCentered)
InitSprite()
OpenWindowedScreen(WindowID(main),0,0,640,200,0,0,0)
KeyboardMode(#PB_Keyboard_Qwerty)
Repeat
ExamineKeyboard()
ClearScreen(0)
For a=1 To 256
If KeyboardPushed(a)
ClearScreen($0000ff)
EndIf
Next
StartDrawing(ScreenOutput())
DrawText(0,0,"qwerty keyboard")
DrawText(0,16,"press the key next to N")
DrawText(0,32,"press escape to change keyboard mode")
StopDrawing()
FlipBuffers()
WaitWindowEvent(0)
Until KeyboardPushed(#PB_Key_Escape)
Repeat
ExamineKeyboard()
Until KeyboardReleased(#PB_Key_Escape)
KeyboardMode(#PB_Keyboard_International)
Repeat
ExamineKeyboard()
ClearScreen(0)
For a=1 To 256
If KeyboardPushed(a)
ClearScreen($ff0000)
EndIf
Next
StartDrawing(ScreenOutput())
DrawText(0,0,"international keyboard")
DrawText(0,16,"press the key next to N")
DrawText(0,32,"the key is not tested this is not a special key in my country layout (FR)")
DrawText(0,48,"press escape to change keyboard mode")
StopDrawing()
FlipBuffers()
WaitWindowEvent(0)
Until KeyboardPushed(#PB_Key_Escape)
Repeat
ExamineKeyboard()
Until KeyboardReleased(#PB_Key_Escape)
Repeat
ExamineKeyboard()
ClearScreen(0)
;For a=1 To 256
If KeyboardPushed(#PB_Key_All)
ClearScreen($ff00ff)
EndIf
;Next
StartDrawing(ScreenOutput())
DrawText(0,0,"international keyboard")
DrawText(0,16,"press the key next to N")
DrawText(0,32,"the key works when using #pb_all to chek the keydown")
DrawText(0,48,"press escape to change keyboard mode")
StopDrawing()
FlipBuffers()
WaitWindowEvent(0)
Until KeyboardPushed(#PB_Key_Escape)
KeyboardMode(#PB_Keyboard_International|#PB_Keyboard_AllowSystemKeys)
Repeat
ExamineKeyboard()
ClearScreen(0)
For a=1 To 256
If KeyboardPushed(a)
ClearScreen($00ff00)
EndIf
Next
StartDrawing(ScreenOutput())
DrawText(0,0,"#PB_Keyboard_International|#PB_Keyboard_AllowSystemKeys")
DrawText(0,16,"press the key next to N")
DrawText(0,32,"the key is tested but special keys are activated so may cause bugs")
DrawText(0,48,"press escape to change keyboard mode")
StopDrawing()
FlipBuffers()
WaitWindowEvent(0)
Until KeyboardPushed(#PB_Key_Escape)