diff options
Diffstat (limited to 'src/hu_stuff.c')
-rw-r--r-- | src/hu_stuff.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 32ca1fc3..e6699438 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -32,6 +32,7 @@ #include "deh_main.h" #include "i_swap.h" +#include "i_video.h" #include "hu_stuff.h" #include "hu_lib.h" @@ -284,6 +285,48 @@ char *mapnamest[] = // TNT WAD map names. THUSTR_32 }; +static const char shiftxform[] = +{ + + 0, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, + ' ', '!', '"', '#', '$', '%', '&', + '"', // shift-' + '(', ')', '*', '+', + '<', // shift-, + '_', // shift-- + '>', // shift-. + '?', // shift-/ + ')', // shift-0 + '!', // shift-1 + '@', // shift-2 + '#', // shift-3 + '$', // shift-4 + '%', // shift-5 + '^', // shift-6 + '&', // shift-7 + '*', // shift-8 + '(', // shift-9 + ':', + ':', // shift-; + '<', + '+', // shift-= + '>', '?', '@', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + '[', // shift-[ + '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK + ']', // shift-] + '"', '_', + '\'', // shift-` + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + '{', '|', '}', '~', 127 +}; + void HU_Init(void) { @@ -616,6 +659,14 @@ boolean HU_Responder(event_t *ev) } else { + if (vanilla_keyboard_mapping) + { + if (shiftdown || (c >= 'a' && c <= 'z')) + { + c = shiftxform[c]; + } + } + eatkey = HUlib_keyInIText(&w_chat, c); if (eatkey) { |