CoderTools

Keyboard & Mouse Tester

Test input devices and monitor keyboard/mouse events in real-time

Event Log

No events recorded yet. Press a key or click the mouse to start.

Hover over this area to enable key blocking mode

Visual Keyboard

Press any key to test. Keys will light up when pressed.

Key Information

Key

-

Code

-

KeyCode

-

Location

-

Repeat

-

Modifiers

-

Ghosting Test

Hold multiple keys to test N-key rollover (NKRO)

Keys Held

0

Max Keys Held

0

Recently Pressed Keys

How to Use

This tool helps you test keyboards and mice, and monitor input events in real-time. It's especially useful for developers debugging event handling code, and users checking if their input devices work correctly.

Keyboard Testing

The visual keyboard shows which keys you're pressing in real-time. Test all keys including function keys, modifiers, and special keys. The key information panel shows technical details like key code and scan code.

Mouse Testing

Test all mouse buttons (left, middle, right, back, forward), scroll wheel, and track precise cursor coordinates. Note: Due to browser limitations, back/forward button events fire on release rather than press.

Event Log for Developers

The event log captures all keyboard and mouse events with precise timestamps. You can see the exact sequence of mousedown, mouseup, click events, or keydown, keypress, keyup sequences. Filter events by type and export logs for analysis.

Understanding Coordinate Systems

Mouse positions are reported in multiple coordinate systems:

  • clientX/Y - Position relative to the browser viewport (visible area)
  • pageX/Y - Position relative to the entire document (includes scroll offset)
  • screenX/Y - Position relative to the monitor screen
  • offsetX/Y - Position relative to the target element
  • movementX/Y - Relative movement since last event (useful for drag operations)

Ghosting & N-Key Rollover

Ghosting occurs when some key combinations don't register on certain keyboards. This tool helps you detect how many keys your keyboard can handle simultaneously (N-key rollover). Gaming keyboards typically support full NKRO.

Double-Click Detection

Test double-clicks for ALL mouse buttons (left, middle, right, back, forward) with customizable delay threshold (100-2000ms). Helps detect faulty switches causing unintended double-clicks. Adjust the delay setting to match your clicking speed.

Tips

  • Some keys like F1-F12 may be intercepted by the browser or OS. Try pressing Fn key if available.
  • The event log is useful for debugging JavaScript input handling code.
  • Use the coordinate systems panel to understand how different position values work.
  • Export event logs to analyze input timing and event sequences.
  • The visual keyboard supports both ANSI (US) and ISO (EU) layouts.

Frequently Asked Questions

Why don't some keys register?

Some keys like Print Screen, Pause, and certain function keys are intercepted by the browser or operating system. This is a browser security feature, not a keyboard problem.

What is ghosting?

Ghosting is when certain key combinations don't register because of electrical limitations in the keyboard's matrix design. Gaming keyboards often use anti-ghosting technology or full N-key rollover (NKRO) to prevent this.

Why does my mouse register double-clicks?

This is usually caused by worn-out microswitches. Use the customizable double-click delay setting (100-2000ms) to test all mouse buttons. If a button registers double-clicks even with high delay values, the switch is likely faulty and needs replacement.

What is the difference between 'key' and 'keyCode'?

'key' returns the character value of the key pressed (e.g., 'a', 'Enter'). 'keyCode' returns a numeric code representing the physical key. Modern code should use 'key' and 'code' properties instead of the deprecated 'keyCode'.

Is my data sent to any server?

No. This tool runs entirely in your browser. All input events are processed locally and no data is transmitted anywhere.

What are keyboard locations?

Location indicates where a key is on the keyboard: Standard (0) for most keys, Left (1) for left-side modifiers, Right (2) for right-side modifiers, and Numpad (3) for numeric keypad keys.

Why do back/forward buttons respond on release?

Browsers delay back/forward button events to support native navigation. The tool shows visual feedback for 200ms to ensure visibility. This is a browser limitation, not a device issue.

Related Tools