LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   X and keyboard events? (https://www.linuxquestions.org/questions/programming-9/x-and-keyboard-events-627290/)

kalleanka 03-11-2008 12:52 PM

X and keyboard events?
 
Im confused with the naming of the events. Is the xkeymapevent catching keystroks from the keyboard?

mirsoft 03-11-2008 08:26 PM

I think no. the KeymapNotify event received when EnterNotify or FocusIn event happend before.

mirsoft

paulsm4 03-11-2008 09:03 PM

Hi -

Here's an example:
http://www.gmonline.demon.co.uk/cscene/CS8/xlib-2.c

To receive events (e.g. a "Button Press"), you must first call XSelectInput() with one or more masks (e,g, "ButtonPressMask"), and then check for all events you requested (e.g. with "XNextEvent()").

A "keymapevent" occurs when focus returns to a window (for example). It doesn't mean "a key has been pressed". Rather, it means "you can start pressing keys in this window". Or "you can't press keys anymore", if you've lost focus in that window.

Here's a link that might clarify:
http://tronche.com/gui/x/xlib/events/key-map.html

'Hope that helps .. PSM


All times are GMT -5. The time now is 09:47 AM.