Skip to content

keyCode is not mapped correctly when capital character is given #195

@mvorisek

Description

@mvorisek

image

v0.15.0 / latest

Firefox native behaviour:

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions