Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 11-20-2006, 02:33 PM   #1
LQ Newbie
Registered: Nov 2006
Posts: 22

Rep: Reputation: 15
Grabbing keyboard and mouse input

Hi guys,

I am trying to write a C program that will grab all keyboard and mouse input and do nothing with them until you press f9. Where my main problem is when you type certain combinations like: ctrl+alt+delete, etc…
I want it so it will totally ignore everything until f9 is pressed.
I have tried the ioctl function and a couple others but no luck.
Can anyone help me get started with what functions to use or maybe some code example.

Thanks in advance.
Old 11-21-2006, 12:05 AM   #2
Registered: Sep 2004
Location: Laredo, TX
Distribution: Slackware 11.0 [both lap & pc] WinXP
Posts: 164

Rep: Reputation: 30
maybe an if loop with compare values, escape key on f9 maybe you can input all data and check each char until the char produced by f9 comes up, then you can keep on with the sequence


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
X11 Input drivers (keyboard and mouse), events Cyborg16 Linux - Software 1 05-22-2005 09:01 AM
Disable mouse, keyboard or other input devices / drivers bastl Programming 0 05-15-2005 06:39 AM
my mouse input is takes as keyboard input in BASH e1000 Slackware 5 12-08-2003 03:00 PM
Keyboard and mouse input problems in 9.1 soup Slackware 6 09-30-2003 02:57 PM
newbie installation problem: no keyboard/mouse input vytlacil Linux - Newbie 0 08-09-2003 06:03 PM

All times are GMT -5. The time now is 04:40 AM.

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