Update article.md
This commit is contained in:
parent
ecbb2b8379
commit
435265ee9d
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ So, `event.code` may match a wrong character for unexpected layout. Same letters
|
|||
|
||||
To reliably track layout-dependent characters, `event.key` may be a better way.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Do we want to handle layout-dependant keys? Then `event.key` is the way to go.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue