Skip to content

Commit

Permalink
clear dead key state after analysis for KeyFunctions,
Browse files Browse the repository at this point in the history
spoiling special key assignment for Ctrl+Shift+^ since 2.9.1
  • Loading branch information
mintty committed Jul 30, 2020
1 parent f92e984 commit 64dc6e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wininput.c
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,14 @@ static LONG last_key_time = 0;
#ifdef debug_def_keys
printf("key %04X <%s>\n", *wbuf, tag);
#endif

if (wlen < 0) {
// Ugly hack to clear dead key state, a la Michael Kaplan.
memset(kbd0, 0, sizeof kbd0);
uint scancode = MapVirtualKey(VK_DECIMAL, 0);
wchar dummy;
while (ToUnicode(VK_DECIMAL, scancode, kbd0, &dummy, 1, 0) < 0);
}
}
if (tag) {
int ret = pick_key_function(cfg.key_commands, tag, 0, key, mods, scancode);
Expand Down
1 change: 1 addition & 0 deletions wiki/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Vector graphics

Keyboard handling
* Cancel compose key on mouse actions, to prevent surprising character composition.
* Fixed special key assignment (Ctrl+Shift+^) spoiled by KeyFunctions (since 2.9.1).

Window handling
* Prevent mouse wheel double interpretation, also fixing speed issues (mintty/wsltty#238).
Expand Down

0 comments on commit 64dc6e9

Please sign in to comment.