A simple keyboard input latency measurement tool
Pre-built binary: lagmeasure 0.5
Start the program and then lagmeasure.exe using a part of the target application window title as an argument. For example
lagmeasure WINDOW_TITLE [RUNS] [THRESHOLD] [NUM_FRAMES] [DUMP_FRAMES] [KEY] WINDOW_TITLE a window title substring RUNS how many iterations to run the test THRESHOLD byte diff threshold to detect key, default 100 NUM_FRAMES number of frames to capture, default 30 DUMP_FRAMES dump frame bmp's to disk, default 0 KEY virtual code for the key to send, default 'A' = 65
If you want something more user-friendly you can try Pavel Fatin's Typometer.
The project file is for Visual Studio 2013 but the program is just a single source file and it should compile with newer versions too.