[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define-key turns to go the wrong way.
From: |
Peter Dyballa |
Subject: |
Re: define-key turns to go the wrong way. |
Date: |
Thu, 4 Apr 2013 11:31:49 +0200 |
Am 04.04.2013 um 03:45 schrieb Peng Dai:
> When I use the "\C-h k" to see what' wrong. It turn out to be "\C-[" was
> readed as "<ECS>". I search the google with no result, it says it was because
> of the ISCAE's key value but with no soluvation give.
See 'man ascii' or http://en.wikipedia.org/wiki/ASCII.
The first 32 ASCII codes do not represent printable characters. So, how can one
produce them, manually, interactively? (In a C programme no problem, of
course.) The way to produce them is by holding down the CONTROL key (ctrl or
such) and then pressing another key on the keyboard. This gives a "control
code" or "control character", not printable. Since the Latin alphabet has only
26 members (the characters a to z or A to Z) it is necessary to use some other
characters to be able to address all 32 control characters. C-a produces ASCII
code 1, SOH, C-z produces ASCII code 26, SUB. And C-] is ASCII code 27 or ESC.
>
> And I find another key has the same problem,too. like:
> "\C-j" turn to be "<SPACE>"
> "\C-M-j" turn to be "<RET>j"
This is not correct. This must be introduced by you.
C-j is ASCII code 10 (because it's the tenth Latin character) or LF, LINEFEED.
C-M-j can be mapped to whatever you like.
What you can do is launch GNU Emacs with -Q. Then you can type C-h k <your key
combination>. In a *Help* buffer you'll see the explanation of that key code.
Directly afterwards type C-x ESC ESC. This will show you in echo area (or
mini-buffer) which actual "code" GNU Emacs received when you asked it for an
explanation of the meaning of the pressed key combination.
--
Greetings
Pete
Some day we may discover how to make magnets that can point in any direction.