Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding "KEY_" values (e.g. KEY_BACKSLASH) #13

Open
michalmonday opened this issue Jan 21, 2019 · 0 comments
Open

Question regarding "KEY_" values (e.g. KEY_BACKSLASH) #13

michalmonday opened this issue Jan 21, 2019 · 0 comments

Comments

@michalmonday
Copy link

michalmonday commented Jan 21, 2019

Hi, in keyboard.properties some of the values are in hex (preceded with 0x) but some of the values are in standard base 10. However, in the "gb.properties" file the KEY_BACKSLASH holds "64", is it supposed to be 0x64?

I tested it with "Keyboard" library of Arduino Pro Micro like this:

  KeyReport kr = {0x2, 0, // lack of 0x2 (0) results in backslash
    {
      0x64, 0, 0, 0, 0, 0
    }
  };
  HID().SendReport(2, &kr, sizeof(KeyReport));
  delay(50);

  kr = {0, 0, 
    {
      0, 0, 0, 0, 0, 0
    }
  };
  HID().SendReport(2, &kr, sizeof(KeyReport));

And it appears to correctly type the pipe character (which I was trying to type).

So my question is: are the "KEY_..." values within language-specific properties files actually hex values? E.g. Should KEY_ASH=100 be actually interpreted as 0x100?

Edit: It turns out that all the ascii characters are typed correctly using UK keyboard with English (UK) system settings and the KEY_ASH (or KEY_HASH?) value of 0x32 and KEY_BACKSLASH value of 0x64, however it was required to change the anomalies in the "ASCII_XX" order, e.g.
ASCII_7E in the place of ASCII_7C
ASCII_23 in the place of ASCII_5C
https://github.com/michalmonday/duckencoder.py/blob/master/resources/gb.properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant