nanogui: about nanowm


Previous by date: 22 Feb 2001 13:32:42 -0000 Re: about nanowm, xiang lee
Next by date: 22 Feb 2001 13:32:42 -0000 How to get the smallest code size with mipsel-linux-gcc, Robert Hartley
Previous in thread: 22 Feb 2001 13:32:42 -0000 Re: about nanowm, xiang lee
Next in thread: 22 Feb 2001 13:32:42 -0000 Re: about nanowm, Jordan Crouse

Subject: Re: about nanowm
From: Alex Holden ####@####.####
Date: 22 Feb 2001 13:32:42 -0000
Message-Id: <Pine.LNX.4.04.10102221255370.11593-100000@www.linuxhacker.org>

On Thu, 22 Feb 2001, [gb2312] xiang lee wrote:
>  Sorry,maybe i cann't call it "hotbutton control"
> I means that an application which can receive a
> message from hardware button(like PALM Vx ) and send 
> a event to the nanowm,in this way the hardware button

I see. I would try to implement something similar to drivers/kbd_ipaq.c
which reads the button device and generates a keyboard event with a
special key code when the button is pressed. This will be a little more
difficult if your hardware has an ordinary keyboard (PS2 or whatever) as
well- in that case you'll have to monitor three inputs instead of the
usual two. If your button device doesn't have a kernel driver and you're
monitoring a memory bit via /dev/mem or something, you'll need to do
something a little more complicated. As you may know, you can't get
interrupts in user space so you'll have to poll it even if your hardware
is physically capable of generating an interrupt on the key press (which
is one good reason to implement a kernel driver instead). The easiest way
to do that is to use the register a timer callback with GdAddTimer() which
checks if the button status has changed, emits a keyboard event with
GsDeliverKeyboardEvent() if it has, then re-registers itself.

The problem I see with this is that you want the button press to always go
to the window manager, but the way the keyboard event currently works is
that only one window ever gets a particular key event. Arguably it would
be better to fix this properly rather than trying to work around it
somehow, though I can't see any particularly "nice" solutions to it. What
we probably want is some way for a window to say "when you get a key event
with this combination of key code and modifiers, send it to me regardless
of where the input focus is". That way applications like the window
manager can register "hot key" combinations which will work regardless of
whether another window has the current input focus or not. 

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/


Previous by date: 22 Feb 2001 13:32:42 -0000 Re: about nanowm, xiang lee
Next by date: 22 Feb 2001 13:32:42 -0000 How to get the smallest code size with mipsel-linux-gcc, Robert Hartley
Previous in thread: 22 Feb 2001 13:32:42 -0000 Re: about nanowm, xiang lee
Next in thread: 22 Feb 2001 13:32:42 -0000 Re: about nanowm, Jordan Crouse


Powered by ezmlm-browse 0.20.