bitovi / syn

Standalone Synthetic Event Library
https://www.npmjs.com/package/syn
MIT License
444 stars 258 forks source link

Add key event property #181

Closed cherifGsoul closed 4 years ago

cherifGsoul commented 4 years ago

This adds key property to the event emitted by syn.

It adds the use of KeyboardEvent constructor in order to pass the key property to the event instance, key property is read-only.

Edit: I updated the code by adding a mapping from the available keycodes to the correct KeyboardEvent key value.

Closes #180