gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Keyboard shortcut to rename a Block

Open Bovelett opened this issue 2 years ago • 7 comments

What problem does this address?

I'm super happy that we can rename a Block! It's essential for maintaining clarity in larger structures. But it's quite a long road to get there, especially if you depend on keyboard navigation. Besides that, for people with cognitive issues, it's also difficult because the right-click menu is quite tall with many options. And with the same reasoning, it's also not easy to get there in the Block settings.

From the context Menu, you need to hit your keyboard 14 times:

https://github.com/WordPress/gutenberg/assets/852140/5d89a846-56e6-4aeb-abfb-8fa8b56d4fa1

Through the Block Settings, you need to hit your keyboard 18 times:

https://github.com/WordPress/gutenberg/assets/852140/96f26fe5-0822-4faf-b358-7412d96bf309

What is your proposed solution?

Can we please have a keyboard shortcut for renaming?

Bovelett avatar May 30 '24 17:05 Bovelett

Thanks for the suggestion.

In Windows OS, the shortcut key to rename a file or folder is F2, whereas on Mac OS, there doesn't seem to be any such keyboard shortcut. What keyboard shortcut would be appropriate for Mac OS?

BTW I remember that there was once an attempt to rename by double-clicking in the list view, but it seems to have been closed due to accessibility issues: #53852

t-hamano avatar Jul 06 '24 02:07 t-hamano

@t-hamano On Mac OS you select a folder and then hit Enter.

Bovelett avatar Jul 26 '24 14:07 Bovelett

@Bovelett Thanks for the replay.

So does that mean there is no shortcut for renaming on Mac OS? If so, I think it might make sense to add a command for renaming to the command palette.

rename

t-hamano avatar Jul 26 '24 16:07 t-hamano

@t-hamano That's correct.

Bovelett avatar Jul 26 '24 18:07 Bovelett

Please add a shortcut to rename.

gambuzino-wonder avatar Nov 23 '24 18:11 gambuzino-wonder

Please add this! In Figma, shortcut is Command+R (which in a browser is reload, so it wouldn't work -- maybe alt+R?)

It doesn't matter if it's not standard, but it's needed.

guidofd avatar Jul 10 '25 10:07 guidofd

@guidofd Thank you for helping on this! Would you be able to link your WordPress and Github accounts to ensure your work is properly credited in WordPress releases?

aaronjorbin avatar May 19 '26 19:05 aaronjorbin