[comp.windows.x] Multikey maps from xmodmap?

brooks@maddog.llnl.gov (Eugene Brooks) (03/05/90)

Can xmodmap be used to generate multikey events from the
function keys?  I have used xmodmap to map backspace and delete
keys suitably, but the manual page does not clearly indicate how
to map a string ":w[return]" to way the F1 key, or ":!make[return]"
to the F2 key.  Can you do this easily in R3?  In R4?

brooks@maddog.llnl.gov, brooks@maddog.uucp

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (03/05/90)

> Can xmodmap be used to generate multikey events from the function
> keys?

No.

> I have used xmodmap to map backspace and delete keys suitably, but
> the manual page does not clearly indicate how to map a string
> ":w[return]" to way the F1 key, or ":!make[return]" to the F2 key.
> Can you do this easily in R3?  In R4?

Clients have to do this sort of thing themselves.  Unfortunately, there
is no way provided to make a mapping like this across all clients.
Individual clients have individual ways - generally through resources
like xterm's translations (or is that Translations?) resource - but
nothing for everybody.

I'm trying to come up with something to address this problem, but don't
have a whole lot of time to dwell on it.  If and when I do, I'll
implement it and try it out, and if it turns out well I'll post it for
everyone to pick apart :-).

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

klee@wsl.dec.com (Ken Lee) (03/06/90)

In article <50962@lll-winken.LLNL.GOV>, brooks@maddog.llnl.gov (Eugene
Brooks) writes:
> Can xmodmap be used to generate multikey events from the
> function keys?

No.  xmodmap changes the keycode to keysym mapping, which only affects
one character at a time.  To map keystrokes to strings, you should use
the facilities of your terminal emulator (e.g., xterm).  Most provide
some some way of doing this, especially for function keys.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee

capitain.pad@nixpbe.uucp (Pit Capitain) (03/06/90)

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) writes:

> [stuff about multikey events with xmodmap deleted]

>Individual clients have individual ways - generally through resources
>like xterm's translations (or is that Translations?) resource - but
>nothing for everybody.

I couldn't find anything about `xterm translations' in our manuals.
Is this an undocumented feature or simply missing on our release?
(We have X11 R2 on an IBM with SCO UNIX 386.)

Thanks for any information,	Pit

+-----------------------+---------------------------------------------------+
!  Pit Capitain, DX-PC  !  US:  ...uunet!philabs!linus!nixbur!capitain.pad  !
!  Nixdorf Computer AG  !  not US:    ...{mcvax!}unido!nixpbe!capitain.pad  !
+-----------------------+---------------------------------------------------+

hvr@kimba.Sun.COM (Heather Rose) (03/08/90)

In article <9003050635.AA04312@Larry.McRCIM.McGill.EDU> mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) writes:
>> Can xmodmap be used to generate multikey events from the function
>> keys?
>
>No.
>
>> I have used xmodmap to map backspace and delete keys suitably, but
>> the manual page does not clearly indicate how to map a string
>> ":w[return]" to way the F1 key, or ":!make[return]" to the F2 key.
>> Can you do this easily in R3?  In R4?
>
>Clients have to do this sort of thing themselves.  Unfortunately, there
>is no way provided to make a mapping like this across all clients.
>Individual clients have individual ways - generally through resources
>like xterm's translations (or is that Translations?) resource - but
>nothing for everybody.
>
>I'm trying to come up with something to address this problem, but don't
>have a whole lot of time to dwell on it.  If and when I do, I'll
>implement it and try it out, and if it turns out well I'll post it for
>everyone to pick apart :-).

You might be interested in the implementation of function key mapping in
the XView packages:  ttysw, textsw.  This provides mapping for all XView
objects based upon these classes.

Regards,

Heather