mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: enrich key event error data
This commit is contained in:
parent
70042d8b7d
commit
63d712b831
1 changed files with 5 additions and 1 deletions
|
|
@ -49,7 +49,11 @@ function parseEvent(e: KeyboardEvent | React.KeyboardEvent) {
|
|||
)
|
||||
return combination
|
||||
} catch (err) {
|
||||
const serializedKeyData = JSON.stringify({ keyCode: e.keyCode, key: e.key })
|
||||
const serializedKeyData = JSON.stringify({
|
||||
keyCode: e.keyCode,
|
||||
key: e.key,
|
||||
charCode: e.charCode,
|
||||
})
|
||||
throw new Error(`Error parse keyboard event: ${serializedKeyData}`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue