1. Is it possible to handle the "Enter" key press somehow? Seems like it's being captured by the engine and used to start/stop typing a chat message, but it doesn't get passed to widgets (or at least some widget could be capturing it before mine).
2. It seems the numpad "Enter" key is never being passed, but it doesn't work for chat message typing either.
[SOLVED] Handling enter key - overriding default chat enter
Moderator: Moderators
Re: Handling enter key press - overriding default chat enter
Nevermind, I was doing something wrong, not sure what that was.
PS: for future reference, it seems the numpad enter is 271 (KP_ENTER), while the normal enter is 13 (ENTER).
PS: for future reference, it seems the numpad enter is 271 (KP_ENTER), while the normal enter is 13 (ENTER).
Re: Handling enter key press - overriding default chat enter
please stop comparing symkeys, instead compare the string name of it.
It was a lot work to fix those symkeys in the SDL2 switch, cause they changed and aren't said to be stable at all ...
It was a lot work to fix those symkeys in the SDL2 switch, cause they changed and aren't said to be stable at all ...
Re: Handling enter key press - overriding default chat enter
Sure, but how?jK wrote:please stop comparing symkeys, instead compare the string name of it.
In Chili's editobox.lua 'Spring.GetKeyCode("backspace")' is mentioned (I guess you wrote that), but spring 96.0 tells me that function doesn't exist.
Re: [SOLVED] Handling enter key - overriding default chat en
http://springrts.com/wiki/Lua_UnsyncedR ... ot-.29Keys
it's not new
and you can also use Spring.GetKeySymbol
it's not new
and you can also use Spring.GetKeySymbol
Re: [SOLVED] Handling enter key - overriding default chat en
OK, seems to actually work, thanks.