[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The correspondence of the command-name and its key-sequence.
From: |
Hongyi Zhao |
Subject: |
Re: The correspondence of the command-name and its key-sequence. |
Date: |
Sat, 9 Jan 2021 15:16:13 +0800 |
On Sat, Jan 9, 2021 at 2:34 PM Drew Adams <drew.adams@oracle.com> wrote:
>
> > 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").
That's exactly what I mean.
>
> 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."
I find another may be far-fetched relation based on your above
notes/hints/comments:
werner@X10DAi:~$ printf "%d %x\n" "'q" "'q"
113 71
werner@X10DAi:~$ printf "%d %x\n" "'G" "'G"
71 47
As you can see, the hexadecimal point code of "q" is the same as the
decimal point code of "G" in form.
BR,
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
- The correspondence of the command-name and its key-sequence., Hongyi Zhao, 2021/01/09
- RE: The correspondence of the command-name and its key-sequence., Drew Adams, 2021/01/09
- Re: The correspondence of the command-name and its key-sequence.,
Hongyi Zhao <=
- Re: The correspondence of the command-name and its key-sequence., Omar Polo, 2021/01/09
- Re: The correspondence of the command-name and its key-sequence., Hongyi Zhao, 2021/01/09
- Re: The correspondence of the command-name and its key-sequence., Omar Polo, 2021/01/09
- Re: The correspondence of the command-name and its key-sequence., Hongyi Zhao, 2021/01/11
- Re: The correspondence of the command-name and its key-sequence., Omar Polo, 2021/01/11
- Re: The correspondence of the command-name and its key-sequence., tomas, 2021/01/11
- Re: The correspondence of the command-name and its key-sequence., Francis Belliveau, 2021/01/09
- Re: ASCII - Why...? -- as promised., Francis Belliveau, 2021/01/14
- RE: The correspondence of the command-name and its key-sequence., Drew Adams, 2021/01/09
Re: The correspondence of the command-name and its key-sequence., Kévin Le Gouguec, 2021/01/09