Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <script> document.addEventListener('keydown', function(event) { if(event.code == 'KeyZ' && (event.ctrlKey || event.metaKey)) { alert('Undo!') } }) </script> </body> </html>