The first
doesn't work if you Double Click on the map and quckly (very quickly) hit ENTER. You'll see "ENTER pressed" hint but ENTER will work like it wasn't disabled. Why?Code:(findDisplay 46) displayAddEventHandler ["keyDown", "if (((_this select 1) == 28) && visibleMap) then {hint 'ENTER pressed'; true}"];
(_this select 0) tells me that event has been recieved from display #46, not #54 (map marker) for some reasons. If I press ENTER key after double clicking on the map, I shouldn't see any messages, because no EH attached to display #54 but I can see.
For example
works fine. It disables the "/" key on the Map Screen.Code:(findDisplay 46) displayAddEventHandler ["keyDown", "if (((_this select 1) == 53) && visibleMap) then {hint 'SLASH pressed'; true}"];
The second strange thing, keyDown event is fired earlier than mouseButtonDblClick event. Simple code below demonstrates that behaviour:
If you VERY quickly hit Double LBM and then ENTER you'll getCode:(findDisplay 46) displayAddEventHandler ["keyDown", "player sideChat 'Key pressed!'"]; ((findDisplay 12) displayCtrl 51) ctrlSetEventHandler ["mouseButtonDown", "player sideChat 'Double Click on the map!'"];
Why?Key pressed!
Double Click on the map!
It should be
I need to completly disable ENTER key on the Map Screen and I need script-based solution, with no addons (for some reasons I cant use addons in my situation).Double Click on the map!
Key pressed!
HOME
Reply With Quote

