LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-05-2010, 05:21 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Reading keyboard strokes from different windows through C


I have used struct termios for reading the key pressed.

Is it possible somehow to write a C code which captures the keystrokes of the keyboard when the focus is on some other window ?

i.e. my c code is in background and there is a window on foreground and i am pressing some keys. will my c code be able to detect the keys pressed somehow ?

Please guide !

Last edited by Aquarius_Girl; 05-05-2010 at 06:16 AM.
 
Old 05-05-2010, 09:29 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You mean like a keylogger ? Well yes, see:
http://public.callutheran.edu/~abark...trl-0.4.tar.gz
findkey.c

It's not a keylogger program, but it shows you how to do what you want.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] read from keyboard while reading from file in SHELL SCRIPTING m3ll0 Programming 11 10-30-2010 08:30 AM
USB keyboard - Capture key strokes/input v333k Linux - Software 2 10-19-2009 01:44 PM
Capturing Keystrokes in linux. APIs or System calls to capture keyboard strokes abhinav.zoso Programming 3 01-10-2009 11:14 AM
Faster, more direct keyboard reading. pda_h4x0r Programming 1 05-18-2006 11:57 PM
Reading from the keyboard Hugo Orlando Programming 1 12-20-2004 05:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:21 PM.

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