Re: Emacs keybinding of Ctrl-[

1998-10-07 Thread Andy Spiegl
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?

>, , , ,  and  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  key.
Just like me.

>If you do not want to distinguish between (for example)  and
> `C-i', make just one binding, for the ASCII character  (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: [EMAIL PROTECTED] URL: http://www.spiegl.de
 Finger [EMAIL PROTECTED] for my PGP key
o  _ _ _
  - __o   __o  /\_   _ \\o  (_)\__/o  (_)
  --- _`\<,__`\<,__>(_) (_)/<_\_| \   _|/' \/
  -- (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o_
 ~~~
 "How to make a million dollars:  First, get a million dollars."
 -- Steve Martin


Re: Emacs keybinding of Ctrl-[

1998-10-03 Thread Havoc Pennington

On 2 Oct 1998, Andy Spiegl wrote:
> 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): 

   , , , ,  and  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  key.

   Emacs distinguishes these two kinds of input, when used with the X
Window System.  It treats the "special" keys as function keys named
`tab', `return', `backspace', `linefeed', `escape', and `delete'.
These function keys translate automatically into the corresponding
ASCII characters *if* they have no bindings of their own.  As a result,
neither users nor Lisp programs need to pay attention to the
distinction unless they care to.

   If you do not want to distinguish between (for example)  and
`C-i', make just one binding, for the ASCII character  (octal code
011).  If you do want to distinguish, make one binding for this ASCII
character, and another for the "function key" `tab'.

   With an ordinary ASCII terminal, there is no way to distinguish
between  and `C-i' (and likewise for other such pairs), because
the terminal sends the same character in both cases.

 
> Can I use xmodmap to get udiaresis etc. with Hyper-[ ?  That way
> I wouldn't even have to bother with setting up emacs and would
> have the keys in all applications.  I tried:
>  keycode 0x1C  = Hyper_L
>  add Mod4  = Hyper_L
>  keycode 0x56  = bracketleft braceleft udiaeresis Udiaeresis
> 
> But that didn't work. :-(
> 

Xmodmap is cryptic. I've had good luck with Xkeycaps, since it's otherwise
impossible to remember the syntax. 

I'm sure someone else can give you a quick formula. Another poster had a
better suggestion - apparently Emacs already has an international mode. 
I'd suggest reading about that in the Emacs manual and the Xmodmap man
page, and thinking about your options (Xkeycaps will let you look at
foreign keymappings, too, I think - so you could copy from that). 
There are probably three or four ways to do this.

Havoc



Re: Emacs keybinding of Ctrl-[

1998-10-02 Thread Andy Spiegl
> C-[ is the same as ESC, I think. So that's your problem.
And there is no way to separate ESC and C-[ ?
I mean, who uses C-[ to get an ESC??

> Maybe if you redefine ESC, but you probably don't want to do that.
I don't think so. :-)

> Do you have an alt or meta or compose key you could use? You could use
> Xmodmap to remap right alt or right control to Hyper or Compose or some
> other key not found on US keyboards.
Good idea.  The right Alt key is not so handy, but I never use capslock.
So I decided to map capslock on the right alt key and Hyper on the
capslock key.  But that's how far I got.  How do I go from there?

> Then you could use that for your Emacs bindings.
How do I use Hyper, please?

Can I use xmodmap to get udiaresis etc. with Hyper-[ ?  That way
I wouldn't even have to bother with setting up emacs and would
have the keys in all applications.  I tried:
 keycode 0x1C  = Hyper_L
 add Mod4  = Hyper_L
 keycode 0x56  = bracketleft braceleft udiaeresis Udiaeresis

But that didn't work. :-(

Help, anybody help?
 Andy.

-- 
 Andy Spiegl, University of Technology, Muenchen, Germany
 E-Mail: [EMAIL PROTECTED] URL: http://www.spiegl.de
 Finger [EMAIL PROTECTED] for my PGP key
o  _ _ _
  - __o   __o  /\_   _ \\o  (_)\__/o  (_)
  --- _`\<,__`\<,__>(_) (_)/<_\_| \   _|/' \/
  -- (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o_
 ~~~


Re: Emacs keybinding of Ctrl-[

1998-10-02 Thread Peter S Galbraith

Havoc Pennington wrote:

> On 2 Oct 1998, Andy Spiegl wrote:
> > I am working with an US-keyboard, but typing German texts in XEmacs.
> > So I tried to teach XEmacs (v19.11) to give me the umlauts if I press
> > the corresponding keys together with CTRL.  This works fine for all
> > keys except for u-umlaut which would end up being on CTRL-[ :
> 
> C-[ is the same as ESC, I think. 

Exactly right.

> Do you have an alt or meta or compose key you could use?

That's what I do for french.

(require 'iso-transl)
(iso-transl-set-language "French")
(standard-display-european t)

Then, for me, Alt-e enters é.
-- 
Peter Galbraith, research scientist  <[EMAIL PROTECTED]>
Maurice Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada. 418-775-0852 FAX: 775-0546
6623'rd GNU/Linux user at the Counter - http://counter.li.org/ 


Re: Emacs keybinding of Ctrl-[

1998-10-02 Thread Havoc Pennington

On 2 Oct 1998, Andy Spiegl wrote:
> Hi,
> 
> I am working with an US-keyboard, but typing German texts in XEmacs.
> So I tried to teach XEmacs (v19.11) to give me the umlauts if I press
> the corresponding keys together with CTRL.  This works fine for all
> keys except for u-umlaut which would end up being on CTRL-[ :
> 

C-[ is the same as ESC, I think. So that's your problem. Maybe if you
redefine ESC, but you probably don't want to do that.

Do you have an alt or meta or compose key you could use? You could use
Xmodmap to remap right alt or right control to Hyper or Compose or some
other key not found on US keyboards. Then you could use that for your
Emacs bindings. You'd have to work out the details but I bet you could
make it work. Then your regular Emacs bindings will be unaffected, since
you could use left alt and control for those.

HTH,
Havoc



Emacs keybinding of Ctrl-[

1998-10-02 Thread Andy Spiegl
Hi,

I am working with an US-keyboard, but typing German texts in XEmacs.
So I tried to teach XEmacs (v19.11) to give me the umlauts if I press
the corresponding keys together with CTRL.  This works fine for all
keys except for u-umlaut which would end up being on CTRL-[ :

;; define umlaut keys
(define-key global-map [(control \-)] [ssharp])
(define-key global-map [(control \;)] [odiaeresis]) 
(define-key global-map [(control \')] [adiaeresis])
(define-key global-map [(control \[)] [udiaeresis])
;; capital letters
(define-key global-map [(control \:)] [Odiaeresis]) 
(define-key global-map [(control \")] [Adiaeresis])
(define-key global-map [(control \{)] [Udiaeresis])

Even after these redefinitions XEmacs responds to CTRL-[ the
usual way (which is waiting for the next key).

Does anyone of you out there know a solution to this?
(without redefining the [ key itself. I need it for programming)

Thanks a lot in advance!
 Andy.
-- 
 Andy Spiegl, University of Technology, Muenchen, Germany
 E-Mail: [EMAIL PROTECTED] URL: http://www.spiegl.de
 Finger [EMAIL PROTECTED] for my PGP key
o  _ _ _
  - __o   __o  /\_   _ \\o  (_)\__/o  (_)
  --- _`\<,__`\<,__>(_) (_)/<_\_| \   _|/' \/
  -- (_)/ (_)  (_)/ (_)  (_)(_)   (_)(_)'  _\o_
 ~~~