Stefano Babic wrote:
> Daniel J Laird wrote:
>> I have built GTK 2.12.9 on top of DirectFB 1.2.4 and all looks very
>> nice. I have plugged in a USB keybaord and mouse. The mouse works
>> fine (pointer, clicking etc) however I cannot get a usb-keyboard to
>> work at all however the keyboard is detected and works with df_input.
>>
>>
>> Any clues as to what I might need to do in my environment (env
>> variable, directfbrc file) to solve this. Does anyone have any
>> similar issues?
> 
> I have a similar issue, but I am working with a different environment. I
> am using an embedded system with DirectFB 1.1 anf GTK 2.10. I have no
> mouse, only a small keyboard that works with DirectFB (I have no problem
> with df_input, too).
> 
> However, I cannot use the keyboard inside a GTK application. Everything
> is correctly displayed, nut no chance up now to get it working.

The problem with the GDK-DirectFB keyboard code is the dependency on a proper
key map provided by the primary keyboard device. The keyboard device driver
has to send hardware key codes and provide a mapping from each code to up to
four different symbols depending on lock states (Shift+AltGr). DirectFB does
not provide a key map if the driver doesn't do, but it translates between key
identifiers and key symbols and does the key code to symbol lookup if there's
a map. If there's no key code sent by the driver, there won't be a key code in
the event sent to GDK-DirectFB. Check src/core/input.c for more details.

GDK-DirectFB flaws:
- only queries the primary keyboard for a map
- does not support devices without a map properly
- crashes if there's no keyboard at all (maybe fixed)

I started working on a static key map within GDK-DirectFB to support simple
remote controls or other devices without a map provided by the driver.

Maybe you like to play with it,
but I think the real fix should be done in DirectFB:

- generate simple key map if none available
- use key identifiers as key codes if none available
- allow changes to a key map via API

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to