[haiku-development] Re: Keyboard Events

Hi stephan,

I managed to capture the keys i want, but there seems to be a delay between
the time the key is pressed and the time Haiku responds.
I tried to print out the keys as i press them, the key codes come up in the
console a second or so after i let go of the key.. any idea why it is doing
this?

Regards,

Mohmed

On Thu, Jul 24, 2008 at 7:41 PM, Stephan Assmus <superstippi@xxxxxx> wrote:

> Hi,
>
> Mohmed Hammassani wrote:
> > Is it possible to capture keyboard events in Dsektop.cpp like capturing
> > the mouse events in the switch case statements? Where in the keyboard
> > filter methods is it possible to do that?
>
> The pressed keys and modifiers are in the message. You can do
> message->PrintToStream() to have a look what is inside. It's probably
> easiest if you read the documentation in the BeBook (link from our site,
> Documents section) about BMessage on how to extract information
> (FindString(), FindInt32()...). The message should contain the raw key code
> as well as the key according to the current keymap.
>
> Best regards,
> -Stephan
>
>

Other related posts: