WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.56k stars 4.22k forks source link

Tracking: Some keyboard shortcuts don't work on Windows #43352

Open t-hamano opened 2 years ago

t-hamano commented 2 years ago

Description

I have discovered that some keyboard shortcuts do not work in Windows. Also, some of them work and some do not, depending on the editor.

In this issue, I would like to make sure that all shortcuts work correctly in all editor instances in Windows. This could include issues that depend on personal environments, so I would like to ask other Windows users to test this. 🙏

Items to be fixed

Step-by-step reproduction instructions

I have tested all the shortcuts shown in the keyboard shortcut modal and the basic copy-paste shortcuts in all editor instances. The results are as follows:

Description Shortcut Post Editor Site Editor Widget Editor Customizer Widget
Display these keyboard shortcuts. Shift+Alt+H

Global shortcuts

Description Shortcut Post Editor Site Editor Widget Editor Customizer Widget
Switch between visual editor and code editor. Ctrl+Shift+Alt+M - -
Toggle fullscreen mode. Ctrl+Shift+Alt+F - - -
Open the block list view. Shift+Alt+O - -
Show or hide the block settings sidebar. Ctrl+Shift+, 🚀 Fixed by #43428 🚀 Fixed by #43428 🚀 Fixed by #43428 -
Navigate to the next part of the editor. Ctrl+` -
Navigate to the next part of the editor. Shift+Alt+N -
Navigate to the previous part of the editor. Ctrl+Shift+` -
Navigate to the previous part of the editor. Shift+Alt+P -
Navigate to the previous part of the editor. Shift+Alt+~ -
Navigate to the nearest toolbar. Alt+F10
Save your changes. Ctrl+S
Undo your last changes. Ctrl+Z ⚠️ † ⚠️ ††
Redo your last undo. Ctrl+Shift+Z ⚠️ † ⚠️ ††
Redo your last undo. Ctrl+Y 🚀 Fixed by #43392 🚀 Fixed by #43392 🚀 Fixed by #43392

Selection shortcuts

Description Shortcut Post Editor Site Editor Widget Editor Customizer Widget
Select all text when typing. Press again to select all blocks. Ctrl+A
Clear selection. escape

Block shortcuts

Description Shortcut Post Editor Site Editor Widget Editor Customizer Widget
Duplicate the selected block(s). Ctrl+Shift+D
Remove the selected block(s). Shift+Alt+Z
Insert a new block before the selected block(s). Ctrl+Alt+T
Insert a new block after the selected block(s). Ctrl+Alt+Y
Delete selection. del
Delete selection. backspace
Move the selected block(s) up. Ctrl+Shift+Alt+T
Move the selected block(s) down. Ctrl+Shift+Alt+Y
Change the block type after adding a new paragraph. /

Text formatting

Description Shortcut Post Editor Site Editor Widget Editor Customizer Widget
Make the selected text bold. Ctrl+B
Make the selected text italic. Ctrl+I
Convert the selected text into a link. Ctrl+K
Remove a link. Ctrl+Shift+K
Insert a link to a post or page [[
Underline the selected text. Ctrl+U
Strikethrough the selected text. Shift+Alt+D
Make the selected text inline code. Shift+Alt+X

Additional Shortcut

Description Shortcut Post Editor Site Editor Widget Editor Customizer Widget
Cut the selected block(s). Ctrl+X 🚀 Fixed by #45752
Copy the selected block(s). Ctrl+C 🚀 Fixed by #45752
Paste the block(s) stored in the clipboard. Ctrl+V

Screenshots, screen recording, code snippet

No response

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

SamSirry commented 9 months ago

Windows has inherited the functionality of Ctrl+Insert (copy), Shift+Insert (paste), and Shift+Delete (cut) from the days of DOS. And while copying and pasting this way works on Firefox on Windows 10, the "cut" operation seems to simply delete the text without placing it in the clipboard (even though Ctrl+X works). I hope this issue should be addressed as well.