LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   capture keyboard event (https://www.linuxquestions.org/questions/linux-software-2/capture-keyboard-event-756661/)

minge.zu 09-20-2009 10:50 PM

capture keyboard event
 
Hi,everyone,
I want to capture keyboard event in my application.The detail is:

void my_kbd_ev_handler()
{
...
}

int main(void)
{

...
//register my handler for specified key event.
register_keyboard_event_cb(MY_INTERESTED_KEY_CODE,my_kbd_ev_handler);
...
}

as above,I want to know how to implement the function 'register_keyboard_event_cb',any advices are appreciated!

lutusp 09-22-2009 07:34 PM

Quote:

Originally Posted by minge.zu (Post 3691150)
Hi,everyone,
I want to capture keyboard event in my application.The detail is:

void my_kbd_ev_handler()
{
...
}

int main(void)
{

...
//register my handler for specified key event.
register_keyboard_event_cb(MY_INTERESTED_KEY_CODE,my_kbd_ev_handler);
...
}

as above,I want to know how to implement the function 'register_keyboard_event_cb',any advices are appreciated!

The method depends on the language. You don't say what language you are programming in.

"The detail is: ..."

No. If you can't bring yourself to say what computer language you're using, you haven't provided details.

minge.zu 09-22-2009 08:21 PM

Quote:

Originally Posted by lutusp (Post 3693541)
The method depends on the language. You don't say what language you are programming in.

"The detail is: ..."

No. If you can't bring yourself to say what computer language you're using, you haven't provided details.

thank you.
I use C language.


All times are GMT -5. The time now is 07:45 PM.