Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special ability disabled when chat typing is open? #23

Open
peace2000 opened this issue Feb 16, 2020 · 2 comments
Open

Special ability disabled when chat typing is open? #23

peace2000 opened this issue Feb 16, 2020 · 2 comments

Comments

@peace2000
Copy link

Hi! Can you enable the use of special ability when the chat typing window is open?

I don't see any point why special abilities should be disabled when your typing window is open. If someone attacks me when typing, I will have to send it as unfinished or remove it completely (takes time), before I can use my special abilities again.

@congratulatio
Copy link
Member

This could be done, but I think it would have to be a configurable option, as both the Ctrl and Shift keys are used when typing certain characters. For example Ctrl + Alt + e will type the é character in some input locales.

Another alternative in the meantime is to remap your key bindings (by pressing K in the game) so you have a special key that's not captured by the chatbox.

The keys this applies to are: Tab, Up, Down, Left, Right, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Escape and Enter.

Escape and Enter are reserved for chat box interaction, and I expect you'll want to keep Up, Down, Left and Right for movement, but you have Tab (normally mapped to showing the scoreboard) and the function keys available to map to one of your special keys, should you wish to experiment with this.

@congratulatio
Copy link
Member

Also just to make a note of the code responsible for this:

var shouldInterpretAsControlKey = function(keyCode, t) {
return !!UI.chatBoxOpen() && (9 != keyCode && 27 != keyCode && 13 != keyCode && 38 != keyCode && 40 != keyCode && 37 != keyCode && 39 != keyCode && 112 != keyCode && 113 != keyCode && 114 != keyCode && 115 != keyCode && 116 != keyCode && 117 != keyCode && 118 != keyCode && 119 != keyCode && 120 != keyCode && 121 != keyCode && 122 != keyCode && 123 != keyCode)
};

This checks the keycodes for all the keys listed in my previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants