only log keyboard entries

bitwise10
2012-01-11
2013-05-28
  • bitwise10

    bitwise10 - 2012-01-11

    Is it possible to only use a piece of project to log keyboard entries and save in a text file.
    What part of project source code handles this? Is it pyHook? is it one file in pyHook or whole library? Would it be possible to take this part of project and compile it to .exe(simple.exe perhaps)?
    I am not interested in the rest of the project - even though it is very well put together.
    I am interested in this project but have little Python programming experience, would use this module as a training mechanism - thanks.

     
  • nanotube

    nanotube - 2012-01-11

    you can turn off logging of all mouse events and leave just the keyboard logging, and also turn off log emailing and log rotation. it's all configurable. :)
    if you insist on ripping things out, then yes - you could just write a 10-line python script using the pyhook library to log keystrokes and write them to a file. pyhook is the library that does the key hooking on windows, using the setwindowshookex api.

     
  • bitwise10

    bitwise10 - 2012-01-13

    Thanks for feedback,
    I can not find file(setwindowshookex api) you listed above?
    I downloaded "pyHook-1.5.1" but this folder does not contain "setwindowshookex api".
    Where should i have downloaded setwindowshookex api from?

     
  • nanotube

    nanotube - 2012-01-13

    Hi,
    pyHook is a python wrapper around the windows api (application programming interface). there's no file 'setwinowshookex api'. this is the documentation on the api call: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990%28v=vs.85%29.aspx

    there's also documentation on the pyhook project site about using the python wrapper to hook mouse or keyboard events.

     

Log in to post a comment.