keyCode is not mapped correctly when capital character is given
- Dominant language
- JavaScript
- Stars
- 441
- Forks
- 254
- PR merge metrics
- No merged PRs in 30d
Description

v0.15.0 / latest
Firefox native behaviour:

`key` is capitalized according to the active shift, thus such capitalized/UC character must be supported by syn.js
test case:
```
['keypress', 'keydown', 'keyup'].forEach((k) => $('#xxx')[0].addEventListener(k, event => { console.log(event); }));
syn.trigger($('#xxx')[0], 'keyup', {character: 'n'});
syn.trigger($('#xxx')[0], 'keyup', {character: 'N', shiftKey: true});
```
must log both events with non-zero `keyCode`
Contributor guide
Research direction
Start with the issue's syn.trigger test case and inspect the synthetic keyboard-event path that maps character and shiftKey to keyCode. Reproduce both the lowercase and uppercase calls in Firefox or the project test setup; done means each logged keyup event has a non-zero keyCode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100