ramccor / logkeys

Automatically exported from code.google.com/p/logkeys
Other
0 stars 0 forks source link

Feature suggestion - Window Title capture #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Have just tried this out on Ubuntu 9.10 and it seems to work as advertised.
Thanks. 

I just thought I'd suggest a feature: you might like to consider capturing
the Window Title to give some context to the typing eg. 
 12th Feb 2010, 23:08 Firefox - Google Search: keylogger

I'm not a programmer, so I don't know if this is a big job or a two-liner,
but it would certainly be useful. 

Thanks again. 

Original issue reported on code.google.com by plutoc...@gmail.com on 26 Jan 2010 at 7:29

GoogleCodeExporter commented 9 years ago
Hey, thanks for the input!

This is achievable either through XOpenDisplay, XGetInputFocus, 
XGetWindowProperty
(etc., functions of Xlib) or through shell via common X utilities
(http://www.linuxquestions.org/questions/programming-9/getting-the-pid-of-the-to
p-active-window-776938/).

Both ways demand Xlib and X environment, which means this would fail to work in
console, but then again everybody uses X now.

The focus should be polled on each keypress. I'm currently more fond of the 
second
method (via command line, ATM seems much easier to implement) even though this 
means
spawning at least three new processes on each key stroke. :S (Actually, I think 
first
is the way to go.)

I am considering it...

Original comment by kernc...@gmail.com on 26 Jan 2010 at 10:58

GoogleCodeExporter commented 9 years ago
Note to self: XFetchName might prove much easier than XGetWindowProperty. :)

Original comment by kernc...@gmail.com on 26 Jan 2010 at 11:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi, you could try this: cHotKey (http://chotkey.googlecode.com)

It is a cross-platform hotkey program with key logging function.

It can capture the title and class of focus window.

Original comment by zcn...@gmail.com on 10 Sep 2012 at 8:39