* AltGr with Emacs 23 on OSX and German keyboard
@ 2009-11-13 9:06 Stefan Kamphausen
2009-11-13 10:09 ` Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Stefan Kamphausen @ 2009-11-13 9:06 UTC (permalink / raw)
To: help-gnu-emacs
Fellow Emacsers,
due to certain quantum shifts in the space-time-continuum I got a
machine with OSX running at home[1]. On that I manually installed Emacs
23.1 and AUCTeX to do some nice LaTeXing.
Since I really dislike the original keyboard that came with that
computer [2] and since I want to have the keyboard-layout that is
printed on the keyboard [3] I plugged a common German keyboard into the
USB-port and fetched some keyboard-description file from the Internet
[4]. After that many things work as expected.
However, whenever I try to type a backslash (AltGr ß on a German
Keyboard) Emacs tells me that M-ß is undefined. In fact this counts for
all keystrokes involving AltGr. Those of you familiar with German
keyboards will know that this makes the following chars unavailable:
@\[]{}|~. Try to do some LaTeX-editing without those.
I've waded the message-board-sea for hours, mostly finding posts that
say one should really try the apple-keyboard and their layout [5] and
have now spent 3 evenings trying to find a solution. To no avail.
Does anyone in this group have a solution, an url or an idea?
Kind Regards,
Stefan
Footnotes:
[1] Boy, if you've been with Linux for >15 years this is hard to take
but that's not the story here.
[2] And I *don't* want to discuss this like it's been done in numerous
messages boards, thank you). After some 20 years of typing you just
know what's good for your wrists and what isn't.
[3] No discussion either, please. I've been through all that aeons
ago.
[4] Ridiculous that I can't just switch it, isn't it?
[5] Obviously that's the reason for some bitter footnotes here.
--
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
2009-11-13 9:06 AltGr with Emacs 23 on OSX and German keyboard Stefan Kamphausen
@ 2009-11-13 10:09 ` Peter Dyballa
[not found] ` <mailman.10632.1258107023.2239.help-gnu-emacs@gnu.org>
2009-11-14 8:16 ` Stefan Monnier
2 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2009-11-13 10:09 UTC (permalink / raw)
To: Stefan Kamphausen; +Cc: help-gnu-emacs
Am 13.11.2009 um 10:06 schrieb Stefan Kamphausen:
> Does anyone in this group have a solution, an url or an idea?
The xmodmap utility will show you the keys defined and the X
modifiers set. In a file ~/.xmodmaprc you can change settings and
load it into xmodmap as a statement in ~/.xinitrc when X11 is
launched ("xmodmap ${HOME}/.xmodmaprc"). The code could be:
clear Mod1
keycode 66 = Meta_L
add Mod1 = Meta_L
The utility xev can give you exact information about a key and X
modifiers.
--
Mit friedvollen Grüßen
Pete
Ich bin dafür, die Dinge so weit wie möglich zu vereinfachen.
Aber nicht weiter.
(Albert Einstein)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
[not found] ` <mailman.10632.1258107023.2239.help-gnu-emacs@gnu.org>
@ 2009-11-13 10:27 ` Stefan Kamphausen
2009-11-13 14:18 ` Peter Dyballa
[not found] ` <mailman.10641.1258122071.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Stefan Kamphausen @ 2009-11-13 10:27 UTC (permalink / raw)
To: help-gnu-emacs
Hi Peter,
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 13.11.2009 um 10:06 schrieb Stefan Kamphausen:
>
>> Does anyone in this group have a solution, an url or an idea?
>
>
> The xmodmap utility will show you the keys defined and the X modifiers
> set. In a file ~/.xmodmaprc you can change settings and load it into
> xmodmap as a statement in ~/.xinitrc when X11 is launched ("xmodmap
> ${HOME}/.xmodmaprc").
[...]
Thanks for that input, I'been carrying a full xmodmap around for years
on various Linux-systems.
However, I'm under the impression that X11 is nur running. I compiled
the native Cocoa-version of Emacs23 (or is Carbon the newer one? Sorry
to be fuzzy here).
> The utility xev can give you exact information about a key and X
> modifiers.
Can I just launch X11 and then use xev to examine the keycodes? Will
that in any way reflect the situation of the native programs?
Regards,
Stefan
--
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
2009-11-13 10:27 ` Stefan Kamphausen
@ 2009-11-13 14:18 ` Peter Dyballa
[not found] ` <mailman.10641.1258122071.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2009-11-13 14:18 UTC (permalink / raw)
To: Stefan Kamphausen; +Cc: help-gnu-emacs
Am 13.11.2009 um 11:27 schrieb Stefan Kamphausen:
> However, I'm under the impression that X11 is nur running. I compiled
> the native Cocoa-version of Emacs23 (or is Carbon the newer one?
> Sorry
> to be fuzzy here).
Could you be a bit more specific? You could describe the way you
launch that application – or copy a bit from the buffer which is
created when you choose "Send Bug Report…" from the Help menu. BTW,
is this Help menu in Emacs' frame or in the menu bar? The X clients
can't "delegate" the menu-bar...
>
>> The utility xev can give you exact information about a key and X
>> modifiers.
>
> Can I just launch X11 and then use xev to examine the keycodes?
Of course!
> Will that in any way reflect the situation of the native programs?
No. You could try to create your own keyboard layout. See for example
http://wiki.neo-layout.org/browser/mac_osx/ or http://www.sil.org/
computing/catalog/show_software.asp?id=94. Surely there are more
tools to edit the keyboard layout, which is very easy in Mac OS X.
You might need Peter Maurer's Key Codes application: http://
www.manytricks.com/keycodes to determine the Mac OS X key codes.
--
Mit friedvollen Grüßen
Pete
Wer nichts zu verbergen hat, hat schon alles verloren.
(Juli Zeh)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
[not found] ` <mailman.10641.1258122071.2239.help-gnu-emacs@gnu.org>
@ 2009-11-13 14:28 ` Stefan Kamphausen
2009-11-15 11:42 ` Stefan Kamphausen
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Kamphausen @ 2009-11-13 14:28 UTC (permalink / raw)
To: help-gnu-emacs
Hi Peter,
thanks for stepping up.
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 13.11.2009 um 11:27 schrieb Stefan Kamphausen:
>
>> However, I'm under the impression that X11 is nur running. I compiled
>> the native Cocoa-version of Emacs23 (or is Carbon the newer one?
>> Sorry
>> to be fuzzy here).
>
> Could you be a bit more specific? You could describe the way you
> launch that application – or copy a bit from the buffer which is
> created when you choose "Send Bug Report…" from the Help menu. BTW,
> is this Help menu in Emacs' frame or in the menu bar? The X clients
> can't "delegate" the menu-bar...
the weekend is just a few hours away and I think I'll be near that
machine again on saturday night. If you allow, I would contact you
directly via email and, if some solution comes up, post that here later
(just to avoid noise). Of course I will wait for your thumbs up before
doing so.
>> Will that in any way reflect the situation of the native programs?
>
>
> No. You could try to create your own keyboard layout. See for example
> http://wiki.neo-layout.org/browser/mac_osx/ or http://www.sil.org/
> computing/catalog/show_software.asp?id=94. Surely there are more
> tools to edit the keyboard layout, which is very easy in Mac OS X.
> You might need Peter Maurer's Key Codes application: http://
> www.manytricks.com/keycodes to determine the Mac OS X key codes.
I hope I'll find something valuable there.
Good, that this is an emacs-centric group whereas all the posts I read
were from osx-related sites. I seem to find little valuable information
on those.
Kind regards,
Stefan
--
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
2009-11-13 9:06 AltGr with Emacs 23 on OSX and German keyboard Stefan Kamphausen
2009-11-13 10:09 ` Peter Dyballa
[not found] ` <mailman.10632.1258107023.2239.help-gnu-emacs@gnu.org>
@ 2009-11-14 8:16 ` Stefan Monnier
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2009-11-14 8:16 UTC (permalink / raw)
To: help-gnu-emacs
> However, whenever I try to type a backslash (AltGr ß on a German
> Keyboard) Emacs tells me that M-ß is undefined.
You may want to check with C-h l to see what Emacs really receives.
most likely that won't help, but it's worth a try,
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
[not found] ` <mailman.10641.1258122071.2239.help-gnu-emacs@gnu.org>
2009-11-13 14:28 ` Stefan Kamphausen
@ 2009-11-15 11:42 ` Stefan Kamphausen
2009-11-15 12:47 ` Peter Dyballa
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Kamphausen @ 2009-11-15 11:42 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 13.11.2009 um 11:27 schrieb Stefan Kamphausen:
>
>> However, I'm under the impression that X11 is nur running. I compiled
>> the native Cocoa-version of Emacs23 (or is Carbon the newer one?
>> Sorry
>> to be fuzzy here).
>
> Could you be a bit more specific? You could describe the way you
> launch that application –
I either use an icon in the dock or I start Emacs via a Shell script:
cat `which emacs`
#!/bin/sh
test -x "$emacs" ||
emacs="$HOME/local/opt/emacs-23.1/nextstep/Emacs.app/Contents/MacOS/Emacs"
test -x "$emacs" || emacs="/usr/bin/emacs"
exec "$emacs" ${SSH_CONNECTION:+-nw} ${SCREEN_IN_SSH:+-nw} "$@"
Both behave exactly the same.
or copy a bit from the buffer which is
> created when you choose "Send Bug Report…" from the Help menu.
Here you are...
In GNU Emacs 23.1.1 (i386-apple-darwin9.7.0, NS apple-appkit-949.46)
of 2009-08-02 on imac
Windowing system distributor `Apple', version 10.3.949
configured using `configure '--with-ns''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
BTW,
> is this Help menu in Emacs' frame or in the menu bar? The X clients
> can't "delegate" the menu-bar...
It's in the menu bar, just like a native OSX application.
>
>>
>>> The utility xev can give you exact information about a key and X
>>> modifiers.
>>
>> Can I just launch X11 and then use xev to examine the keycodes?
>
> Of course!
>
>> Will that in any way reflect the situation of the native programs?
>
>
> No. You could try to create your own keyboard layout. See for example
> http://wiki.neo-layout.org/browser/mac_osx/ or http://www.sil.org/
> computing/catalog/show_software.asp?id=94. Surely there are more
> tools to edit the keyboard layout, which is very easy in Mac OS X.
> You might need Peter Maurer's Key Codes application: http://
> www.manytricks.com/keycodes to determine the Mac OS X key codes.
Still have to look into those.
If I hit AltGr-Backspace and do the C-h l afterwards I see:
M-(sharp s) C-h l
(I can't insert the real sharp s in this emacs, I currently use to type
this post, but it is displayed as a "normal" sharp-s in the help
buffer).
Another thing I noted: the described behavior occurs with that keyboard
layout I loaded from the net as well as with the original osx layout. I
toggle those using a little icon in the menubar and applications like
e.g. the terminal that shipped with this computer reflect the changes
immediately: with the original layout I see a question mark upside-down
if I hit AltGr-Backslash but with the custom layout I get a backslash.
Funny, that makes no difference in Emacs.
xev didn't help either. It reports AltGr as
KeyPress event, serial 26, synthetic NO, window 0x600001,
root 0x27d, subw 0x0, time 4154597274, (135,83), root:(135,105),
state 0x0, keycode 57 (keysym 0x20, space), same_screen YES,
XLookupString gives 1 bytes: (20) " "
XmbLookupString gives 1 bytes: (20) " "
XFilterEvent returns: False
with the original layout and as
KeyPress event, serial 26, synthetic NO, window 0x600001,
root 0x27d, subw 0x0, time 4154673256, (86,89), root:(86,111),
state 0x0, keycode 69 (keysym 0xff7e, Mode_switch), same_screen YES,
XKeysymToKeycode returns keycode: 66
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
with the custom layout. However, since X11 was launched when I started
xev that's probably not releveant anyway.
Well, that's it. I'm running out of ideas what else to try (other than
compiling Emacs from CVS maybe). Is this considered a bug, shall I sent
that report?
Kind regards,
Stefan
--
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: AltGr with Emacs 23 on OSX and German keyboard
2009-11-15 11:42 ` Stefan Kamphausen
@ 2009-11-15 12:47 ` Peter Dyballa
0 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2009-11-15 12:47 UTC (permalink / raw)
To: Stefan Kamphausen; +Cc: help-gnu-emacs
Am 15.11.2009 um 12:42 schrieb Stefan Kamphausen:
> #!/bin/sh
>
> test -x "$emacs" ||
> emacs="$HOME/local/opt/emacs-23.1/nextstep/Emacs.app/Contents/MacOS/
> Emacs"
> test -x "$emacs" || emacs="/usr/bin/emacs"
>
> exec "$emacs" ${SSH_CONNECTION:+-nw} ${SCREEN_IN_SSH:+-nw} "$@"
For me Emacs.app/Contents/MacOS/Emacs has problems to interpret and
receive all command line arguments...
> In GNU Emacs 23.1.1 (i386-apple-darwin9.7.0, NS apple-appkit-949.46)
> of 2009-08-02 on imac
> Windowing system distributor `Apple', version 10.3.949
> configured using `configure '--with-ns''
>> is this Help menu in Emacs' frame or in the menu bar? The X
>> clients
>> can't "delegate" the menu-bar...
>
> It's in the menu bar, just like a native OSX application.
So it's the Aqua or NS or GNUStep/OPENSTEP "Emacs.app."
>
> If I hit AltGr-Backspace and do the C-h l afterwards I see:
> M-(sharp s) C-h l
> (I can't insert the real sharp s in this emacs, I currently use to
> type
> this post, but it is displayed as a "normal" sharp-s in the help
> buffer).
Have you tried Character Palette (Zeichenpalette)?
>
> Another thing I noted: the described behavior occurs with that
> keyboard
> layout I loaded from the net as well as with the original osx
> layout. I
> toggle those using a little icon in the menubar and applications like
> e.g. the terminal that shipped with this computer reflect the changes
> immediately: with the original layout I see a question mark upside-
> down
> if I hit AltGr-Backslash but with the custom layout I get a backslash.
> Funny, that makes no difference in Emacs.
>
> xev didn't help either.
Exactly. Xev and X11 are not Aqua.
> Is this considered a bug, shall I sent that report?
If, then to Apple. It's obviously Mac OS X which does not produce the
proper key events and has no idea of the "modifiers" of your
keyboard. But it's also Emacs.app which has problems with keys of non-
English keyboards.
--
Mit friedvollen Grüßen
Pete
We need a president who's fluent in at least one language.
– Buck Henry
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-11-15 12:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 9:06 AltGr with Emacs 23 on OSX and German keyboard Stefan Kamphausen
2009-11-13 10:09 ` Peter Dyballa
[not found] ` <mailman.10632.1258107023.2239.help-gnu-emacs@gnu.org>
2009-11-13 10:27 ` Stefan Kamphausen
2009-11-13 14:18 ` Peter Dyballa
[not found] ` <mailman.10641.1258122071.2239.help-gnu-emacs@gnu.org>
2009-11-13 14:28 ` Stefan Kamphausen
2009-11-15 11:42 ` Stefan Kamphausen
2009-11-15 12:47 ` Peter Dyballa
2009-11-14 8:16 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).