7CavArma

Hacky Custom Keybind

May 2nd, 2022 (edited)
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.47 KB | None | 0 0
  1. private _displayEH_ID = (findDisplay 46) displayAddEventHandler ["KeyDown",
  2.     {
  3.         params ["_control", "_key", "_isShift", "_isControl", "_isAlt"];
  4.  
  5.         private _override = false;
  6.  
  7.         diag_log _key;
  8.  
  9.         if (_key == 57 && _isShift && _isControl) then { // Space + Shift + Control
  10.  
  11.             _override = true;
  12.  
  13.             //You action here (will be local, will need remote exec for server)
  14.  
  15.             _control displayRemoveEventHandler ["keyDown", _thisEventHandler];
  16.  
  17.         };
  18.  
  19.         _override;
  20.     }
  21. ];
  22.  
Add Comment
Please, Sign In to add comment