essayez la touche "," a coté de la touche N
le programme est decoupé en 4 parties on passe d'une partie a l'autre en appuyant sur 'escape'.
la premiere teste les touches du clavier a l'aide d'une boucle avec le mode 'qwerty' par defaut dans pb la touche "," fonctionne lorsqu'on appuie dessus la fenetre flash rouge
la seconde teste les touches du clavier a l'aide d'une boucle avec le mode #PB_Keyboard_International donc avec les touches du clavier français pour moi , cette touche ne réponds pas
toute les autres font flasher la fenêtre en bleu sauf celle ci
la troisième teste les touches du clavier avec #pb_key_all au lieu d'une boucle la touche fonctionne et fait bien flasher l’écran en magenta ...
la dernière partie utilise une boucle pour tester toute les touches du clavier mais permet les touches systemes (KeyboardMode(#PB_Keyboard_International|#PB_Keyboard_AllowSystemKeys)) la touche ',' fonctionne.
quelqu'un confirme ? j'ai posté un rapport de bug sur le forum anglais .
Code : Tout sélectionner
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)