home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14384 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.9 KB  |  43 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
  3. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  4. Subject: Re: Changing keymappings on a per-application basis
  5. Message-ID: <1992Jul25.105111.7867@thunder.mcrcim.mcgill.edu>
  6. Organization: McGill Research Centre for Intelligent Machines
  7. References: <FMRCO!MSOMMER.92Jul21101441@ampere.uunet.uu.net>
  8. Distribution: na
  9. Date: Sat, 25 Jul 92 10:51:11 GMT
  10. Lines: 32
  11.  
  12. In article <FMRCO!MSOMMER.92Jul21101441@ampere.uunet.uu.net>, fmrco!msommer@uunet.uu.net (Mark Sommer) writes:
  13.  
  14. > I would like to run a terminal-based application, requiring special
  15. > keyboard keypad mappings, inside an xterm.
  16.  
  17. > Is there a way to change the keyboard mappings -- and later restore
  18. > them -- for a single xterm?  I would like to be able to do this from
  19. > a script, but would settle for doing it from a program.  It would
  20. > also be reasonable to dedicate a particular xterm to running this
  21. > application -- as opposed to an arbitrary xterm -- if that makes the
  22. > problem tractable.
  23.  
  24. You might look at the Translations mechanism for xterm, and load up
  25. your dedicated xterm with lots of translations to get the effect you
  26. want.
  27.  
  28. As for doing it for an arbitrary xterm, if you don't use translations
  29. for anything else, you may be able to do something useful with keymaps.
  30. I don't know much about them, just that I've seen them mentioned on the
  31. net as something interesting to do with changing translations.
  32.  
  33. If you're really determined to change the mapping in the xmodmap sense,
  34. you want to either use xmodmap and the sed/awk/whatever script you
  35. hinted at, if you're doing it from a shell script, or the
  36. XGetKeyboardMapping and XChangeKeyboardMapping calls, if you're doing
  37. it from a program.  (Deciding when to do it will probably not be
  38. simple, unless you hack on xterm to do it when it thinks it has focus.)
  39.  
  40.                     der Mouse
  41.  
  42.                 mouse@larry.mcrcim.mcgill.edu
  43.