mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

Improved delete hotkeys

Open manstie opened this issue 2 years ago • 2 comments

I am an avid user of ctrl + backspace to delete whole words when typing, and I noticed there was ctrl + arrows for navigation already implemented, and none for deleting.

I ended up with including deletion functions for the existing keyboard navigation modifiers of alt and ctrl.

The reason for moving removeRow to shift+[Delete] is because this hotkey deletes a whole line in vscode (which seems like similar functionality), and it is close/similar to the removeColumn hotkey.

This seems to maintain expectations for keyboard functionality on Windows and Ubuntu (Australian keyboard), please let me know if this messes with other keyboard layouts / operating systems (I have no idea how you manage to maintain functionality for all of them, kudos to you).

manstie avatar Nov 26 '23 11:11 manstie

All keyboards have a Backspace key, but not all keyboards have a Delete key.

Add:

  • shift+[Delete] for deleteBackward
  • shift+[Backspace] for deleteForward
  • alt+shift+[Backspace] for deleteToGroupStart
  • ctrl+shift+[Backspace] for deleteToGroupEnd
  • shift+alt+[Backspace] for removeRow

I think that would be consistent with existing shortcuts, and should work for all platforms and keyboard layouts.

arnog avatar Nov 28 '23 00:11 arnog

shift+[Backspace] for deleteForward conflicts with the existing removeColumn, and same with adding alt+shift+[Backspace] for deleteToGroupStart and shift+alt+[Backspace] for removeRow, which ends up making neither of the hotkeys work 😭

manstie avatar Dec 01 '23 07:12 manstie