From 40b4d63620a4f78994922bb323b01ae4dd631556 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Sun, 19 Aug 2018 11:25:20 +0200 Subject: [PATCH] Fix capslock being wonky. --- src/console.c | 7 ++++++- src/hu_stuff.c | 14 +++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/console.c b/src/console.c index 505ab831..c9e3c357 100644 --- a/src/console.c +++ b/src/console.c @@ -1048,7 +1048,12 @@ boolean CON_Responder(event_t *ev) return true; } - if (capslock ^ shiftdown) // gets capslock to work because capslock is cool + if (key >= 'a' && key <= 'z') + { + if (capslock ^ shiftdown) + key = shiftxform[key]; + } + else if (shiftdown) key = shiftxform[key]; // enter a char into the command prompt diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 4142e8d8..d191874b 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1057,12 +1057,16 @@ boolean HU_Responder(event_t *ev) return true; } - // use console translations - if (shiftdown ^ capslock) + // use console translations + + if (c >= 'a' && c <= 'z') + { + if (capslock ^ shiftdown) + c = shiftxform[c]; + } + else if (shiftdown) c = shiftxform[c]; - - // TODO: make chat behave like the console, so that we can go back and edit stuff when we fuck up. - + // pasting. pasting is cool. chat is a bit limited, though :( if ((c == 'v' || c == 'V') && ctrldown) {