diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 4993285f..c572d81b 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -101,6 +101,8 @@ void HU_BindHUDVariables(void); byte* HU_ColorByHealth(int health, int maxhealth, boolean invul); +extern const char shiftxform[]; + extern int speedometer; #endif diff --git a/src/mn_menu.c b/src/mn_menu.c index aaca680d..208534bf 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -32,6 +32,7 @@ #include "d_event.h" #include "d_main.h" #include "doomdef.h" +#include "doomkeys.h" #include "doomstat.h" #include "doomtype.h" #include "dstrings.h" @@ -2536,6 +2537,7 @@ boolean M_Responder(event_t *ev) { int ch; static int joywait = 0; + static boolean shiftdown = false; static menu_action_t repeat = MENU_NULL; menu_action_t action = MENU_NULL; @@ -2544,6 +2546,12 @@ boolean M_Responder(event_t *ev) ch = 0; // will be changed to a legit char if we're going to use it here + if (ev->data1 == KEY_RSHIFT) + { + shiftdown = (ev->type == ev_keydown); + return false; + } + switch (ev->type) { // "close" button pressed on window? @@ -2702,7 +2710,8 @@ boolean M_Responder(event_t *ev) } else { - ch = M_ToUpper(ch); + if (shiftdown || (ch >= 'a' && ch <= 'z')) + ch = shiftxform[ch]; if (ch >= 32 && ch <= 127 && saveCharIndex < SAVESTRINGSIZE - 1 && MN_StringWidth(savegamestrings[saveSlot])