Coding task · JavaScript and TypeScript course · Module 8: Events and the DOM

Exercise: Keyboard Shortcuts

Implement a keyboard shortcuts system for the park control panel.

Task

The index.html file has a panel with a #status paragraph, and the script has one keydown listener on the document. Fill in the blanks: ___BLANK1___ is the event method that blocks the browser from saving the page on Ctrl+S, ___BLANK2___ is the event.key value for the Ctrl+O shortcut (lowercase letter), and ___BLANK3___ is the event.key value of the Esc key. Ctrl+S should save, Ctrl+O open the report, Esc close the panel, and S alone without Ctrl must not change anything.