@@ -280,7 +280,7 @@ behavior is broken.
280280
281281Depending on the browser, some events can't be intercepted at all. On
282282Chrome, for example, the ((keyboard)) shortcut to close the current
283- tab (Ctrl -W or Command -W) cannot be handled by JavaScript.
283+ tab ([ control ] {keyname} -W or [ command ] {keyname} -W) cannot be handled by JavaScript.
284284
285285## Key events
286286
@@ -321,22 +321,22 @@ longer.
321321The example looked at the ` key ` property of the event object to see
322322which key the event is about. This property holds a string that, for
323323most keys, corresponds to the thing that pressing that key would type.
324- For special keys like Enter , it holds a string that names the key
325- (` "Enter" ` , in this case). If you hold shift while pressing a key,
324+ For special keys like [ enter ] {keyname} , it holds a string that names the key
325+ (` "Enter" ` , in this case). If you hold [ shift] {keyname} while pressing a key,
326326that might also influence the name of the key—` "v" ` becomes ` "V" ` ,
327- ` "1" ` may become ` "!" ` , if that is what pressing Shift -1 produces on
327+ ` "1" ` may become ` "!" ` , if that is what pressing [ shift ] {keyname} -1 produces on
328328your keyboard.
329329
330330{{index "modifier key", "shift key", "control key", "alt key", "meta key", "command key", "ctrlKey property", "shiftKey property", "altKey property", "metaKey property"}}
331331
332- Modifier keys such as Shift, Ctrl, Alt , and Meta (Command on Mac)
332+ Modifier keys such as [ shift ] {keyname}, [ control ] {keyname}, [ alt ] {keyname} , and [ meta ] {keyname} ( [ command ] {keyname} on Mac)
333333generate key events just like normal keys. But when looking for key
334334combinations, you can also find out whether these keys are held down
335335by looking at the ` shiftKey ` , ` ctrlKey ` , ` altKey ` , and ` metaKey `
336336properties of keyboard and mouse events.
337337
338338``` {lang: "text/html", focus: true}
339- <p>Press Ctrl -Space to continue.</p>
339+ <p>Press Control -Space to continue.</p>
340340<script>
341341 window.addEventListener("keydown", event => {
342342 if (event.key == " " && event.ctrlKey) {
0 commit comments