Skip to content

Add support for multiple modifiers #11

@alessandrodd

Description

@alessandrodd

Right now duck2spark doesn't seem to support multiple modifiers, and that's a real pity because in some layouts are really needed.

For example, in the Italian Keyboard, the curly bracket character "{" is made up of:
KEY_LEFT_BRACE, MODIFIERKEY_RIGHT_ALT, MODIFIERKEY_SHIFT
or, in hex codes:
0x2f, 0x40, 0x2

So, when the Rubber Ducky encoder encodes the "{" character, it produces the following output:
0x2f, 0x40, 0x2, 0x0

Now, in the Arduino code produced by duck2spark, the main loop goes on in step of two, where the first hex is the key and the second is the modifier.
In this case, the digispark does this:
First it sends the 0x2f + 0x40 character, i.e. KEY_LEFT_BRACE + MODIFIERKEY_RIGHT_ALT i.e. the square bracket "[" and then it sends 0x2 + 0x0 i.e. MODIFIERKEY_SHIFT, i.e. the shift key alone.

Clearly, the same applies to the closing curly bracket "}".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions