das attorney 858 Posted September 24, 2017 I use tab for open inventory button, but it's always bothered me that you can't use the same button to close it; instead you have to use Esc or the X button in the corner of the inventory. Here is some code so you can have a button that opens the inventory, and the same button closes it. Put it in initPlayerLocal.sqf or similar. Enjoy player addEventHandler ["InventoryOpened",{ _this spawn { waitUntil { not isNull (findDisplay 602) }; INVCLOSED = (findDisplay 602) displayAddEventHandler ["keydown", { if ((_this select 1) in (actionKeys "gear")) then { (findDisplay 602) displayRemoveEventHandler ["keydown",INVCLOSED]; closeDialog 0 } }] } }] 4 Share this post Link to post Share on other sites
EO 11277 Posted September 24, 2017 DayZ style.....I like it! 2 Share this post Link to post Share on other sites
das attorney 858 Posted September 24, 2017 24 minutes ago, Evil Organ said: DayZ style Indeed! I was playing a lot over the weekend because it doesn't completely suck anymore and enjoying the toggle inv. Then I went back to Arma today and was like "ugh". 1 Share this post Link to post Share on other sites
Harzach 2517 Posted September 24, 2017 Alphanumeric and non-"navigation" keys work fine. Tab, page-up/down, arrow keys exhibit the behavior you describe.. Share this post Link to post Share on other sites
Larrow 2821 Posted September 24, 2017 4 hours ago, das attorney said: Here is some code so you can have a button that opens the inventory, and the same button closes it. It's specifically because you are using TAB and the inventory has a tab order, any special keys PgUP arrows etc will move focus around the inventories UI elements. Most other buttons if there is no conflict will both open and close the inventory. 1 Share this post Link to post Share on other sites
das attorney 858 Posted September 24, 2017 1 hour ago, Larrow said: It's specifically because you are using TAB and the inventory has a tab order, any special keys PgUP arrows etc will move focus around the inventories UI elements. Most other buttons if there is no conflict will both open and close the inventory. Yes, I realised that so I wrote this script for me any any other people using tab Share this post Link to post Share on other sites
Larrow 2821 Posted September 24, 2017 5 minutes ago, das attorney said: Yes, I realised that so I wrote this script for me any any other people using tab Cool no worries, just was not sure from your description it was clear that you realised this. Share this post Link to post Share on other sites
das attorney 858 Posted September 24, 2017 Ah ok - I put it in the first sentence of the preamble. Let me see if I can modify the topic description.. edit: That was pretty painless - done :) Share this post Link to post Share on other sites
Larrow 2821 Posted September 24, 2017 Toggle Inventory - for reserved keys Quote Here is some code so you can have a reserved button ( reserved for UI navigation TAB, PgUP/DOWN, Home etc, Arrow keys ) that opens the inventory, and will also close it. I know being pedantic but I've nothing better to do on a Sunday night , actually fuck it, I'll behave and go play some Tetris with my EfT inventory instead. 2 Share this post Link to post Share on other sites