LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2008, 12:52 PM   #1
kalleanka
Member
 
Registered: Aug 2003
Location: Mallorca, Spain
Distribution: xubuntu
Posts: 551

Rep: Reputation: 38
X and keyboard events?


Im confused with the naming of the events. Is the xkeymapevent catching keystroks from the keyboard?
 
Old 03-11-2008, 08:26 PM   #2
mirsoft
LQ Newbie
 
Registered: Oct 2007
Posts: 15

Rep: Reputation: 0
I think no. the KeymapNotify event received when EnterNotify or FocusIn event happend before.

mirsoft
 
Old 03-11-2008, 09:03 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to log the mouse and keyboard events sridhar_yerram Linux - Newbie 0 10-15-2007 12:04 AM
Keyboard and mouse events Soltis Linux - General 3 03-23-2005 09:25 AM
Registering Keyboard events on C++, not cin >> poeta_boy Programming 5 10-05-2004 09:55 AM
Mouse& keyboard events mvillarino Programming 0 05-27-2004 11:49 AM
Keyboard events under GNOME Dj Supreme Programming 1 02-13-2004 04:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration