Skip to content

Commit

Permalink
Shift+Letters are not working in xterm if it is started as
Browse files Browse the repository at this point in the history
xterm -fa 'Monospace' -fs 12 -xrm '*modifyOtherKeys:2' -xrm '*formatOtherKeys:1'
this commit fixes that
  • Loading branch information
unxed committed Jan 21, 2025
1 parent 9fb2133 commit 4e5c8de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WinPort/src/Backend/TTY/TTYInputSequenceParserExts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ size_t TTYInputSequenceParser::TryParseAsKittyEscapeSequence(const char *s, size
}

int base_char = params[0][2] ? params[0][2] : params[0][0];

// fix for xterm in ModifyOtherKeys=2 formatOtherKeys=1 mode
if (base_char <= UCHAR_MAX && isalpha(base_char)) {
base_char = tolower(base_char);
}

if (base_char <= UCHAR_MAX && isalpha(base_char)) {
ir.Event.KeyEvent.wVirtualKeyCode = (base_char - 'a') + 0x41;
}
Expand Down

0 comments on commit 4e5c8de

Please sign in to comment.