Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

For the purposes of using emacs in a terminal, I want to use key combinations like Control-'. But when I try that key combination, it just writes an ' to the command line. The same thing happens for all punctuation. Is there a way to get around this?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Because of the way ASCII terminals work, Ctrl-' and other such combinations are meaningless.

The ASCII value of a single quote is 3910 and since 3910 and 6310 still equals 3910 you still get a single quote as the result. Only characters with ASCII codes between 6410 and 12610 (inclusive) produce meaningful control codes (010 through 3110). I've omitted some subtleties for simplicity.

When you're not using an ASCII terminal you can map those key combinations since you're using keyboard scan codes or some equivalent.

share|improve this answer
good to know, thanks –  colinmarc Oct 13 '10 at 6:43
How can I find a terminal emulator that works the way I need? Is there such a thing? I've been randomly trying different ones but none have worked. –  colinmarc Oct 15 '10 at 19:07

Your Answer


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.