-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Mac keyboard shortcuts work unexpectedly across blocks #9880
Comments
Note that the same issue can be seen when moving between table cells. Movement with the For example, it's possible to use |
Still valid. |
Yes, I think incorporating these mac shortcuts into #51356 would be helpful. I'll be AFK the rest of this week, but can get to it when I get back if no one else does first. |
I added Ctrl + P and Ctrl + N to the shortcuts tracking. How far deep do we want to go with the mac shortcuts? I'll start chipping away at testing them unless I hear otherwise. Here's a list of them that have to do with movement of the caret: ⌥ Delete: Delete the word to the left of the insertion point. A lot of them work already. The main issue, as @ranh already mentioned, is that each block behaves as a full document instead of each block being considered part of the same document. Btw, I enjoyed this description of Control + K 😅
|
Mac OS has a subset of keyboard shortcuts for manipulating text that use the Control key and are borrowed from Emacs. For example,
Control+N
to move the cursor down one line;Control+D
to delete the character to the right of the cursor; etc. Complete list of Mac OS keyboard shortcuts.These shortcuts work fine inside of blocks, but not between blocks. They seem to behave as though a single block is the whole document.
To Reproduce
Steps to reproduce the behavior with Control+P (up) and Control+N (down):
Control+P
to move the cursor up to the first line of the block.Control+P
will move the cursor to the beginning of the line, and won't move it any further.Up Arrow
will move the cursor to the previous block, as expected.Control+N
: press to move the cursor to the last line of the block.Control+N
will move the cursor to the end of the line, and won't move it any further.Down Arrow
will move the cursor to the next block, as expected.Expected behavior
Control+P
should work the same asUp Arrow
in the beginning of a block: move to the previous block.Control+N
should work the same asDown Arrow
in the end of a block.Control+F
should work the same asRight Arrow
(orLeft Arrow
in an RTL document) in the end of a block: move to the next block.Control+B
should work the same asLeft Arrow
in the beginning of a block.Control+H
should work the same as theDelete
key in the beginning of a block: merge it with the previous block.Control+D
should work the same asFunction+Delete
in the end of a blockControl+K
should work as it does before Gutenberg: delete from the cursor position to the end of the paragraph, and keep deleting the following paragraphs (so it's like it's eating your document from the inside.) It only deletes to the end of the current block.There is also
Control+O
, to insert a new line after the cursor without moving the cursor, effectively the same asReturn
and thenLeft Arrow
. In Gutenberg it adds a line break, so it's actuallyShift+Return
and thenLeft Arrow
. The expected behaviour might be to split the block (same asReturn
would).Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: