mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add inp_translated_keys (fixyes #4241)
This commit is contained in:
parent
a2bf13e782
commit
4894b51c94
|
@ -404,12 +404,12 @@ int CInput::Update()
|
|||
// Sum if you want to ignore multiple modifiers.
|
||||
if(!(Event.key.keysym.mod & g_Config.m_InpIgnoredModifiers))
|
||||
{
|
||||
Scancode = Event.key.keysym.scancode;
|
||||
Scancode = g_Config.m_InpTranslatedKeys ? SDL_GetScancodeFromKey(Event.key.keysym.sym) : Event.key.keysym.scancode;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYUP:
|
||||
Action = IInput::FLAG_RELEASE;
|
||||
Scancode = Event.key.keysym.scancode;
|
||||
Scancode = g_Config.m_InpTranslatedKeys ? SDL_GetScancodeFromKey(Event.key.keysym.sym) : Event.key.keysym.scancode;
|
||||
break;
|
||||
|
||||
// handle mouse buttons
|
||||
|
|
|
@ -126,6 +126,7 @@ MACRO_CONFIG_INT(GfxQuadAsTriangle, gfx_quad_as_triangle, 0, 0, 1, CFGFLAG_SAVE
|
|||
|
||||
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 200, 1, 100000, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Mouse sensitivity")
|
||||
MACRO_CONFIG_INT(InpMouseOld, inp_mouseold, 0, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Use old mouse mode (warp mouse instead of raw input)")
|
||||
MACRO_CONFIG_INT(InpTranslatedKeys, inp_translated_keys, 0, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Translate keys before interpreting them, respects keyboard layouts")
|
||||
MACRO_CONFIG_INT(InpIgnoredModifiers, inp_ignored_modifiers, 0, 0, 65536, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Ignored keyboard modifier mask")
|
||||
|
||||
MACRO_CONFIG_STR(SvName, sv_name, 128, "unnamed server", CFGFLAG_SERVER, "Server name")
|
||||
|
|
Loading…
Reference in a new issue