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