SUMMARY: xterm keymap() in .Xdefaults

From: Bob Rahe (bob@hobbes.dtcc.edu)
Date: Mon Nov 16 1998 - 15:07:19 CST


First of all, thanks to the (only!) two responders:
 Harvey Wamboldt <harvey@iotek.ns.ca> and Casper Dik <casper@holland.Sun.COM>

  Harvey ran thru some reality checks and theories with me, also explained
a bit how this all works. Casper essentially said - "works for me." (On
Solaris 7). Unfortunately no solutions.

  But armed with a bit more info from Harvey I went back to the
answerbook and found in the man page on xterm a short blurb at the end
on using the keymap() action (which I'd read before.) I actually tried
doing MY keymap stuff that way and, of course, it didn't work (with a
leading "*"). But I did notice one thing, it looked like you needed
BOTH the 'vt100' AND the keymap name (also vt100 in my case). I.e.
instead of the line:

     XTerm*vt100.translations: #override \
        !Shift <Key>R1: keymap(vt100)
     XTerm*vt100Keymap.translations: #override \ <<---------
...

 It seemed like it ought to read:

     XTerm*vt100.vt100Keymap.translations: #override \ <<----------
           ^^^^^^
...

  Made that change in my .Xdefaults and walllah! Works fine. It would
SEEM that the "*" should cover it but who knows. Works now so I won't
argue with it. (Btw, R1 on a type 5 kbd, to save you running xev, is
the pause/ break key - just above the page-up key).

  Thanks again to Harvey and Casper for twitching the brain cells....

Original message below:

-------------------------------------------------------------------------
Date: Thu, 12 Nov 1998 09:16:42 EST
To: sun-managers@sunmanagers.ececs.uc.edu
Subject: xterm keymap() in .Xdefaults

  Well, I've searched the archives and found a few messages on the
subject but none seem to have the this problem and none seem to have
any clues as to what I could try. (And most are at least 3 years
old!) Same with sunsolve. Various descriptions of how to do this
stuff but nothing on how to fix this problem.

The problem is trying to set up key mapping within an xterm on
Solaris 5.5.1 an Ultra 30 and a type 5 keyboard.

  This USED to work on my now-replaced SS2 on 4.1.3b so I'm a bit
confused as to what happened. Here's the .Xdefaults I'm using:

-------------------------------------

XTerm*vt100.translations: #override \
   !Shift <Key>R1: keymap(vt100)
XTerm*vt100Keymap.translations: #override \
   <Key>R4: string(0x1B) string("OP")\n\
   <Key>R5: string(0x1B) string("OQ")\n\
   <Key>R6: string(0x1B) string("OR")\n\
   <Key>F3: string(0x1B) string("OA")\n\
   <Key>F4: string(0x1B) string("OB")\n\
   <Key>F5: string(0x1B) string("OD")\n\
   <Key>F6: string(0x1B) string("OC")\n\
   <Key>KP_Subtract: string(0x1B) string("OS")\n\
   Shift<Key>KP_2: string(0x1B) string("B")\n\
   Shift<Key>KP_4: string(0x1B) string("D")\n\
   Shift<Key>KP_6: string(0x1B) string("C")\n\
   Shift<Key>KP_8: string(0x1B) string("A")\n\
   <Key>KP_0: string(0x1B) string("Op")\n\
   <Key>KP_1: string(0x1B) string("Oq")\n\
   <Key>KP_2: string(0x1B) string("Or")\n\
   <Key>KP_3: string(0x1B) string("Os")\n\
   <Key>KP_4: string(0x1B) string("Ot")\n\
   <Key>KP_5: string(0x1B) string("Ou")\n\
   <Key>KP_6: string(0x1B) string("Ov")\n\
   <Key>KP_7: string(0x1B) string("Ow")\n\
   <Key>KP_8: string(0x1B) string("Ox")\n\
   <Key>KP_9: string(0x1B) string("Oy")\n\
   <Key>KP_Decimal: string(0x1B) string("On")\n\
   <Key>KP_Add: string(0x1B) string("Ol")\n\
   <Key>R2: string(0x1B) string("Om")\n\
   <Key>KP_Enter: string(0x1B) string("OM")\n\
   !Shift <Key>R1: keymap(None)

-------------------------------------

  It seems that the 'keymap' directive flat out won't work. I've
tried moving some of the key defs up in front of the keymap line and
they do get mapped (i.e. they are ALWAYS mapped, so the .Xdefaults
file IS being read) and I've tried using a key like F3 as the switcher
key to no avail. It looks like the 'keymap(vt100)' just doesn't do
anything. It DID work under 4.1.3b.... (I also tried making the keymap
to (vt) instead of (vt100) with appropriate change to the next line...)

  Any ideas anyone? I realize it's not a huge problem but it's now
become an obsession(!) ;-)

  Thanks,

    Bob

p.s. Yes, I know there is no R4 key any more on a Type 5 keyboard and I'm
going to diddle the map when I can make it work at all. I've tried it without
that re-definition - no difference.

-------------------------------------------------------------------------

-- 
----------------------------------------------------------------------------
|Bob Rahe, Delaware Tech&Comm Coll. /                                      |
|Computer Center, Dover, Delaware /                                        |
|Internet: bob@dtcc.edu        /                                           |
----------------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:52 CDT