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

Re: Emacs keybinding of Ctrl-[



Hi Havoc,

> > And there is no way to separate ESC and C-[ ?
> > I mean, who uses C-[ to get an ESC??
> 
> Text terminals do. But there's a way around it - from the Emacs manual's
> discussion of keybindings (which you may find interesting, btw): 
Hm, I couldn't find this in the manual.  Maybe that's because I am
using Xemacs, not Emacs?

>    <TAB>, <RET>, <BS>, <LFD>, <ESC> and <DEL> started out as names for
> certain ASCII control characters, used so often that they have special
> keys of their own.  Later, users found it convenient to distinguish in
> Emacs between these keys and the "same" control characters typed with
> the <CTRL> key.
Just like me.

>    If you do not want to distinguish between (for example) <TAB> and
> `C-i', make just one binding, for the ASCII character <TAB> (octal code
> 011).  If you do want to distinguish, make one binding for this ASCII
> character, and another for the "function key" `tab'.
Doesn't that say, that binding C-[ should work?  But this line:
 (define-key global-map [(control \[)] [udiaeresis])
does not have any effect. :-(
Maybe I just didn't understand it.

> Xmodmap is cryptic. I've had good luck with Xkeycaps, since it's otherwise
> impossible to remember the syntax.
That's right!  In the meantime I managed to turn my capslock key into
a "super" key.  I could then map like this:
 (define-key global-map [(super \[)] [udiaeresis])

Unfortunately I can only use that key when in emacs.  I can't find how
to make use of it in the shell, an xterm etc.

Thanks anyway for your help!
 Andy.

-- 
 Andy Spiegl, University of Technology, Muenchen, Germany
 E-Mail: Andy@spiegl.de     URL: http://www.spiegl.de
 Finger pgp.andy@spiegl.de for my PGP key
                                o      _     _         _
  --------- __o       __o      /\_   _ \\o  (_)\__/o  (_)
  ------- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/
  ------ (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 "How to make a million dollars:  First, get a million dollars."
 -- Steve Martin


Reply to: