Skip to content
This repository was archived by the owner on May 25, 2020. It is now read-only.

Adding support for shift modified keycodes. Adding comments referenci… - #4

Open
macyabbey wants to merge 2 commits into
mikerovers:masterfrom
macyabbey:master
Open

macyabbey wants to merge 2 commits into
mikerovers:masterfrom
macyabbey:master

Conversation

@macyabbey

Copy link
Copy Markdown

…ng relevant USB HID specifications. Maintain legacy support for old hidMap format, and new hidMap format of : { unmodified: "", shift: ""}. This allows for uppercase and lowercase alphanumeric strings, as well as many special characters that didn't work before. The most glaring problems occurred when attempting to scan a QRcode which contained a URL.

…ng relevant USB HID specifications. Maintain legacy support for old hidMap format, and new hidMap format of <keycode>: { unmodified: "<string value>", shift: "<shift string value>"}. This allows for uppercase and lowercase alphanumeric strings, as well as many special characters that didn't work before. The most glaring problems occurred when attempting to scan a QRcode which contained a URL.
@mikerovers
mikerovers self-requested a review December 27, 2018 10:07

@mikerovers mikerovers left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request. I do not own a QR code scanner, so I can not check if that works. It works with my barcode scanner.

RIGHT_CTRL: 0x5,
RIGHT_SHIFT: 0x6,
RIGHT_ALT: 0x7,
RIGHT_GUI: 0x8

@jie-meng jie-meng Aug 8, 2019

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be

const MODIFIER_BITS = {
    LEFT_CTRL: 0x1,
    LEFT_SHIFT: 0x2,
    LEFT_ALT: 0x4,
    LEFT_GUI: 0x8,
    RIGHT_CTRL: 0x10,
    RIGHT_SHIFT: 0x20,
    RIGHT_ALT: 0x40,
    RIGHT_GUI: 0x80,
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants