Change your "funcskeys" file slightly to produce the following escape sequences:
control keycode 105 = F100
string F100 = "\033[1;5D"
control keycode 106 = F101
string F101 = "\033[1;5C"
Then add the following lines to your .emacs
file:
(define-key input-decode-map "\e[1;5C" [(control right)])
(define-key input-decode-map "\e[1;5D" [(control left)])
After running loadkeys
and restarting Emacs, CTRL+left and CTRL+right should work. You can verify this by typing:
C-h k C-right
and
C-h k C-left
To actually bind these keystrokes to a command, such as forward-word
, you might have to add the following lines to your .emacs
file as well:
(global-set-key [(control right)] 'forward-word)
(global-set-key [(control left)] 'backward-word)
Note that this whole approach specifically only makes the key combinations CTRL+left and CTRL+right work. It does not for instance make ALT+left / ALT+right work, or any other key combinations involving the CTRL character.