^[ this must be replaced with: \e in the .inputrc file. So if you run ./key and say press Ctrl+Left_Arrow you will get this: $ ./key raw ^[OC Anyway now we know Ctrl+Left_Arrow is ^[OC so in your .inputrc you put: "\eOC": forward-word note s/\^[/\\e/g Then do a bind -f .inputrc and it just works.