* [Feature] Add keycode PDF(layer) to set the default layer in EEPROM (#21881)
* Apply suggestions from code review
Co-authored-by: Nick Brassel <nick@tzarc.org>
---------
Co-authored-by: Nebuleon <2391500+Nebuleon@users.noreply.github.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
the mutual exclusive POINTING_DEVICE_MOTION_PIN and SPLIT_POINTING_ENABLE influence if and how the `pointing_device_driver.get_report` is triggered. now the way the define is wrapping around an "unbraced" if leads clang-format to weirdly indent the first line in the 'SPLIT_POINTING_ENABLE' as the first command after the if.
this hints that any code addition in between the two - that possibly should run regardless, would break the if-def enabled code.
this can be solved by adding a pair of curly braces in the POINTING_DEVICE_MOTION_PIN part, to clearly denote which commands are to be skipped if the motion pin shows now activity.
Co-authored-by: Johannes <you@example.com>
* Add macros to extract parameters from keycode values
Implement both encoding and decoding for keycodes like TO(layer) or
LM(layer, mod) in one place, so that the decoding won't get out of sync
with the encoding.
While at it, fix some macros for creating keycode values that did not
apply the appropriate masks to parameters (and therefore could allow the
result to be out of range if a wrong parameter was passed).
* keymap_common: Use extraction macros for keycodes
* pointing_device_auto_mouse: Use extraction macros for keycodes
Fixes#18970.
* process_autocorrect: Use extraction macros for keycodes
* process_caps_word: Use extraction macros for keycodes
(Also fix a minor bug - SH_TG was not handled properly)
* process_leader: Use extraction macros for keycodes
(Technically the code is not 100% correct, because it always assumes
that the LT() or MT() action was a tap, but it's a separate issue that
already existed before the keycode changes.)
* process_unicode: Use extraction macros for keycodes
* process_unicodemap: Use extraction macros for keycodes
Static x & y should be the same type as touchData.xValue &
touchData.yValue: uint16_t.
Their delta could be larger than int8_t and should be constrained to
mouse_xy_report_t.