esp@heawk1.gsfc.nasa.gov ( Pandurang Summer 1990 ) (12/12/90)
HOw does one map a given key to a string of symbols in X-11? For example, I would like to bind the key labeled F1 on a SUN workstation to send out the string "hello". I tried xmodmap, but it assigns only one character to a key. Please email to esp@heasfs.gsfc.nasa.gov - E.S.P. -
mouse@LARRY.MCRCIM.MCGILL.EDU (12/19/90)
> HOw does one map a given key to a string of symbols in X-11? > For example, I would like to bind the key labeled F1 on a SUN > workstation to send out the string "hello". In general, you can't. As you discovered, xmodmap rearranges keys, rather than assigning meanings to keys. Some clients (those that use Xt?) accept a translations resource which can usually specify this sort of thing; for example, something like the folliwing works for xterm in a simple test I just ran using the -xrm option: xterm*VT100.Translations: #override <Key>F1: string(hello) There is no general way, working across all clients, though. You could use *Translations: #override <Key>F1: string(hello) but that (a) doesn't let you further customize on an application-specific basis and (b) works only for clients that specifically deal with it (which may be automatic for the toolkit used, but that's beside the point). I have been thinking of various possible ways to deal with this problem and have a couple of ideas I want to implement, but haven't gotten around to actually doing anything yet.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu