Index: binaries/data/mods/public/gui/session/hotkeys/misc.xml =================================================================== --- binaries/data/mods/public/gui/session/hotkeys/misc.xml +++ binaries/data/mods/public/gui/session/hotkeys/misc.xml @@ -88,12 +88,12 @@ - updateSelectionDetails(); + updateSelectionDetails(); updateSelectionDetails(); - + updateSelectionDetails(); updateBarterButtons(); Index: source/gui/CGUI.cpp =================================================================== --- source/gui/CGUI.cpp +++ source/gui/CGUI.cpp @@ -81,6 +81,10 @@ HotkeyInputHandler(ev); ret = IN_HANDLED; + // On keydown send 1 ore 2 messages depending on repeat flag, this does not work on linux + // for special keys (shift, alt, ctrl), since the linux keyboard only sends the KEYDOWN only once. + if (ev->ev.type == SDL_HOTKEYDOWN && ev->ev.key.repeat == 0) + obj->SendEvent(GUIM_PRESSED, "firstpress"); if (ev->ev.type == SDL_HOTKEYDOWN) obj->SendEvent(GUIM_PRESSED, "press"); else Index: source/ps/Hotkey.cpp =================================================================== --- source/ps/Hotkey.cpp +++ source/ps/Hotkey.cpp @@ -214,6 +214,9 @@ SDL_Event_ phantom; phantom.ev.type = ((ev->ev.type == SDL_KEYDOWN) || (ev->ev.type == SDL_MOUSEBUTTONDOWN)) ? SDL_KEYDOWN : SDL_KEYUP; + if (phantom.ev.type == SDL_KEYDOWN) + phantom.ev.key.repeat = ev->ev.key.repeat; + if ((keycode == SDLK_LSHIFT) || (keycode == SDLK_RSHIFT)) { phantom.ev.key.keysym.sym = (SDL_Keycode)UNIFIED_SHIFT; @@ -306,6 +309,7 @@ { SDL_Event_ hotkeyNotification; hotkeyNotification.ev.type = SDL_HOTKEYDOWN; + hotkeyNotification.ev.key.repeat = ev->ev.key.repeat; hotkeyNotification.ev.user.data1 = const_cast(closestMapNames[i]); in_push_priority_event(&hotkeyNotification); }