[comp.windows.x] Modifying Keyboard Mappings

hogan@csl.sri.com (Emmett Hogan) (02/08/91)

	I am attempting to modify the keyboard mappings with xmodmap
and I'm running into a slight problem...I cannot seem to redefine the
control+key combination (i.e. control =), I have been able to redefine
the unshifted =, and the shifted =, but not control =, or meta =.  I
checked the FrequentlyAskedQuestions file on expo, but the only
reference to remapping keys was to use the Xterm*Translations
resource, but I would like to redefine some keys for ALL applications,
not just my xterm's.  Does anyone have either the answer to my problem
or maybe a pointer to the right FM for me to R?

	While we are talking about xmodmap, what do the fourth,
fifth, etc...columns in the "xmodmap -pk" display refer to?  For example,
if I do:
-------------------------------------------------------------------------
> xmodmap -e "keysym equal = parenleft parenright underscore asterisk"
> xmodmap -pk
There are 4 KeySyms per KeyCode; KeyCodes range from 8 to 132.

    KeyCode  Keysym (Keysym) ...
    Value    Value   (Name)  ...

      8      0xffc8 (F11)
      9
     10      0xffc9 (F12)
	.
	.
	.[output removed]
	.
     48      0x0028 (parenleft)  0x0029 (parenright) 0x005f (underscore) 0x002a (asterisk)
	.
	.
	.[output removed]
	.
--------------------------------------------------------------------------
I understand that Keycode Value 48 is the "equal" key, the second
column is the keycode for the unshifted equal, and the third column is
for the shifted equal, but what do the other columns represent?
Again, pointers to TFM, are more than welcome, but the xmodmap man
page is a little lacking in info about this one (or I'm just not
reading it correctly).


Thanks in advance,
Emmett



--
-------------------------------------------------------------------
Emmett Hogan              Computer Science Lab, SRI International
Inet: hogan@csl.sri.com
UUCP: {ames, decwrl, pyramid, sun}!fernwood!hercules!hogan
USMAIL: EL231, 333 Ravenswood Ave, Menlo Park, CA  94025
PacBell: (415)859-3232 (voice), (415)859-2844 (fax)
ICBM: 37d 27' 14" North, 122d 10' 52" West
-------------------------------------------------------------------

ridge@lake.Eng.Sun.COM (Ridge McGhee) (02/08/91)

In article <HOGAN.91Feb7120646@trollope.csl.sri.com>, hogan@csl.sri.com (Emmett Hogan) writes:
> 
> 	I am attempting to modify the keyboard mappings with xmodmap
> and I'm running into a slight problem...I cannot seem to redefine the
> control+key combination (i.e. control =), I have been able to redefine
> the unshifted =, and the shifted =, but not control =, or meta =.
>
> 	.[output removed]
> 	.
>      48      0x0028 (parenleft)  0x0029 (parenright) 0x005f (underscore) 0x002a (asterisk)
> 	.
> 	.[output removed]
> 	.
> I understand that Keycode Value 48 is the "equal" key, the second
> column is the keycode for the unshifted equal, and the third column is
> for the shifted equal, but what do the other columns represent?
> 

Currently, there is no provision for mapping a desired keysym to a
desired keycode plus modifier (or combination of modifiers).  This
is left up to the toolkit or application program.  If Mode_switch
(actually, the keycode associated with the Mode_switch keysym) is
installed in the modifier map, it is used to select the third and
fourth columns (or fourth and fifth using your numbering scheme).
Many non-US keyboards (e.g., European, Japanese) have some keys with
three (sometimes four) symbols on the keycaps.  These symbols often
appear on the right half of the keycap.  The Mode_switch modifier
is used to select the right-hand side symbols.

Ridge

--
Ridge McGhee
rmcghee@sun.com