Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I can not find the mapping in bind -p nor in stty -a. Also, it only works in the terminal emulators I've tried (xterm, konsole, gnome-terminal) and not in the linux system console. I think it's traditionally an emacs mapping.

EDIT: When I enter ^V^/ bash prints ^_, which is mapped to undo in bind. But where is ^/ mapped to ^_?

share|improve this question
add comment

1 Answer

It's the terminal emulator which generates it (it does get raw X event and generate a stream of bytes and the pseudo terminal handling doesn't have a notion of modifier keys, ^_ is a control character of code 037).

The origin of this mapping is probably in VT100 which mapped both CTRL-? and CTRL-/ to character 037 and didn't apparently map CTRL-_ to anything. Terminal emulators I've tried map CTRL-? to either 037 of 177.

VT220 did something else, but some of its mappings are still available at least in an XTerm.

share|improve this answer
    
Does that mean the mapping would only be found in the source code of the terminal emulator? –  bug Jul 4 '13 at 10:49
    
That or its configuration files (XTerm configuration is able to handle translation of X keypresses to strings -- but I don't see any in the appdefault installed here). –  AProgrammer Jul 4 '13 at 10:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.