I've been given a laptop to fix - it is 'randomly scrolling documents'. I'm almost certain it's a faulty connection in the keyboard, causing page-down to fire. Is there a program I can use to monitor all key presses from the keyboard to see if this is the case?
5 Answers
What you need is a Keylogger. For example, you can use Actual Keylogger, a free keylogger which runs hidden in the background and automatically records all keystrokes.
Alternatively, you can use PassMark Keyboard Test. It's a shareware with a fully functional and free 30 day evaluation. It allows you to quickly check that all the keys on your computer keyboard are functioning correctly, check the keyboard LED's and look at the internal scan codes being generated by the keyboard.
-
This seems like it would do the trick, but is there anything where I can view the data stream 'live', rather than having to check a log periodically?– fredleySep 20, 2011 at 21:54
-
1
You could use AutoHotkey and KeyboardHook to see what keys are being pressed. You only need to create a script with this line
#InstallKeybdHook
Save the file with and "ahk" extension and run it. Then in the Systray do a right click in the proper icon and select open. In the menu select View->History.....press F5 to update. This two sites could be of some help:
http://www.autohotkey.com/docs/commands/_InstallKeybdHook.htm
A really quick Google search turned up this: http://keyboard-tester.software.informer.com
I can't add a comment to mjsr but just wanted to follow up and say that his answer was incredibly useful for me. In my case I had to also add the line:
#KeyHistory 200
As I was trying to track the differences that were occurring between two devices when a QR Code was being scanned. The default #KeyHistory was only around 50 characters, whereas my QR contained around 150.
None of these answers worked for the key I was trying to find the name of (browser start and home
) but I found the easiest solution was just to
pip install keyboard
and write this simple script in python
import keyboard
while True:
event = keyboard.read_event()
if event.event_type == keyboard.KEY_DOWN:
print('key: ', event.name, ' scan code: ', event.scan_code, ' device: ', event.device)