Virtual keyboard on Nitpicker

Norman Feske norman.feske at ...1...
Tue May 23 11:49:08 CEST 2017


Hi Johannes,

> we want to create a virtual keyboard for touch screen devices. This
> shall be done by letting the keyboard provide an input service.
> The problem here is that Nitpicker only provides input to the currently
> active client. Since the keyboard needs to receive input events from the
> touch screen, with this policy it would also receive its own sent keys.
> We need a way to send these keys to another client while still receiving
> further touch input.
> How can this be done without compromising current security mechanism or
> creating unnecessary large pieces of trusted code?

that's an interesting problem. Thanks for bringing it up!

I guess that you are already using the input filter to feed the virtual
keyboard's events back to nitpicker?

Nitpicker's focus policy can be configured depending on the client's
label. Usually, the "click" policy is in effect, which means that a
click event implicitly changes the focus to the clicked-on client.
However, this policy is not always desired, like in your case or when
implementing a global menu. In the latter case, one wants to let the
menu handle a click yet retain the original focus. To accommodate such
scenarios, nitpicker supports the so-called "transient" focus policy
(documentation at [1]). If such a client is clicked-on, it receives the
press event and all subsequent events until all buttons/keys are released.

[1]
https://github.com/genodelabs/genode/blob/staging/repos/os/src/server/nitpicker/README#L105

I think that the transient focus policy is the right tool for your use
case if your virtual keyboards delivers its artificial events after the
release event (otherwise, nitpicker would send the artificial event to
the virtual keyboard which still has the transient focus).

For a practical example for configuring the transient focus feature,
please have a look at the gems/run/launcher.run script.

I'd be very interested in how this approach works for you. We previously
discussed on the list [2] that nitpicker's focus handling is still
somewhat limited. So your experience may give me valuable input for
possibly refining it.

[2]
https://sourceforge.net/p/genode/mailman/genode-main/thread/1a5cd577-1e4c-baea-8e83-8bb67e87bcb1%40nlcsl.com/#msg35798917

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list