Getting key presses without a window?

Blitz3D Forums/Blitz3D Beginners Area/Getting key presses without a window?

neos300(Posted 2009) [#1]
I am developing a new program, that is designed to run in the background and only appear when the user presses Ctrl+Q.

How would i do that?


Beaker(Posted 2009) [#2]
One way is to use AutoHotKey. Or you could probably do it with some system keyboard hooks, or use something like this:
http://www.blitzmax.com/codearcs/codearcs.php?code=2328

Blitz3d isn't really designed not to have a window. BlitzPlus or BlitzMax would do a better job of it.


Warner(Posted 2009) [#3]
You could use API_GetASyncKeyState.
If you search for it in Google, there should be some examples on how to use it.
A quick search gave me this archive entry:
http://www.blitzbasic.com/codearcs/codearcs.php?code=1319