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

Add JS_BUTTON to keycodes #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davewongillies
Copy link

@davewongillies davewongillies commented Dec 12, 2021

Add support for joystick buttons to keycodes

@xyzz
Copy link
Contributor

xyzz commented Dec 12, 2021

Did you test these keycodes, because they're not actually correct. As above we have:

    MI_VEL_0,  // 5C92
#ifdef VIA_ENABLE
    MI_VEL_1 = MI_VEL_0,
#else
    MI_VEL_1,  // 5C93
#endif

so everything will be shifted 1 back

@davewongillies
Copy link
Author

Did you test these keycodes, because they're not actually correct. As above we have:

    MI_VEL_0,  // 5C92
#ifdef VIA_ENABLE
    MI_VEL_1 = MI_VEL_0,
#else
    MI_VEL_1,  // 5C93
#endif

so everything will be shifted 1 back

I got the values from https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum_keycodes.h#L438-L469

@xyzz
Copy link
Contributor

xyzz commented Dec 12, 2021

Yes, these values won't match the ones in Vial/VIA due to the #ifdef statement; you should also add new keycodes to https://github.com/vial-kb/vial-qmk/blob/vial/quantum/vial_ensure_keycode.h & then try compiling a Vial keymap to ensure the values are accurate

@jkutianski
Copy link
Contributor

And labels looks a little bit weird
image

@jkutianski
Copy link
Contributor

jkutianski commented Dec 22, 2021

@davewongillies try this

    K(0x5D08, "JS_BUTTON1", "Joy\nBtn 1", "Joystick Button 1"),
    K(0x5D09, "JS_BUTTON2", "Joy\nBtn 2", "Joystick Button 2"),
    K(0x5D0A, "JS_BUTTON3", "Joy\nBtn 3", "Joystick Button 3"),
    K(0x5D0B, "JS_BUTTON4", "Joy\nBtn 4", "Joystick Button 4"),
    K(0x5D0C, "JS_BUTTON5", "Joy\nBtn 5", "Joystick Button 5"),
    K(0x5D0D, "JS_BUTTON6", "Joy\nBtn 6", "Joystick Button 6"),
    K(0x5D0E, "JS_BUTTON7", "Joy\nBtn 7", "Joystick Button 7"),
    K(0x5D0F, "JS_BUTTON8", "Joy\nBtn 8", "Joystick Button 8"),
    K(0x5D10, "JS_BUTTON9", "Joy\nBtn 9", "Joystick Button 9"),
    K(0x5D11, "JS_BUTTON10", "Joy\nBtn 10", "Joystick Button 10"),
    K(0x5D12, "JS_BUTTON11", "Joy\nBtn 11", "Joystick Button 11"),
    K(0x5D13, "JS_BUTTON12", "Joy\nBtn 12", "Joystick Button 12"),
    K(0x5D14, "JS_BUTTON13", "Joy\nBtn 13", "Joystick Button 13"),
    K(0x5D15, "JS_BUTTON14", "Joy\nBtn 14", "Joystick Button 14"),
    K(0x5D16, "JS_BUTTON15", "Joy\nBtn 15", "Joystick Button 15"),
    K(0x5D17, "JS_BUTTON16", "Joy\nBtn 16", "Joystick Button 16"),
    K(0x5D18, "JS_BUTTON17", "Joy\nBtn 17", "Joystick Button 17"),
    K(0x5D19, "JS_BUTTON18", "Joy\nBtn 18", "Joystick Button 18"),
    K(0x5D1A, "JS_BUTTON19", "Joy\nBtn 19", "Joystick Button 19"),
    K(0x5D1B, "JS_BUTTON20", "Joy\nBtn 20", "Joystick Button 20"),
    K(0x5D1C, "JS_BUTTON21", "Joy\nBtn 21", "Joystick Button 21"),
    K(0x5D1D, "JS_BUTTON22", "Joy\nBtn 22", "Joystick Button 22"),
    K(0x5D1E, "JS_BUTTON23", "Joy\nBtn 23", "Joystick Button 23"),
    K(0x5D1F, "JS_BUTTON24", "Joy\nBtn 24", "Joystick Button 24"),
    K(0x5D20, "JS_BUTTON25", "Joy\nBtn 25", "Joystick Button 25"),
    K(0x5D21, "JS_BUTTON26", "Joy\nBtn 26", "Joystick Button 26"),
    K(0x5D22, "JS_BUTTON27", "Joy\nBtn 27", "Joystick Button 27"),
    K(0x5D23, "JS_BUTTON28", "Joy\nBtn 28", "Joystick Button 28"),
    K(0x5D24, "JS_BUTTON29", "Joy\nBtn 29", "Joystick Button 29"),
    K(0x5D25, "JS_BUTTON30", "Joy\nBtn 30", "Joystick Button 30"),
    K(0x5D26, "JS_BUTTON31", "Joy\nBtn 31", "Joystick Button 31"),
    K(0x5D27, "JS_BUTTON32", "Joy\nBtn 32", "Joystick Button 32"),

K(0x5D10, "JS_BUTTON7", "Joystick\n7", "Joystick Button 7"),
K(0x5D11, "JS_BUTTON8", "Joystick\n8", "Joystick Button 8"),
K(0x5D12, "JS_BUTTON9", "Joystick\n9", "Joystick Button 9"),
K(0x5D13, "JS_BUTTON10" "Joystick\n10", "Joystick Button 10"),
Copy link
Contributor

Choose a reason for hiding this comment

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

commas missing from here

jkutianski added a commit to jkutianski/vial-gui that referenced this pull request Feb 4, 2022
@jkutianski jkutianski mentioned this pull request Feb 6, 2022
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

Successfully merging this pull request may close these issues.

3 participants