Open GoogleCodeExporter opened 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
Note to self: XFetchName might prove much easier than XGetWindowProperty. :)
Original comment by kernc...@gmail.com
on 26 Jan 2010 at 11:09
[deleted comment]
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
Original issue reported on code.google.com by
plutoc...@gmail.com
on 26 Jan 2010 at 7:29