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

Custom keyboard layout #19357

Merged
merged 12 commits into from
Dec 27, 2022
Merged

Custom keyboard layout #19357

merged 12 commits into from
Dec 27, 2022

Conversation

snowskeleton
Copy link
Contributor

first commit of my Preonic layout
Type:

  • Keymap/layout/userspace (addition or update)

Checklist:

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

Also, since it appears that you're not using it, you may want to remove the muse mode code.

keyboards/preonic/keymaps/snowskeleton/keymap.c Outdated Show resolved Hide resolved
keyboards/preonic/keymaps/snowskeleton/keymap.c Outdated Show resolved Hide resolved
@snowskeleton
Copy link
Contributor Author

alright, I think I like where it's at now. thank you so much for your feedback! Everything is much cleaner now with it implemented :)

is there anything else I should change?

@trguhq
Copy link
Contributor

trguhq commented Dec 22, 2022

alright, I think I like where it's at now. thank you so much for your feedback! Everything is much cleaner now with it implemented :)

is there anything else I should change?

It's not compiling right now, check the red X. I am not a reviewer, just trying to be helpful. To me if it doesn't work with every target for its folder it'd be nice if the documentation was explicit about that but I don't know about expectations in that regard. Perhaps "with rotary encoder" is explicit enough here?

Maybe just as easy as:

#if !defined(KEYBOARD_preonic_rev1) && !defined(KEYBOARD_preonic_rev2)
#define ENCODERS_PAD_A { B12 }
#define ENCODERS_PAD_B { B13 }
#endif

Or maybe you could check against __AVR__ as you do elsewhere in the code and not enable any of the rotary encoder stuff if that's defined.

Or if you don't want it to compile for those keyboards and you don't want to support them, maybe something like:

#ifdef __AVR__
#pragma message("This keymap only supports preonic rev3 and later keyboards with an ARM microcontroller!")
#endif 

Or:

#ifdef __AVR__
#error "This keymap only supports preonic rev3 and later keyboards with an ARM microcontroller!"
#endif 

Or maybe:

#ifndef __arm__

Or maybe something can be done in rules.mk.

Or maybe it doesn't matter... Just an idea. Those boards have a different MCU which doesn't have those pins...

Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

This may help with the compiler errors for the other revisions, but isn't strictly required.

@@ -0,0 +1,3 @@
SRC += muse.c
ENCODER_ENABLE = yes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ENCODER_ENABLE = yes

@drashna drashna requested a review from a team December 23, 2022 09:20
@drashna drashna merged commit fd9c809 into qmk:master Dec 27, 2022
sbhal pushed a commit to sbhal/qmk_firmware that referenced this pull request Dec 30, 2022
jasonisgraham pushed a commit to jasonisgraham/qmk_firmware that referenced this pull request Jan 2, 2023
omikronik pushed a commit to omikronik/qmk_firmware that referenced this pull request Jan 22, 2023
ideas32 pushed a commit to ideas32/qmk_firmware that referenced this pull request Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants