[haiku-development] Re: Keyboard Events

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: