Skip to content

Instantly share code, notes, and snippets.

@Archie22is
Last active November 2, 2015 08:28
Show Gist options
  • Select an option

  • Save Archie22is/0c66639b993e805ae4fa to your computer and use it in GitHub Desktop.

Select an option

Save Archie22is/0c66639b993e805ae4fa to your computer and use it in GitHub Desktop.
Monitor keystrokes using javascript
<!-- This is your html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<p>Type something here and monitor the cosole output...</p>
</body>
</html>
<!-- This is your javascript | load in a javascript tag please -->
document.addEventListener('keypress', function() {
console.log(arguments);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment