Keyboard commands not using DirectX

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Keyboard commands not using DirectX

Post 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.
Last edited by SFSxOI on Wed Feb 01, 2006 2:04 pm, edited 1 time in total.
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post 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
Post Reply