Jump to content
Sign in to follow this  
Horner

The Key Down Event Handlers is the death of me.

Recommended Posts

Yep, here's the keydown event handler copy/pasted DIRECTLY from the wiki.

onKeyPress = compile preprocessFile "keyPressed.sqf";
waituntil {!(IsNull (findDisplay 46))};
(findDisplay 46) displaySetEventHandler ["KeyDown", "_this call onKeyPress"];

And here is the keyPressed.sqf

private "_handled";

_key = _this select 0;
_shift = _this select 1;
_handled = false;

switch _key do
{
case 19 :
{
	[]execVM "bc_scripts\AdvancedPit.sqf";
	_handled = true;
};
};

When using this event handler when I go in game I cannot walk around, go to third person or even escape. It essentially disables all my keys. I don't know what I'm doing wrong but any help would be appreciated.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×