-
Notifications
You must be signed in to change notification settings - Fork 217
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
Cmd + Backspace
doesn't delete entire line
#754
Comments
@doplumi
This shortcut is in the "General" section so it should theoretically work everywhere. But in the current Kinto config the terminals block is below the "General" keymap, and terminals need their own wordwise shortcuts. So if this is about it not working in a terminal app you may need to move the whole "terminals" keymap up so that it comes before the "General" keymap, and insert these lines in the terminals (termStr) keymap to override some of the wordwise shortcuts in the "General" keymap. This issue should be fixed in a future release of Kinto. define_keymap(re.compile(termStr, re.IGNORECASE),{
### wordwise overrides of general GUI block
K("Alt-Backspace"): K("Alt-Shift-Backspace"), # Wordwise delete word left of cursor in terminals
K("Alt-Delete"): [K("Esc"),K("d")], # Wordwise delete word right of cursor in terminals
K("RC-Backspace"): K("C-u"), # Wordwise delete line left of cursor in terminals
K("RC-Delete"): K("C-k"), # Wordwise delete line right of cursor in terminals |
I'm on the latest PopOS and having this issue (only in vs code).
|
Having the issue in VSCode in general, or in the embedded terminal pane inside VSCode? It's often difficult to get embedded terminals to work correctly because all the keymapper sees is the class/name of the main window in those situations. So the wordwise mappings for "GUI" apps will be active in VSCode, and if you're trying to use the wordwise shortcuts in the embedded terminal they won't be correct. As far as I know there is no solution to this other than using a separate (external) terminal, if possible. |
That would make sense, but it was just in the text editor. I don't use the embedded terminals in vs code. |
That is odd. OK, looks like there is a line in "General" that remaps RC+Backspace to Ctrl+Shift+Backspace for most non-terminal applications, and this is interfering with VSCode, which seems to like Ctrl+Backspace for this "delete line left of cursor" shortcut.
There are some general wordwise shortcuts in the "Codes" specific override keymap, but nothing to fix this particular shortcut. If you find your "Codes" keymap and insert this line (and restart Kinto), it will override the remap above from the "General" block. Unless... if your version of
Yeah, looks like the default The VSCode(s) block starts with this line:
Tested the fix in VSCode, VSCodium and "Code - OSS". Working for me now. Let me know if you have trouble making this work. |
I was having this issue in the Firefox URL bar, not sure if it applies to other browsers, but I was able to workaround it with K("RC-Backspace"): K("C-u"), # Delete Entire Line Left of Cursor
# edit: actually C-k seems like it doesn't work how I thought it did...
K("RC-Delete"): K("C-k"), # Delete Entire Line Left of Cursor Unfortunately, this breaks shortcuts in textareas, since Edit: Aha! This combo seems to work in both the URL bar and the textarea editors, although it feels slightly hacky to select, then delete text: K("RC-Backspace"): [K("Shift-Home"), K("Backspace")], # Delete Entire Line Left of Cursor
K("RC-Delete"): [K("Shift-End"), K("Delete")], # Delete Entire Line Right of Cursor |
Nice solution.
If it works, it works. Would need to be tested in multiple browsers before trying to use it as a general solution. |
After some testing, your solution for Firefox wordwise delete to end-of-line or beginning-of-line shortcuts seems like a good candidate for inclusion in the default Kinto config. The Chrome browsers don't seem to have any issue with the existing shortcuts working both in text areas on a page and in the URL bar. I have a system that is notorious for being weirdly slow to perform macros, but I don't even see it highlighting the text before deletion, unless it's quite a lot of text in the URL bar. Works really well. I think I'll put together a PR to have it added to the Kinto config. Edit: #780 |
@RedBearAK Thanks for the info, I still can't get that to work. I tried your suggestions and restarted but the issue is still there. |
@ian-h-chamberlain I added your lines to the general gui section and the vscode section, and it seems to work well in both. Thanks! |
Describe the bug
Cmd + Backspace
doesn't delete entire line.Expected behavior
Cmd + Backspace
should delete entire line, as per 588fe1a.Distro: Latest PopOS
DE: Gnome
Branch: master
Commit: latest (e106710)
The text was updated successfully, but these errors were encountered: