Re: Simulation of key presses and skins/engines



En/na Murray Cumming ha escrit:
> On Tue, 2007-05-15 at 17:36 +0200, Joaquim Duran wrote:
>> Dear all,
>>
>> I've two questions about gtk/gtkmm:
>>
>> 1 - In the application that we've developing, we use a customized keypad
>> for used input. We haven't any kernel drive, so we have developed
>> functions to read the key presses from user space. I would like to know
>> if it is possible to generate key-pressed events in GTKmm, as if they
>> have been received from X server.
> 
> Maybe you could mention more about how this keypad should look or
> behave. I suspect that you really need a custom "GTK+ Input Method".
> 
> If it's a multi-press keypad then you might just be able to use the
> multipress input method that I mention here:
> http://www.murrayc.com/blog/permalink/2006/12/22/creating-gtk-input-methods/

The keyboard it is a capacitive keyboard consisting of 20 keys. I've
adapted a very simple SPI driver to access to him, but the driver
(management commands, et al ) are implemented in user space. The access
to keymap is doing polling (so threads of timers in input method should
be used).

The keyboard is a multikey and the client is interested in use short key
press and long key presses.

The keymap returns a bitmap with the keys pressed, from here I create a
vector<uint8_t> with the key pressed ordered. I was thinking to create a
map of pair<vector of keys, pressed_time> to 'X11 key code'.

What do you think about that?

>> 2 - Could someone tell me the difference between 'theme' (or 'skin') and
>> 'theme engine' ?
> 
> I think that themes use features in specific theme engines.
> Here's a relevant document that I found:
> http://www.gtk.org/~otaylor/gtk/2.0/theme-engines.html
> 

I've taken a fast look. It looks like that it I was looking for.

Joaquim Duran



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]