Refine Windows keystroke display logic in KCEventTransformer

Updated the condition for displaying Windows equivalent keystrokes to require Command, Control, or Option modifiers, while excluding Shift. This change aligns with user feedback to avoid duplicating simple letter inputs.
This commit is contained in:
Nick Borovets 2026-02-19 20:25:31 +03:00
parent d6e27550d2
commit cce31c22cf

View file

@ -335,13 +335,7 @@ static NSString* kLeftTabString = @"\xe2\x87\xa4";
BOOL isOption = (modifiers & NSEventModifierFlagOption) != 0;
BOOL isShift = (modifiers & NSEventModifierFlagShift) != 0;
// Only show Windows equivalent if there are modifiers (Command, Control, or Option)
// We treat Shift-only as a "simple letter" case usually, unless it's a special key?
// User said: "don't duplicate simple letters like 'a | a'".
// Shift+A -> "A". Windows: "Shift+A"? Or just "A"?
// Usually Windows shortcuts are Ctrl+C.
// Let's require Command, Control, or Option for now.
if (!isCommand && !isControl && !isOption) {
if (!isCommand && !isControl && !isOption && !isShift) {
return nil;
}