-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Description
Describe the bug
On macOS, when the system input method is switched to Pinyin – Simplified, the shortcut ⌘++ is incorrectly recognized as ⌘+-. Tracing the code shows that the physical equals (=) key is mapped to Avalonia’s minus (-) key? But actually, on the keyboard layout, the "+" and "=" symbols share the same physical key.
To Reproduce
this.KeyBindings.Add(new KeyBinding { Gesture = new KeyGesture(Key.OemPlus, KeyModifiers.Meta), Command = mainWindowViewModel.DoSomeThingCommand, CommandParameter = "OemPlus" });
this.KeyBindings.Add(new KeyBinding { Gesture = new KeyGesture(Key.Add, KeyModifiers.Meta), Command = mainWindowViewModel.DoSomeThingCommand ,CommandParameter = "Add" });
this.KeyBindings.Add(new KeyBinding { Gesture = new KeyGesture(Key.OemMinus, KeyModifiers.Meta), Command = mainWindowViewModel.DoSomeThingCommand, CommandParameter = "OemMinus" });- Add and switch to the Pinyin – Simplified input method in macOS.
- Run minimal reproduction code.
- Press ⌘++.
- Observe that the app responds to ⌘+- instead.
Expected behavior
⌘++ should be correctly recognized as ⌘++.
Avalonia version
11.3.8, 12.0.999-cibuild0059812-alpha
OS
macOS
Additional context
This issue does not occur when using the ABC Keyboard input method.
