[comp.windows.x] Alt vs. Meta in Xt translations

jsparkes@bcars85.bnr.ca (Jeff Sparkes) (07/20/90)

	What is the difference between Alt and Meta in Xt translations?  My
NCD X terminal defines Alt_L and Alt_R, but it seems that xedit uses Meta in
it translation table, so it doesn't work.
	Also, do different servers distinguish Alt_R and Alt_L?  I have some
translations for xterm of the form "Alt<Key>x:" which work on the NCD 
running their server version 2.1.0, but don't work on a Sun4 running X11R4.
	What I really need is a keyboard independent way of specifying
Alt or Meta.


--
Jeff Sparkes		jsparkes@bnr.ca
Another feature is that the seats float, so that the airline can recover
them if the plane crashes into the ocean. -- Dave Barry

swick@ATHENA.MIT.EDU (Ralph R. Swick) (07/20/90)

	What is the difference between Alt and Meta in Xt translations?

They are (just) different pairs of KeySyms; no special meaning is attached
to either.  There is also an abbreviation symbol ("$") which can be
used in a key sequence to indicate that the modifier key assigned to
Meta_L or Meta_R must be asserted.  No such abbreviation exists for Alt_*.

    My
    NCD X terminal defines Alt_L and Alt_R, but it seems that xedit uses Meta in
    it translation table, so it doesn't work.

You need to use xmodmap to assign one or more keys to the Meta_L and
Meta_R keysyms and then assign these same keys to a free modifier bit.
If you chose to use the Alt keys as both Meta and Alt keys, then
one possible sequence to do this is:
% xmodmap -e "keysym Alt_L = Alt_L Meta_L" -e "keysym Alt_R = Alt_R Meta_R"
(assuming Alt is already assigned as a modifier key).

JSPARKES%BNR.CA@MITVMA.MIT.EDU (Jeffrey Sparkes, J.D.) (07/21/90)

> >     What is the difference between Alt and Meta in Xt translations?
>
> They are (just) different pairs of KeySyms; no special meaning is attached
> to either.  There is also an abbreviation symbol ("$") which can be
> used in a key sequence to indicate that the modifier key assigned to
> Meta_L or Meta_R must be asserted.  No such abbreviation exists for Alt_*.
> >
> >     My
> >     NCD X terminal defines Alt_L and Alt_R, but it seems that xedit uses
 Meta
>  in
> >     it translation table, so it doesn't work.
> >
> > You need to use xmodmap to assign one or more keys to the Meta_L and
> > Meta_R keysyms and then assign these same keys to a free modifier bit.
> > If you chose to use the Alt keys as both Meta and Alt keys, then
> > one possible sequence to do this is:
> > % xmodmap -e "keysym Alt_L = Alt_L Meta_L" -e "keysym Alt_R = Alt_R Meta_R"
> > (assuming Alt is already assigned as a modifier key).
> >
>
 	I didn't want to have to rely on xmodmap to make my application
work.  What I ended up doing was specifying translations like "Mod1<Key>..",
which worked fine.  I.e NCD maps Alt_[LR] to mod1, and the sun Xservers maps
Meta_[LR] to mod1.