Subramaniam Narayanan wrote:
> Hi,
>  
> I am adding another device to capture events. As part of this, I am
> trying to hook up GUI events(like up/down/arrow keys) coming from my
> device to GTK. I cannot use the existing input handlers. So far what I
> am doing is the following: 
> 
> *     In inputdrivers/keyboard.c file, function driver_open_device, I
> register my custom callback functions with my device driver user level
> interface module. I remove everything else in the function. Similarly, I
> remove the default implementation is functions: driver_get_keymap_entry,
> driver_close_device, driver_get_keymap_entry. These functions now just
> return the default DFB_OK return value. I understand this is probably a
> hack, but this was the fastest way to use existing code without
> modifying any makefiles or config files. 

Did you also remove this?

     info->desc.min_keycode = 0;
     info->desc.max_keycode = 127;


> *     In my custom handler, I fill a DFBInputEvent local variable,
> evt, with(in this example, the event I want to send to GTK is the down
> keypress): 
> 
>       evt.key_id = DIKI_DOWN; evt.type = DIET_KEYRELEASE; evt.flags =
> DIEF_KEYCODE | DIEF_KEYID; evt.key_code = DIKS_CURSOR_DOWN;

Please remove DIEF_KEYCODE and evt.key_code setting.

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to