-
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
Delete block shortcut: update to be more intuitive and farther from "undo" #68139
Comments
Sounds good to me! I immediately thought of the Shift + Delete combination before I even finished reading your description. Can we drop Command/Control? The shortcut would then work similarly to Shift + Enter in Figma that immediately zooms out and selects the parent of the currently edited object. |
The simpler the better, the main reason I avoided "Shift+Delete" is because on Windows in older iterations, Shift + Delete would map to "Cut". It's my impression this is very rarely used today, so it might be okay, but that was the motivation for the larger set, at least. |
I believe the |
@t-hamano is a Windows shortcuts wizard (🧙); let's see what he thinks about the proposal. Personally, the current shortcut never made sense to me; even using the Delete or D key as the last part of the combo would be preferable. Let's ensure we're not overriding any obvious OS or browser shortcut with a new combo. |
On Windows, the shortcut is
Unfortunately, in my environment, this shortcut still works as "cut": 5d5d469a36d154bb804d6e7179d47758.mp4It would be better if we could check shortcut conflicts not only on Windows OS and Mac, but also on Linux OS. By the way, I looked into the history of this shortcut and found that initially |
Maybe then, as per the suggestion provided by @Mamaduka, we can try out |
shift+d is needed to type capital D. Below are all the possible shortcuts in Windows:
Personally, I find the del key more intuitive than the d key given its role. Also, it would be nice to be able to use the same key combinations across both operating systems. In that sense, ctrl+shift+del seems the most natural choice to me, but this shortcut is for deleting browsing data. Since there are probably no users who frequently delete browsing data, I think it would be fine to overwrite this shortcut, but what do you think? |
This sounds good to me. I will be updating the PR to incorporate the changes discussed here. Thanks for the suggestions 🚀. |
I think there's actually a lot of confusion in this issue. Most Macs don't have a delete key (unless you're using an external keyboard that has one), they have a backspace key that's labelled 'delete' but isn't delete. I think what's being proposed is actually Cmd + Shift + Backspace on a Mac. The Windows shortcut would then be Ctrl + Shift + Backspace, which when I test it does nothing, but I haven't tested all browsers, only Brave. I'm not sure what Windows laptops do, haven't had one for a number of years, but similar might apply, it's really backspace that we're discussing. 😄 |
I'm wondering if Ctrl + Backspace on a mac, Alt + Backspace on windows might be an even simpler combo. |
I think I agree with @talldan here.
Edit: Also, for people using 60% keyboards, we don't have |
Coming back to this, thanks for excellent discussion:
Reading up on the notes I had for this, I think I actually meant to suggest in the initial issue that both backspace and delete functions should work, just with added modifiers before both of them. I don't know where that aspect of my notes disappeared, but that's also secondary since there are a lot of good suggestions here, all of which seem to improve things. We could go with the above quoted suggestion, though I also like Aki's suggestion here:
I personally think it's a non-issue to override the "delete browsing data" shortcut, this is already overridden on many tabs, e.g. Google Docs when you have focus in the canvas. (In fact most editors I tried, override this shortcut when focus is in the canvas.) Macs have a control key too, though commonly command is the counterpart for Windows vs. Mac (e.g. on Windows, it's Ctrl C for copy, on Mac it's ⌘C). So what would feel the most intuitive? But @yogeshbhutkar (and thank you for contributing with the PR) has a good point about using the Fn key on macbooks vs. extended keyboards, this is a solid argument for the Backspace key. Ctrl + backspace and alt backspace is a very clean and simple set of shortcuts, seems almost too simple. But it does diverge a bit between the two platforms, could it be the same? For that reason, I'm a bit drawn to the idea of:
I'd love a stretch goal of having those two be the default shortcuts, but also having ⌘ + Shift + Delete and Ctrl + Shift + Delete work in addition to those. But if we had to choose only one, for the reasons suggested, Backspace may be the better one. |
I've updated the PR to incorporate both the |
Nice. Took the latest for a spin, it's working well for me, but I'd encourage others to chime in. |
I updated this table to include a combination using the backspace key. On Windows OS, ctrl+backspace and alt+backspace are used as OS shortcuts. So, I think shift+backspace OR ctrl+shift+backspace is good for both OS. For now, I personally don't want to increase the number of block deletion shortcut options too much. Therefore, I prefer to add only one of the shortcuts. |
Another thing I noticed is that in Linux OS, the ctrl+alt+backspace key seems to be used to kill all programs and go back to the login screen (Source). So, when a user wants to press ctrl+shift+backspace to delete a block, they may accidentally press ctrl+alt+backspace. So shift+backspace might be better. |
When you select an image, you can press Delete or Backspace to delete it. This is intuitive enough.
When you select a paragraph, those keys delete characters, as you would in any text editor. But if you want to delete the entire paragraph, the current default shortcut is ControlOptionZ on Mac, or ControlAltZ on Windows.
This shortcut is both far from the backspace/delete keys that usually are related to removing, it's also very close to the undo command, CommandZ. It may be confusing to have a destructive action share the same keycode as undo.
Beyond allowing users to customize keyboard shortcuts, which would be highly valuable regardless (#3218), is there a keyboard shortcut that is more intuitive (closer to Backspace and Delete keys), farther from undo, and doet not conflict with other assigned shortcuts?
Can that shortcut be:
Conceptually the two modifier keys help indicate: this is a forceful action, and the dual nature of backspace and delete both working for this action would match the behavior for non-text blocks.
Related: #51356
The text was updated successfully, but these errors were encountered: