-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Encoder Support in CLI qmk compile #8440
Conversation
It seems that this PR is based on an older state of the master branch. |
Updated to fork to latest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the logic too carefully yet but I wanted to provide some style guidance here.
Do we want to include support for things like the RGB and backlight inc/dec keycodes? If so, there'll need to be some special handling for them since passing them to EDIT: In fact... there needs to be some sanity checking either way to handle the case where a user inputs a Quantum keycode here, either by placing a |
@fauxpark Updated to use tap_code16 as well as do a basic check for 'basic' qmk keycodes. Since I eventually want this to be a part of the configurator, I'll need to find a solution for "advanced' codes. But for now, I think the basic codes are enough functionality for most users. |
CI/CD being affected by #8533. On hold until that is merged. |
As mentioned on Discord, there is no hard requirement that all keymaps build against all revisions. #8533 is unlikely to fix every keymap combo, and given the current scope of this RP, will not be blocking this from being merged. That aside, i'm not a fan of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Would like to get @skullydazed's feedback on it before merging.
ENCODER_IF = """\t_ELIF_ (index == _INDEX_) { | ||
\t\tif (clockwise) { | ||
\t\t\ttap_code16(_CLOCKWISE_); | ||
\t\t} else { | ||
\t\t\ttap_code16(_COUNTER_); | ||
\t\t} | ||
\t}""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my previous comment, this will need some logic with some checks to see what layer we're currently in and using the appropriate code.
ENCODER_IF = """\t_ELIF_ (index == _INDEX_) { | ||
\t\tif (clockwise) { | ||
\t\t\ttap_code16(_CLOCKWISE_); | ||
\t\t} else { | ||
\t\t\ttap_code16(_COUNTER_); | ||
\t\t} | ||
\t}""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENCODER_IF = """\t_ELIF_ (index == _INDEX_) { | |
\t\tif (clockwise) { | |
\t\t\ttap_code16(_CLOCKWISE_); | |
\t\t} else { | |
\t\t\ttap_code16(_COUNTER_); | |
\t\t} | |
\t}""" | |
ENCODER_IF = """ _ELIF_ (index == _INDEX_) { | |
if (clockwise) { | |
tap_code16(_CLOCKWISE_); | |
} else { | |
tap_code16(_COUNTER_); | |
} | |
}""" |
alright this pr got too stale and i'm having environmental issues. I'm going to take the feedback and start again. |
Description
This is a PR to add encoder support to the QMK CLI compile command. The option does not modify current compilation behavior in the CLI.
My intent is for this change to serve as a proof of concept for adding this behavior to the configurator and compiler. There is an open thread in the qmk_configurator repo: qmk/qmk_configurator#468
Types of Changes
Issues Fixed or Closed by This PR
Checklist