If Not(InitKeyboard())
End 99
EndIf
If ExamineKeyboard()
If KeyboardReleased(#PB_Key_Pause) Or KeyboardReleased(#PB_Key_Scroll)
Break
EndIf
EndIf
there is no explanation in help.
strange thing it works compiled on my system but it gives error on run.
ps: in help file there is no result for examinekeyboard so there is no need for if in this program?
examinekeyboard needs open(window)screen ?
examinekeyboard needs open(window)screen ?
Registered user of PB (on Linux Mint 21.1 & Win 10 64bit)
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: examinekeyboard needs open(window)screen ?
The keyboard library docs do say it depends on DirectX but they should really go on to say a screen needs to be open as well, that seems to be a deficiency in the help file.
BERESHEIT
Re: examinekeyboard needs open(window)screen ?
Isn't reported by the debugger ?
"OpenScreen() or OpenWindowedScreen() must be called before using any Keyboard commands."
Anyway a mention in the manual wouldn't hurt.
"OpenScreen() or OpenWindowedScreen() must be called before using any Keyboard commands."
Anyway a mention in the manual wouldn't hurt.
"Have you tried turning it off and on again ?"
Re: examinekeyboard needs open(window)screen ?
yes, it is. but works on my system, crashing on other without openscreen (it depends on initsprite etc...)
i will investigate how to check for key input without dx.
i will investigate how to check for key input without dx.
Registered user of PB (on Linux Mint 21.1 & Win 10 64bit)

