After running cat -t, I tested the following cases:
ctrl+tabadded only atabspacectrl+/added^_ctrl+`added^@ctrl+shift+backspacedeleted to the left (same behaviour asbackspace).
On the other hand, the following key bindings remain consistent:
ctrl+nadds^Nctrl+yadds^YAll alphanumeric characters
[a-zA-Z0-9]add the corresponding alphanumeric character
Is there a way to remap the key combinations to a preferred output? For example, in my first four examples above, I would like to remap them to the following:
ctrl+tabto<C-tab>(instead ofTAB)ctrl+/to^/(instead of^_)ctrl+`to^`(instead of^@)ctrl+shift+backspaceto<C-S-backspace>(instead ofDEL)
Background (TLDR)
I would like to run emacs -nw when editing on a remote machine, but I notice that several key combinations are not inconsistently detected between running emacs and emacs -nw. Here are a few of the inconsistent key mappings, which I have verified using C-h k <key-binding> in Emacs:
ctrl+tabis detected as<C-tab>inemacs, but detected asTABinemacs -nw.ctrl+/is detected asC-/inemacs, but detected asC-_inemacs -nw.ctrl+`is detected asC-`inemacs, but detected asC-@inemacs -nw.ctrl+shift+backspaceis detected as<C-S-backspace>inemacs, but detected asDELinemacs -nw.
Any ideas about how to send the proper key combinations to my window-less emacs? All of the inconsistently detected key combinations involve the use of ctrl, but not all key bindings with control are inconsistently detected. For example, C-n is consistently detected.
I am using Ubuntu 14.04, but this problem persists with Debian Wheezy as well. For terminal info, I have the following on all my servers and local machines:
[lucas@server]/home/lucas/bin$ echo $TERM
screen
[lucas@server]/home/lucas/bin$ echo $SHELL
/bin/bash
I usually run my sessions in tmux, but this problem persists regardless of whether I am in a tmux session.