Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On Windows, I used to bind Ctrl+Left to Home and Ctrl + Right to End via ahk.

Now I'm struggling to achieve this behavior in Ubuntu. I've tried editing /etc/inputrc:

"\e[1;5C": end-of-line
"\e[1;5D": beginning-of-line

It works but only in the terminal window. I've also tried xmodmap:

xmodmap -e "keycode 113=Left NoSymbol Home"

but it does not work.
The strange thing here is that if I bind to Shift + Left in xmodmap it works:

xmodmap -e "keycode 113=Left Home"

My guess here is that the default behavior of Ctrl + Left(skip words) somehow gets priority over xmodmap bindings.

Where can I find where the default bindings are located and how to remove it? Or, maybe I could just bind needed behavior there ?

I'm on Ubuntu 12.04

share|improve this question
    
Do you get xev output for the keys you want to change? –  Seth Feb 6 '13 at 2:09
    
I do. I got keycode 113 = Left from xev output. –  acid009 Feb 6 '13 at 3:03
    
Can you add the whole xev output please? –  Seth Feb 6 '13 at 3:13
    
state 0x0, keycode 113 (keysym 0xff51, Left) –  acid009 Feb 6 '13 at 3:39
    
and state 0x4, keycode 113 (keysym 0xff51, Left) if pressed with Ctrl - the state is changed to 0x4 as expected –  acid009 Feb 6 '13 at 3:40

1 Answer 1

AutoKey can do bindings like this, but it requires running a service in the background (like ahk, but unlike xmodmap).

Configure a "phrase" where the text is <home>, the paste method is Keyboard, and the hotkey is <ctrl>-<left>:

AutoKey GUI

share|improve this answer
    
Nice. This might also be a good fit as an answer here as well askubuntu.com/questions/254424/… –  Kevin Bowen Jun 4 '13 at 14:34
1  
An expanded, more generic version: askubuntu.com/a/304834/194 Does that make this question a duplicate? –  cscarney Jun 6 '13 at 14:11
    
It probably does, but you should still get the bounty. ;-) –  Kevin Bowen Jun 6 '13 at 17:47
    
this method does not work. –  acid009 Feb 16 at 4:59
1  
@JeffDror it's <page_up> and <page_down> ( code.google.com/p/autokey/wiki/SpecialKeys ) –  cscarney Jun 26 at 21:44

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.