[comp.windows.x] Question about DecWindows and KeyPress Event

mking@lll-crg.llnl.gov (Marianne King) (10/22/90)

I am experimenting with the KeyPress event.  I set up the event handler
by calling XtAddEventHandler with the KeyPressMask.  When I run my
program on a Sun and I press a key, the event is recognized.  My
problem occurs when my client machine is a Sun and my server machine is
a DecStation 3100 running Ultrix 4.0 and DecWindows.  It doesn't seem
to recognize the event when I press a key.  (Note:  I tried the
ButtonPressMask to see if I was setting up my event handler correctly
and the ButtonPress event was recognized.)  I have noticed in the past
that DecWindows behaves a little differently.  I'm wondering if the
problem I'm having is unique to DecWindows.  If so, I'd like to know
why.

Thanks in advance.

Marianne King
mking@lll-crg.llnl.gov
Lawrence Livermore National Laboratory
(415) 423-4116

klee@wsl.dec.com (Ken Lee) (10/23/90)

In article <70157@lll-winken.LLNL.GOV>, mking@lll-crg.llnl.gov (Marianne King) writes:
|> I am experimenting with the KeyPress event.  I set up the event handler
|> by calling XtAddEventHandler with the KeyPressMask.  When I run my
|> program on a Sun and I press a key, the event is recognized.  My
|> problem occurs when my client machine is a Sun and my server machine is
|> a DecStation 3100 running Ultrix 4.0 and DecWindows.

XtAddEventHandler works properly for me.  Are you setting your input
hints properly?  ICCCM-complaint window managers require that it be set
for keyboard input to be reported.  Your Sun may have an older or
non-compliant window manager that ignores the input hint.

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

mouse@LARRY.MCRCIM.MCGILL.EDU (10/24/90)

> I am experimenting with the KeyPress event.  I set up the event
> handler by calling XtAddEventHandler with the KeyPressMask.  When I
> run my program on a Sun and I press a key, the event is recognized.
> My problem occurs when my client machine is a Sun and my server
> machine is a DecStation 3100 running Ultrix 4.0 and DecWindows.  It
> doesn't seem to recognize the event when I press a key.  (Note:  I
> tried the ButtonPressMask to see if I was setting up my event handler
> correctly and the ButtonPress event was recognized.)

I feel sure the problem is that you aren't setting up the input hint
correctly, and that the window manager running on the Sun lets you get
away with this while the window manager on the DECstation doesn't.

See the ICCCM, section 4.1.7 in particular and sections 4.2.7 and 6.1
for more information.

See also the XWMHints structure documentation in the Xlib document.

					der Mouse

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