Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I cannot make CTRL+H do anything else than "Open history" under Google Chrome. I tried the Chrome plugin allowing to redefine keyboard shortcuts but I can only add "actions" or whatever that means to a keyboard shortcut and apparently it's done using some gigantic JavaScript hack.

Here's the plugin:

https://chrome.google.com/webstore/detail/mgjjeipcdnnjhgodgjpfkffcejoljijf

In any case I cannot make CTRL+H work as the backspace key under Chrome (i.e. delete the key at the left of the cursor). I'd particularly like that to work in the address bar / search bar (which is the same "bar" under Chrome) and in text edit form as well.

So how can I make CTRL+H work as the backspace key under Google Chrome? (Debian GNU/Linux Wheezy here).

Note that if the answer is to use the plugin for Chrome allowing to change shortcuts, then I'd need the exact method, step-by-step, as to how to do it because I already tried it and couldn't make it work

share|improve this question
1  
I take it using Backspace is not an option? :) –  terdon Aug 18 '12 at 17:44
    
@terdon: I use "CTRL+H" to delete the char to the left of the cursor since decades at the shell prompt, in my text editors, in my IDEs, etc. The actual "backspace" key is quite far and hard to reach compared to CTRL+H (left pinky on ctrl which is where 'caps lock' is on most keyboards) and 'h' is home row for the right hand. That actual backspace key is quite far to reach for me and I never ever use anything else but CTRL+H to 'backspace' anyway. My keyboard is a happy hacking pro 2 keyboard btw (a $300 keyboard using Topre switches). –  Cedric Martin Aug 18 '12 at 19:27
    
Hmm, have you tried mapping it for all X apps? maybe using xbindkeys? –  terdon Aug 18 '12 at 21:23
    
@terdon: I could try something like that but the problem is that I'm not sure it's that easy to bind two keys so that they act as if it was just one key :-/ I hoped changing a shortcut under Chrome wouldn't be that hard :-/ –  Cedric Martin Aug 18 '12 at 22:30

1 Answer 1

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 :)

share|improve this answer
    
thanks a lot for that answer, even if the question was/is old : ) I'll try that. +1 and welcome : ) –  Cedric Martin Jan 3 at 3:14
    
This is an excellent submission for your very first post here. Kudos! –  Roney Michael Jan 3 at 3:33
    
Thanks guys! :) –  NigoroJr Jan 3 at 4:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.