help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: The correspondence of the command-name and its key-sequence.


From: Drew Adams
Subject: RE: The correspondence of the command-name and its key-sequence.
Date: Sat, 9 Jan 2021 06:32:45 +0000 (UTC)

> But, it's still very hard for me to understand the correspondence of
> the command-name and its key-sequence. To summarize, why use C-g to
> represent the command keyboard-quit, instead of other more directly
> related forms, say, C-q.

I think you're asking why `C-g' is used for quitting/canceling an action, 
instead of, for example `C-q' (since `q' is mnemonic for "quit").

Somewhere there's a good history of `C-g', including for Emacs, but I can't 
recall where I saw it.  I'm sure someone on this list will point you to it.

I'll at least point to this Wikipedia page:

https://en.wikipedia.org/wiki/Bell_character

That tells you that `C-g' was assigned to a bell code, i.e., as an alert.  And 
before `C-g', a bell code rang a bell on a teletype or tickertape, to alert a 
human operator.  Bell codes apparently go back to 1870.

In Emacs, using `C-g' typically also produces a bell sound. (Function `ding' 
does that as well.)

See also:

https://en.wikipedia.org/wiki/Control_character

"The bell character (BEL), which rang a bell to alert operators, was also an 
early teletype control character."

"7 (bell, BEL, \a, ^G), which may cause the device to emit a warning such as a 
bell or beep sound or the screen flashing."

and

https://en.wikipedia.org/wiki/Control_key

"For example, the character or "G", whose ASCII code is 71 in base 10, or 100 
0111 in binary, would be transformed into the binary code 000 0111 (7 in 
decimal), which is assigned to the bell character."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]