Page 1 of 1

Keyboard commands not using DirectX

Posted: Wed Feb 01, 2006 1:44 pm
by SFSxOI
Don't know if its been asked/wished for yet, but is it possible to add some keyboard commands in future versions of PB that do not need directX? As it is now with 3.94 if I want to say for example check for a key pressed I can't simply check if the key is pressed cause i have to examine keyboard, initsprite, open a window or screen, etc....before i can simply see if a key is pressed. This of course kinda forces me to use API's and other libraries etc....which I dont mind, just thought that it should be available in PB also. Not everything uses directX.

Posted: Wed Feb 01, 2006 1:55 pm
by Dr. Dri
i also wish a pb event for the keyboard

Code: Select all

If OpenWindow(0,0,0,140,70,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Keyboard")
  CreateGadgetList(WindowID(0))
  
  Repeat
    Event = WaitWindowEvent()
    
    If Event = #WM_CHAR
      
      Debug Chr( EventwParam() )
      
    EndIf
  Until Event = #PB_Event_CloseWindow
EndIf
Dri