Hacker News new | ask | show | jobs
by susam 915 days ago
Another way to look at it is that Ctrl+G takes the code (ASCII) of G, i.e., 71 (binary 1000111) and toggles its 7th least significant bit to get 7 (binary 111) and indeed 7 is the code of the BEL character.

This explanation is over-simplified though. In practice, different systems have used different techniques to derive control codes from key chords. I have a more detailed article about this at https://susam.net/blog/control-escape-meta-tricks.html if anyone is interested to read it.