BlacKnightBK 47 Posted December 12, 2017 Hello guys, I would like to know how to create new keybinds without using mods. E.g when player presses shift+h his weapon gets holstered. Sorry if the answer is already available somewhere I am busy with so many other stuff I was not bothered googling it with it not being a high priority issue for me. Cheers Share this post Link to post Share on other sites
Lucullus 71 Posted December 12, 2017 initPlayerLocal: waitUntil {!isNull (findDisplay 46)}; (findDisplay 46) displayAddEventHandler [ "KeyDown", { params ["_disp","_code","_shift","_strg","_alt"]; private _return = false; if (_code isEqualTo 35 && _shift) then { player action ["SwitchWeapon", player, player, 100]; _return = true; }; _return } ]; untested Share this post Link to post Share on other sites
BlacKnightBK 47 Posted December 14, 2017 Thank you @Lucullus, even if it doesn't work you have given me the beginning of the rope :) Cheers man Share this post Link to post Share on other sites
Lucullus 71 Posted December 14, 2017 to get the _code place -> hint str (_this); <- before params... Share this post Link to post Share on other sites
gc8 977 Posted December 14, 2017 There is CBA_fnc_addKeybind command, maybe it's what you are looking for. Use the function viewer in editor to read how to use it. there's also more keybinding commands found in the functions viewer under "Keybinding" Share this post Link to post Share on other sites