Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Python Keyboard
how can i recording of everything that is entered from the keyboard using `python`
Posted 9-Feb-12 8:54am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I found this :
 
http://www.python-forum.org/pythonforum/viewtopic.php?f=1&t=10998[^]
 
Python is a weird language to be doing keylogging in....
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

As CodeProject is mostly a Windows centric site I assume that you are looking for a solution that works on Windows - so have a look at: PyHook[^]
 
Description from the project site:
pyHook is a python wrapper for global input hooks in Windows. Specifically it wraps the Windows SetWindowsHookEx API function using low-level keyboard (WH_KEYBOARD_LL) and mouse (WH_MOUSE_LL) hooks.
 
The pyHook package provides callbacks for global mouse and keyboard events in Windows. Python applications register can event handlers for user input events such as left mouse down, left mouse up, key down, etc. and set the keyboard and/or mouse hook. The underlying C library reports information like the time of the event, the name of the window in which the event occurred, the value of the event, any keyboard modifiers, etc. Events can be logged and/or filtered.

 
Best regards
Espen Harlinn
  Permalink  
Comments
SAKryukov at 9-Feb-12 16:35pm
   
Never knew that someone would do such a weird thing in Python... :-)
My 5.
--SA
Espen Harlinn at 9-Feb-12 16:39pm
   
Thank you, Sergey - it appears that at least a few people has required this functionality :)
thatraja at 9-Feb-12 23:15pm
   
5!
Espen Harlinn at 10-Feb-12 3:24am
   
Thank you, thatraja :)
VJ Reddy at 12-Jun-12 11:10am
   
Good answer. 5!
Espen Harlinn at 12-Jun-12 11:11am
   
Thank you, VJ :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 9 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100