Pimenov Yuri wrote:
> > my xemacs (last beta) don't recognize Alt key at all!
it's echoes "A-x
> > not defined"...
>
> Then it does recognise the Alt key. However, XEmacs doesn't use the
> Alt key for any of its default bindings; it's only the Meta key which
> is used.
>
> NB: XEmacs will translate Alt to Meta, BUT only if you don't have a
> Meta key.
there is no key labeled "Meta" on my keybord for sure... ;-))
The software doesn't care what's printed on it ;)
My Meta key has "Alt" printed on it, and my "Alt" key has a Windows
logo.
> > this problem doesn't happen with XEmacs 21.1
> > i'm using cvs KDE, XFree86 4.0.3 with XKB extension on (russian layout).
> >
> > PS. LeftAlt is defined to Meta in XF86Config...
>
> That is only one part of a complex mechanism.
>
> What does "xmodmap -pm" say? What does "xev" say when you press
the
> key? These will tell you how the keyboard is actually configured.
[icct@CS-Proc icct]$ xmodmap -pm
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40)
mod2 Num_Lock (0x4d)
mod3 Mode_switch (0x71)
mod4 Meta_L (0x73)
mod5 Scroll_Lock (0x4e)
You have both Alt and Meta, so you have to use the right one.
xev says:
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3b, subw 0x2e00002, time 3038488845, (47,31), root:(889,572),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 characters: ""
That'll be the Alt key.
XEmacs does what the ICCCM says, i.e. mod1 is "Alt" (because it is
bound to Alt_L) and mod4 is "Meta" (because it is bound to Meta_L).
Unfortunately a lot of X software is written by people who don't read
the ICCCM, and assume that "mod1" is "the other key that's sort of
like Control".
do you mean i have to comment out "option LeftAlt..."?
I'm not sure that it will matter. XF86Config affects how the keys are
set up initially, but any number of configuration files might change
it.
The X startup sequence is highly configurable, and many packaged
distributions include their own configurations. Consequently, I'm not
going to list every possible file which might be used to change it,
but anything which is used by the display manager (xdm/gdm/kdm), or
the window manager or the desktop environment is a candidate.
are there any ways to substitute Alt key to Meta key?
The following xmodmap commands will do that.
keysym Alt_L = Meta_L
keysym Meta_L = Alt_L
However, the precise effect would depend upon whether anything in your
X startup is also using xmodmap (or the underlying X functions) to
configure your keymap. It's possible that the above might not do
anything (if something else is explicitly configuring these keys), or
it might affect how some or all of your existing programs respond to
these keys.
Isn't configurability wonderful? ;)
--
Glynn Clements <glynn.clements(a)virgin.net>