Fix capslock being wonky.

This commit is contained in:
Latapostrophe 2018-08-19 11:25:20 +02:00
parent b09019dc4a
commit 40b4d63620
2 changed files with 15 additions and 6 deletions

View file

@ -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

View file

@ -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)
{