HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body onkeydown="myFunction(event)"> <p>Click on this page once and press metaKey</p> <p>In Windows OS 'Window' button is a metakey</p> <p>In Mac OS 'cmd(⌘)' button is a metakey</p> <script> function myFunction(e){ if(e.metaKey) alert("metaKey was Pressed"); else alert("metaKey was not Pressed"); } </script> </body> </html>
OUTPUT
×

Save as Private