-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some CKEditor keyboard shortcuts conflict with Mac OS shortcuts #5705
Comments
From what I have checked these two Mac OS shortcuts can be replaced: |
Hm... I copied this behaviour from CKEditor 4. It also treats Ctrl and Cmd as the same key and I don't think that there were complains about this. But we could, most likely, fix it. Although, I'd be most worried about the safety of this change – how well we can recognize that we're on macOS. |
We have TBH we're the only editor that acts this way so this actually could be an issue for some people. |
Fix (utils): The keystrokes are no longer conflicting on macOS. Closes #5705. Feature (utils): Added forced modifier key (`Ctrl!`) for keystrokes that should not be mapped to <kbd>Command</kbd> on macOS. Other (engine): The `KeyObserver` should provide information about `metaKey` being pressed. Other (list): The to-do list item toggle keystroke changed to <kbd>Ctrl</kbd>+<kbd>Enter</kbd> (<kbd>Cmd</kbd>+<kbd>Enter</kbd> on Mac). Internal (typing): Any keypress while the <kbd>Cmd</kbd> key is pressed is not a typing keystroke. BREAKING CHANGE: On macOS keystrokes with the <kbd>Ctrl</kbd> modifier will not be handled unless the modifier is registered as the forced one (for example: `Ctrl!+A` will not be translated to `Cmd+A` on macOS). BREAKING CHANGE (list): The to-do list item toggle keystroke changed to <kbd>Ctrl</kbd>+<kbd>Enter</kbd> (<kbd>Cmd</kbd>+<kbd>Enter</kbd> on Mac).
📝 Provide detailed reproduction steps (if any)
CKEditor uses key shortcuts which conflict with Mac OS shortcuts. For example for Bold and for Link both shortcuts work:
CMD+B
andCtrl+B
for Bold,CMD+K
andCtrl+K
for Link. The problem is that on MacControl-K
means "Delete the text between the insertion point and the end of the line or paragraph" andControl-B
means "Move one character backward" - https://support.apple.com/en-us/HT201236.The reason is because when meta (Cmd) key is pressed, it is treated as
Ctrl
key by the editor.✔️ Expected result
When
Ctrl+K
orCtrl+B
is pressed, Mac OS commands should be executed.CKEditor commands should only be executed when
Cmd+K
orCmd+B
is pressed.❌ Actual result
When
Ctrl+K
,Cmd+K
orCtrl+B
,Cmd+B
is pressed, CKEditor commands are executed.Mac OS commands are not executed at all.
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: