Ubuntu – How to bind Ctrl+arrows to Home and End keys? xmodmap does not work

key-bindingkeyboardshortcut-keysxmodmapxserver

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

Best Answer

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