File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,7 +245,12 @@ void AppendPart(string str)
245245 // another special key, such as 'Ctrl+?' and 'Ctrl+;'.
246246 isDeadKey = ( c == '\0 ' ) && ( consoleKey >= ConsoleKey . Oem1 && consoleKey <= ConsoleKey . Oem102 ) && ! isCtrl ;
247247
248- if ( ! isDeadKey )
248+ // For standard Ctrl+letter combinations (KeyChar \x01-\x1A), the mapping
249+ // to letters a-z is well-defined and layout-independent, so we skip the
250+ // ToUnicodeEx call which would return a layout-dependent character
251+ // (e.g. Cyrillic 'с' instead of Latin 'c' on Russian layout), breaking
252+ // key binding matching.
253+ if ( ! isDeadKey && ! ( c >= 1 && c <= 26 ) )
249254 {
250255 // A dead key could pass the above heuristic check, such as 'Shift+6' in US-INTL keyboard, which represents the
251256 // diacritic '^' and generates 'D6' ConsoleKey, '\0' key char and 'Shift' modifier.
You can’t perform that action at this time.
0 commit comments