Denis Oliver Kropp wrote:
> Ville Syrjälä wrote:
>
>> On Tue, Aug 07, 2007 at 09:57:31AM +0200, Mickael Istria wrote:
>>
>>> Hello,
>>>
>>> I am trying to install DirectFB on an ARM phone using a recent Linux
>>> kernel (2.6.19 as far as I remember).
>>> I have a problem with input.
>>>
>>> Indeed, I activate linuxinput driver for my keypad (which uses
>>> /dev/input/event0 device), and I disable keyboard module.
>>> When I run any program using DirectFB, I have both following lines which
>>> make me hope that everything is right:
>>>
>>> (*) Direct/Thread: Running 'Linux Input' (INPUT, 215)...
>>> (*) DirectFB/Input: PNX5220 Keypad 0.1 (directfb.org)
>>>
>>> But dfbinfo returns me that he only see output for the display, and can
>>> not see any input (whereas there is this keypad).
>>>
>> The problem is that linuxinput fails to classify the device. It's not
>> really a keyboard as far as linuxinput is concerned since it doesn't
>> have enough alphabetic keys, nor does it think it is a remote control.
>> I'm not sure which classification would be more appropriate, or maybe we
>> should add DIDTF_KEYPAD?. The most important issue is the missing
>> DICAPS_KEYS. Without some caps the device is never enumerated (it is
>> registered to the input core though and thus wastes some memory).
>>
>
> Another type is a good idea. I think a keyboard is something lets
> you type text or use a console. Keypads are subsets, e.g. numeric,
> or front panels with cursor keys and OK, probably Channel Up/Down,
> which could lead DirectFB to think of it as a remote, right?
>
> Anyhow, it should have DICAPS_KEYS at least, as you mentioned.
>
>
Indeed, a keypad is a kind of keyboard with the same kind of keys than a
remote.
A subset of input is an interesting idea, I think too. This subset
should contain device which use DICAPS_KEYS.
I think something like that could be better:
/* Devices using KEYS */
if (num_keys > 0 || num_ext_keys > 0)
{
info->desc.caps |= DICAPS_KEYS;
/* a keyboard */
if (num_keys > 20) /* or any other condition that defines a keyboard */
info->desc.type |= DIDTF_KEYBOARD;
else if (num_ext_keys > 0) /* or any other condition that defines a
remote */
info->desc.type |= DIDTF_REMOTE;
else if ( /* eg matches numbers from 0 to 9 */) /* or any other
condition that defines a keypad */
info->desc.type |= DIDTF_KEYPAD; // to define
else
info->desc.type |= DIDTF_UNKNOWN; // to define
}
Do you think it would be a solution?
Mickael Istria
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users