Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

As already posted on ServerFault: my usual quick solution for this is keylook.exe.

share|improve this answer
    
Interestingly, it dosen't work for the keys in question if they arn't mapped. This does seem handy but more information on keylook.exe would be nice - its kind of odd to have nothing but an FTP server - is there a proper website for this, and could you include what it does and how it might be useful in your answer? – Journeyman Geek Dec 3 '15 at 0:13
    
It is one of the example programmes accompanying the (originally for Windows 95) book "Programming Windows, 5th Edition" by Charles Petzold: <charlespetzold.com/books.html>;. I use it for checking scan codes produced by keys in a virtual machine (I develop VirtualBox). – michaeljt Dec 4 '15 at 7:27

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .