Horje
How to find out what character key is pressed?#key#keyCode#code Code Example
How to find out what character key is pressed?#key#keyCode#code
<div style="overflow-x:auto;">
<TABLE class="w3-table w3-striped w3-bordered w3-border w3-white">
<tr><td>Key:</td><td id="key"></td></tr>
<tr><td>Key Code:</td><td id="keyCode"></td></tr>
<tr><td>Event Code:</td><td id="eventCode"></td></tr>
</table>
<script type="text/javascript">
window.addEventListener("keydown", function (e) {
  //tested in IE/Chrome/Firefox
  document.getElementById("key").innerHTML = e.key;
  document.getElementById("keyCode").innerHTML = e.keyCode;
  document.getElementById("eventCode").innerHTML = e.code;
})
</script>




Javascript

Related
js split string Code Example js split string Code Example
Make a program that filters a list of strings and returns a list with only your friends name in it.javascript Code Example Make a program that filters a list of strings and returns a list with only your friends name in it.javascript Code Example
visual studio node.js cleint missing intents error Code Example visual studio node.js cleint missing intents error Code Example
load js on only specific page wp Code Example load js on only specific page wp Code Example
angular material datepicker range get value Code Example angular material datepicker range get value Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9