[comp.windows.x] Keykaps??

lmjm@doc.ic.ac.UK (05/01/87)

I was just asked if it is possible to write an application in X which
is sort of similar to the keykaps of the Macintosh.  It has a window
which represents the keyboard and when the image of a key is clicked
in it it simulates that key event so that the focused window thinks
that key has actually been presed.

I could not think of any way of doing this under X.V10 - or X.V11 for
that matter.  Since it would be very useful to be able to do this if
you get a package that presumes the full lk201 keyboard I was
wondering if anyone out there could tell me how to do this.

	Lee
--
UKUUCP SUPPORT  Lee McLoughlin
	"What you once thought was only a nightmare is now a reality!"

Janet: lmjm@uk.ac.ic.doc, lmcl@uk.ac.ukc
DARPA: lmjm@doc.ic.ac.uk (or lmjm%uk.ac.ic.doc@cs.ucl.ac.uk)
Uucp:  lmjm@icdoc.UUCP, ukc!icdoc!lmjm

jg@jumbo.dec.com (Jim Gettys) (05/01/87)

In article <8705011421.a012964@ivax.doc.ic.ac.uk> lmjm@doc.ic.ac.UK writes:
>I was just asked if it is possible to write an application in X which
>is sort of similar to the keykaps of the Macintosh.  It has a window
>which represents the keyboard and when the image of a key is clicked
>in it it simulates that key event so that the focused window thinks
>that key has actually been presed.

Under V10 it is not possible.

Under V11 you could do this under some window management styles (any in
which the keyboard input focus is under control of/set by a window manager)
by using SendEvent.  You would have problems under a window manager which
does not handle input focus control, as you would not know where to send
the event.
				- Jim

karlton@decwrl.DEC.COM (Philip Karlton) (05/02/87)

In article <792@jumbo.dec.com> jg@jumbo.UUCP (Jim Gettys) writes:

>Under V11 you could do this under some window management styles (any in
>which the keyboard input focus is under control of/set by a window manager)
>by using SendEvent.  You would have problems under a window manager which
>does not handle input focus control, as you would not know where to send
>the event.
>				- Jim

Under V11, if the SendEvent is indirected through "InputFocus", the event will
be delivered to the window actually owning the input focus.

PK