You can fix this behavior by overriding the Ctrl+Backspace shortcut using AutoHotkey. Save the following code in a plain text file with the given filename and extension, then launch the script with AutoHotkey:
FixCtrlBackspace.ahk
; how to write scripts: http://www.autohotkey.com/docs/
#IfWinActive ahk_class CabinetWClass ; File Explorer
^Backspace::
#IfWinActive ahk_class Notepad
^Backspace::
Send ^+{Left}{Backspace}
#IfWinActive
; source and context: http://superuser.com/a/636973/124606
; relevant documentation links:
; writing hotkeys
; http://www.autohotkey.com/docs/Hotkeys.htm
; list of key codes (including Backspace)
; http://www.autohotkey.com/docs/KeyList.htm
; the #IfWinActive directive
; http://www.autohotkey.com/docs/commands/_IfWinActive.htm
; the Send command
; http://www.autohotkey.com/docs/commands/Send.htm
You may find it easier to download this script file from GitHub, rather than creating the file and pasting in its contents yourself.
To launch this script automatically on startup, add a shortcut to it to the Startup folder in your Start menu, as described in How to Make a Program Run at Startup on Any Computer.
The basic idea of the script is this:
^Backspace:: Send ^+{Left}{Backspace}
This changes the Ctrl+Backspace shortcut in all programs so that it is equivalent to pressing Ctrl+Shift+←, to select the previous word, and then Backspace, to delete it.
This select-and-delete workaround, while better than typing a box, is brittle. It’s safer to not enable this shortcut in programs in which Ctrl+Backspace already works. That’s why I use #IfWinActive
to limit the hotkey to only programs that I know don't support that shortcut.
I know this is an old question, but I came across this while trying to do the same thing as you so I'm gonna post this anyways.
I'm using Chromium and I used Ubuntu 12.04 (now I'm using Gentoo), but it shouldn't matter.
Executing:
$ gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
will change the key bindings to the Emacs binding. If you're fine with that, then this is all. However, if you want to use Ctrl-a
as "select all", there's a bit more work to do.
Take a look at /usr/share/themes/Default/gtk-2.0-key/gtkrc
and /usr/share/themes/Emacs/gtk-2.0-key/gtkrc
. The syntax should not be too difficult to understand. Copy all the key bindings you want to use to the /usr/share/themes/Default/gtk-2.0-key/gtkrc
. Don't forget to add the
class "GtkEntry" binding "foo"
class "GtkTextView" binding "foo"
class "GtkTextView" binding "bar"
part, which can be found at the very end of the file.
GNOME
The settings should be reflected by switching to the Emacs theme and switching back to the Default theme.
$ gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
$ gsettings set org.gnome.desktop.interface gtk-key-theme "Default"
Non-GNOME
Create and add the following to ~/.gtkrc-2.0
gtk-key-theme-name = "Default"
Restart Chromium and the settings should be reflected.
The best thing about this is that even if you set Ctrl-w
to delete one word, you're still able to close tab when you're not inputting.
P.S. I also use the happy hacking keyboard and I'm happy to find someone who uses it too :)
Ubuntu 18.04 (GTK3)
Edit: 11/01/2018
After nearly 5 years, I'm updating this post for Ubuntu 18.04. I'm currently using Firefox, but the following should be independent of what browser you use.
On GTK3, the ~/.gtkrc-2.0
method no longer works. Instead, edit the ~/.config/gtk-3.0/settings.ini
and add the following line to the end:
gtk-key-theme-name=Emacs
If you want to modify the bindings, the Emacs
binding can be found in /usr/share/themes/Emacs/gtk-3.0/gtk-keys.css
, which can be copied over to ~/.config/gtk-3.0/gtk.css
and modified.
Some references:
Best Answer
The issue has probably been fixed for some time. If you can't use it then it's because some extension has stolen it. You can browse
chrome://extensions/shortcuts
to check which one and disable or reassign the key if you want