Keycode Checker Tool - Disable | JavaScriptSource

Keycode Checker Tool - Disable

Ryan Cooper Jan 18, 2008

General

Use this function to disable certain keys. This essentially tells the page to cancel the last event, e.g. the pressing of that certain key.


In this demo, the CAPS LOCK key is disabled. Try to press it.

Notes

Source Code

Paste this source code into the designated areas.

Head

Paste this code into the HEAD section of your HTML document.


Leave a Response

(1 comment)

I use a similar function to disable the backspace key. How can I disable the backspace key UNLESS focused on a textbox element?

Marc Jan 18, 2008