Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

While futzing around with the reverse engineering the BlackWidow, I came across xev — a piece of software that intercepts and prints to screen any mouse and keyboard event. Ive had a few situations where this would be useful in Windows. Is there any software that has the same functionality in Windows?

share|improve this question
    
There's a similar question on Server Fault, unfortunately none of the answers seem to work. –  Gilles Jul 31 '13 at 9:52

2 Answers 2

I don't know what your exact requirements are, but AutoHotkey has two features, which enable you to display keyboard and mouse events; however these are focused for the usage in AutoHotkey itself and can be much too rudimentary for your problem:

  • To spy on keyboard events you need this minimal script (AutoHotkey.ahk):

    #InstallKeybdHook
    

    Then you can open AutoHotkey -> View -> Key History and script info and display the pressed keys. If you change the focus, this is logged also:

    Window: C:\Users\User\Documents\AutoHotkey.ahk - AutoHotkey v1.1.00.00
    Keybd hook: yes
    (...)
    The oldest are listed first.  VK=Virtual Key, SC=Scan Code, Elapsed=Seconds
    since the previous event.  Types: h=Hook Hotkey, s=Suppressed (blocked),
    i=Ignored because it was generated by an AHK script, a=Artificial,
    #=Disabled via #IfWinActive/Exist, U=Unicode character (SendInput).
    
    VK  SC  Type    Up/Dn   Elapsed Key     Window
    -------------------------------------------------------------------------------------------------------------
    4C  026     u   0.08    L               keyboard - Equivalent for xev on windows - Super User - Opera Next              
    4C  026     d   0.05    L               
    4C  026     u   0.09    L               
    4F  018     d   0.17    O               
    4F  018     u   0.08    O               
    20  039     d   0.16    SPACE               
    20  039     u   0.09    SPACE               
    A0  02A     d   0.05    SHIFT           
    53  01F     d   0.26    S               
    55  016     d   0.11    U               
    53  01F     u   0.02    S               
    55  016     u   0.08    U               
    50  019     d   0.03    P               
    50  019     u   0.11    P               
    45  012     d   0.05    E               
    45  012     u   0.16    E               
    52  013     d   0.08    R               
    52  013     u   0.08    R               
    55  016     d   0.13    U               
    55  016     u   0.08    U               
    53  01F     d   0.06    S               
    53  01F     u   0.13    S               
    45  012     d   0.13    E               
    45  012     u   0.13    E               
    52  013     d   0.11    R               
    52  013     u   0.09    R               
    A0  02A     u   1.00    SHIFT           
    A2  01D     d   10.56   CTRL            C:\Users\User\Documents    \AutoHotkey.ahk - AutoHotkey v1.1.00.00
    A2  01D     u   0.09    CTRL            
    A4  038     d   2.61    ALT             
    A4  038     u   0.06    ALT             
    A2  01D     d   0.47    CTRL            
    A5  138     d   0.00    ALT GR          
    A2  01D     u   0.11    CTRL            
    A5  138     u   0.00    ALT GR          
    A3  11D     d   1.09    CTRL-RIGHT      
    A3  11D     u   0.09    CTRL-RIGHT      
    5B  15B     d   0.92    LEFT WINDOWS    
    5B  15B     u   0.08    LEFT WINDOWS    
    74  03F     d   1.97    F5     
    
  • The Mouse spy (AutoHotkey Tray Icon -> Windows Spy) is limited to the coordinates, but detects also the active window:

    enter image description here

share|improve this answer

I haven't tried it, but there's xev for Cygwin.

share|improve this answer
2  
This only reports keyboard events in an X session, not in Windows in general. –  Gilles Jul 31 '13 at 9:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.