getEventKeyName: uppercase for single letters
This commit is contained in:
parent
fd42f2d365
commit
3907116328
|
@ -243,7 +243,9 @@ function getEventKeyName(e, letterAsCode) {
|
|||
mods === e.key + '-' ? '' : mods
|
||||
}${
|
||||
e.key
|
||||
? e.key.length === 1 && letterAsCode ? e.code : e.key
|
||||
? !e.key[1] && letterAsCode ? e.code // KeyC
|
||||
: e.key[1] ? e.key // Esc
|
||||
: e.key.toUpperCase() // C, Shift-C (single letters we use uppercase for consistency)
|
||||
: 'Mouse' + ('LMR'[e.button] || e.button)
|
||||
}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user