Mozilla.com

  1. event.metaKey
Table of contents
No headers

Well, I have tried this example, but cannot seem to get it to work on my laptop. Maybe there is no meta key on this keyboard?

<html>
<head>
<title>metaKey example</title>

<script type="text/javascript">

function showChar(e){
  alert(
    "Key Pressed: " + String.fromCharCode(e.charCode) + "\n"
    + "charCode: " + e.charCode + "\n"
    + "META key pressed: " + e.metaKey + "\n"
  );
}

</script>
</head>

<body onkeypress="showChar(event);">
<p>Press any character key, with or without holding down the META key.<br />
You can also use the SHIFT key together with the META key.</p>
</body>
</html>

Page last modified 17:55, 20 Jul 2006 by Jabez

Tags:

Files (0)