Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 28th, 2006, 06:45 PM
Scripter47
Guest
 
Posts: n/a
Default Reverse of SendKeys??

Hey!

I know there is a module named SendKeys.
SendKeys module it can type strings as you where typing it, on the keyboard.
But is there a module that does the reverse. A module that gets
_anything_ what the keyboard writes.
For example. If i type "hey" on my keyboard. Will the program get the
string even if the program not is on focus..

Thanks :)

Sorry for bad English...
--

_________ .__ __ ______________
/ _____/ ___________|__|______/ |_ ___________ / | \______ \
\_____ \_/ ___\_ __ \ \____ \ __\/ __ \_ __ \/ | |_ / /
/ \ \___| | \/ | |_ | \ ___/| | \/ ^ / / /
/_______ /\___ >__| |__| __/|__| \___ >__| \____ | /____/
\/ \/ |__| \/ |__|


  #2  
Old December 28th, 2006, 10:55 PM
Erik Johnson
Guest
 
Posts: n/a
Default Re: Reverse of SendKeys??

Aside from the obvious security issues such a program would represent
(and your name and signature are curious in that respect as well), you are
basically asking for functionality (i.e., a key logger) I believe to be
outside what is offered by Python and/or the API of most operating systems.

Perhaps you should take up assembly programming?


  #3  
Old December 29th, 2006, 01:35 AM
Ravi Teja
Guest
 
Posts: n/a
Default Re: Reverse of SendKeys??


Scripter47 wrote:
Quote:
Hey!
>
I know there is a module named SendKeys.
SendKeys module it can type strings as you where typing it, on the keyboard.
But is there a module that does the reverse. A module that gets
_anything_ what the keyboard writes.
For example. If i type "hey" on my keyboard. Will the program get the
string even if the program not is on focus..
PyHook is what you need.
http://www.cs.unc.edu/~parente/tech/tr08.shtml
It can signal for both global keyboard as well as mouse events.

  #4  
Old December 29th, 2006, 10:55 AM
Sebastian 'lunar' Wiesner
Guest
 
Posts: n/a
Default Re: Reverse of SendKeys??

"Erik Johnson" <ej at somewhere.com<typed
Quote:
Aside from the obvious security issues such a program would
represent (and your name and signature are curious in that respect as
well), you are basically asking for functionality (i.e., a key logger)
I believe to be outside what is offered by Python and/or the API of
most operating systems.
I agree on the security issues, and on the statement, that writing a key
logger is outside the scope of the standard python library. But it is
easily possible to write a key logger using the API of common operating
systems. Windows provides hooks for intercepting messages from input
devices such as keyboard and mouse. On Linux you can either write a
kernel module, which is the less portable, but more effective way, or
you can code a X11 key logger, which will also work on other unix-like
systems with a working X11 installation.

--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles