Closed Swarnendu0123 closed 4 months ago
I'm not opposed but let's think this through.
The current behavior:
Delete
removes the next character in front of the cursor (vs. Backspace, which removes the character behind the cursor.Delete
does not do anything.Tab
bing to the dropdown menu for that file and selecting the "Delete" item.Tab
to that file name and hit Enter
-- this opens the file and moves the focus to the text of the file in the editor. Which is good, but once the focus is in the editor I cannot figure out how to get the focus out of the editor using the keyboard alone. I have to click in the sidebar and then use the previous steps.also we can update the shortcut instruction.
I wouldn't put it there because those are global shortcuts, but this is only if the file is selected.
@Swarnendu0123 @lindapaiste any update on this or should i start working on this?
Well @praveen-rikhari,
When the focus is in the editor, pressing Delete removes the next character in front of the cursor (vs. Backspace, which removes the character behind the cursor. When the focus is on the filename in the sidebar, pressing Delete does not do anything. If I click somewhere in the sidebar, I can delete the currently-opened file through keyboard controls by Tabbing to the dropdown menu for that file and selecting the "Delete" item
We have already figured out this part.
If I want to delete a file which is not currently open that's lot bit trickier. I Tab to that file name and hit Enter -- this opens the file and moves the focus to the text of the file in the editor. Which is good, but once the focus is in the editor I cannot figure out how to get the focus out of the editor using the keyboard alone. I have to click in the sidebar and then use the previous steps.
But, in this part I feel we need a clear approach. Can you please share, how you are going to implement that, maybe we could come up with a better solution. Though, I have one approach for this: https://youtu.be/3ucnmBSp1xQ?si=whXQURv2e4uva46J
@Swarnendu0123 Yes, I have come up with an idea which looks like this :
keydown
event.Yes @praveen-rikhari! I have also came up with a similar solution, and already created the PR.
Awesome @Swarnendu0123 thanks i will take a look at the code
Thanks for raising this! I'm a bit hesitant about adding too many keyboard shortcuts to the list, and feel that this might not be needed for now. However, I'm down to implement this in the future if this gets more traction or gets further attention down the line!
Increasing Access
If we select the file and click on
delete
button on keyboard, at this point of time the file is not getting deleted.Feature enhancement details
We can add a shortcut, select that file and press the
delete
key on keyboard, and editor will ask for the confirmation viaalert()
and on confirmation we can delete the file.also we can update the shortcut instruction.