After running cat -t
, I tested the following cases:
ctrl
+tab
added only atab
spacectrl
+/
added^_
ctrl
+`
added^@
ctrl
+shift
+backspace
deleted to the left (same behaviour asbackspace
).
On the other hand, the following key bindings remain consistent:
ctrl
+n
adds^N
ctrl
+y
adds^Y
All 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
+tab
to<C-tab>
(instead ofTAB
)ctrl
+/
to^/
(instead of^_
)ctrl
+`
to^`
(instead of^@
)ctrl
+shift
+backspace
to<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
+tab
is detected as<C-tab>
inemacs
, but detected asTAB
inemacs -nw
.ctrl
+/
is detected asC-/
inemacs
, but detected asC-_
inemacs -nw
.ctrl
+`
is detected asC-`
inemacs
, but detected asC-@
inemacs -nw
.ctrl
+shift
+backspace
is detected as<C-S-backspace>
inemacs
, but detected asDEL
inemacs -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.