Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Apr 1999 19:24:58 +1000
From:      David Dawes <dawes@rf900.physics.usyd.edu.au>
To:        Randy Bush <randy@psg.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: flag and alt as meta in X
Message-ID:  <19990404192458.D23716@rf900.physics.usyd.edu.au>
In-Reply-To: <m10Tfzb-0008G4C@rip.psg.com>; from Randy Bush on Sat, Apr 03, 1999 at 10:02:47PM -0800
References:  <randy@psg.com> <m10SvsV-0008G4C@rip.psg.com> <199904021741.MAA05858@po1.bbn.com> <m10Tfzb-0008G4C@rip.psg.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 03, 1999 at 10:02:47PM -0800, Randy Bush wrote:
>>> how can i make the billy-flag-keys and the alt keys all act as meta in open
>>> mode (pc3), xterms, and emacs?
>> Here's what I do, I think it's even the right thing.  The
>> first two lines change the misplaced CAPS LOCK key to CTRL,
>> as it should be.
>> 
>> In .xsession, I have
>> 	xmodmap .Xmodmap-FreeBSD
>>
>> and .Xmodmap-FreeBSD contains
>> clear lock
>> add control = Caps_Lock
>> clear mod4
>> add mod1 = Meta_L
>> add mod1 = Meta_R
>
>this seems to have changed nothing.  
>
>i already had caps-lock and control mapped to control, using /etc/XF86Config
>
>    Section "Keyboard"
>       Protocol        "Standard"
>       AutoRepeat      500 30
>       LeftAlt         Meta
>       RightAlt        Meta
>       ScrollLock      Compose
>       RightCtl        Control
>       XkbKeycodes     "xfree86"
>       XkbTypes        "default"
>       XkbCompat       "default"
>       XkbSymbols      "us(pc101)"
>       XkbGeometry     "pc"
>       XkbRules        "xfree86"
>       XkbModel        "pc104"
>       XkbLayout       "us"
>       XkbOptions      "ctrl:nocaps"
>    EndSection

That is somewhat over-specifying things.  The XKB settings should override
the old LeftAlt & co stuff.  Also, for xkb, it is recommended to use only
XkbRules, XkbModel, XkbLayout, XkbVariant, XkbOptions.  Those settings are
mapped to the others via the rules map specified with XkbRules.
I'm not sure which takes precedence when you mix them.  For example,
XkbModel "pc104" implies XkbSymbols "us(pc104)", not "us(pc101)".

The mappings for the keys in question from the "pc104" section of
/usr/X11R6/lib/X11/xkb/symbols/us are:

// definition for the extra keys on 104-key "Windows95" keyboards
xkb_symbols "pc104" {   
    include "us(generic101)"    
    key <LALT> {        [       Alt_L           ]       };
    key <RALT> {        [       Alt_R           ]       };
    key <LWIN> {        [       Meta_L          ]       };
    key <RWIN> {        [       Meta_R          ]       };
    key <MENU> {        [       Menu            ]       };
    
    // modifier mappings
    modifier_map Mod1   { Alt_L, Alt_R };
    modifier_map Mod4   { Meta_L, Meta_R };
};  


>what's funny is that my desktop with a 104 key keyboard has 
>  ALT  == meta for tvtwm control
>  flag == meta in emacs and xterm
>
>my sony laptop with 101 keyboard has 
>  ALT == meta for tvtwm, emacs, and xterm

The pc101 mapping is:

default
xkb_symbols "pc101" { 
    include "us(generic101)"
    key <LALT> {        [       Alt_L,  Meta_L          ]       };
    key <RALT> {        [       Alt_R,  Meta_R          ]       };
    
    // begin modifier mappings
    modifier_map Mod1   { Alt_L, Alt_R, Meta_L, Meta_R };
};  

That should give you an idea of why they are different.

David


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990404192458.D23716>