j'ai un biip sur A,Q,S,E,D mais pas sur le Z !!!
il y a peut etre d'autres touches concernées !!!
Code : Tout sélectionner
EcranX = GetSystemMetrics_(#SM_CXSCREEN):;=largeur de l'ecran
EcranY = GetSystemMetrics_(#SM_CYSCREEN):;=hauteur de l'ecran
WindowID = OpenWindow(1, 0, 0,800, 600, "hello", #PB_Window_SystemMenu|#PB_Window_BorderLess |#PB_Window_ScreenCentered )
InitSprite()
InitKeyboard()
InitMouse()
WindowID = WindowID(1)
result = OpenWindowedScreen(WindowID,0,0, 800,600, 1, 0,0)
Repeat
Event=WindowEvent()
ExamineKeyboard()
ExamineMouse()
If MouseButton(#PB_MouseButton_Right)
; le clic bouto droit fera quitter !
End
EndIf
If MouseButton(#PB_MouseButton_Right)
; le clic bouto droit fera quitter !
End
EndIf
If KeyboardPushed(#PB_Key_Right)
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_Left)
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_Up)
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_Down)
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_A )
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_Q )
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_Z )
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_S )
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_E )
beep_(440,10)
EndIf
If KeyboardPushed(#PB_Key_D )
beep_(440,10)
EndIf
FlipBuffers():; affiche l'ecran
ClearScreen(RGB(0, 0, 0)) :;efface l'ecran
Until Event=#PB_Event_CloseWindow Or KeyboardPushed( #PB_Key_Escape) ; press touche droit
ps : la touche KeyboardPushed(#PB_Key_M ) non plus