Skip to content

Commit 435265e

Browse files
authored
Update article.md
1 parent ecbb2b8 commit 435265e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2-ui/3-event-details/7-keyboard-events/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ So, `event.code` may match a wrong character for unexpected layout. Same letters
107107

108108
To reliably track layout-dependent characters, `event.key` may be a better way.
109109

110-
On the other hand, `event.code` has the benefit of staying always the same, bound to the physical key location. So hotkeys that rely on it work well even in case of a language switch.
110+
On the other hand, `event.code` has the benefit of staying always the same, bound to the physical key location. So hotkeys that rely on it work well even in case of a language switch. For example, games that use `key:A` `key:D` for an avatar traveling.
111111

112112
Do we want to handle layout-dependant keys? Then `event.key` is the way to go.
113113

0 commit comments

Comments
 (0)