qmk-firmware/quantum
Sergey Vlasov a7b2f4233c
Fix keycode parameter extraction to match the new DD keycodes (#18977)
* 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
2022-11-06 21:39:05 +00:00
..
audio In honor of king terry (#17387) 2022-06-23 02:47:15 +01:00
backlight [Core] PWM Backlight for RP2040 (#17706) 2022-10-04 23:10:24 +02:00
bootmagic Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
debounce Make debounce() signal changes in the cooked matrix as return value (#17554) 2022-07-07 10:00:40 +02:00
encoder/tests Asymmetric encoders, encoder tests. (#16068) 2022-03-08 16:58:05 +11:00
keymap_extras Relocate US ANSI shifted keycode aliases (#18634) 2022-10-07 23:36:38 +01:00
led_matrix Fix Per Key LED Indicator Callbacks (#18450) 2022-10-04 15:24:22 -07:00
logging [Fix] Patches after printf library update (#17584) 2022-07-07 14:14:09 +02:00
painter [QP] Add RGB565 surface. Docs clarification, cleanup, tabsification, and reordering. (#18396) 2022-09-19 07:30:08 +10:00
pointing_device Fix keycode parameter extraction to match the new DD keycodes (#18977) 2022-11-06 21:39:05 +00:00
process_keycode Fix keycode parameter extraction to match the new DD keycodes (#18977) 2022-11-06 21:39:05 +00:00
rgb_matrix Fix rgb_matrix_set_flags_noeeprom declaration (#18860) 2022-10-27 09:52:51 +01:00
rgblight Remove rgblight_list.h (#18878) 2022-10-27 23:50:14 +01:00
send_string Reduce includes for send_string header (#18952) 2022-11-05 21:45:40 +11:00
sequencer Reduce includes for sequencer header (#18946) 2022-11-03 20:44:36 +00:00
split_common Implement split comms watchdog (#18599) 2022-10-06 20:52:42 +11:00
unicode Normalise Unicode keycodes (#18898) 2022-10-31 21:15:12 +00:00
wear_leveling RP2040 emulated EEPROM. (#17519) 2022-07-02 15:18:50 +10:00
action_code.h Initial DD keycode migration (#18643) 2022-11-05 10:30:09 +00:00
action_layer.c docs: some typos (#18582) 2022-10-05 17:32:07 +01:00
action_layer.h Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
action_tapping.c Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674) 2022-06-24 12:40:09 +02:00
action_tapping.h Add GET_TAPPING_TERM macro to reduce duplicate code (#16681) 2022-04-16 11:24:09 -07:00
action_util.c Fix oneshot toggle logic (#16630) 2022-03-14 01:11:42 +00:00
action_util.h Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
action.c Programmable Button API refactor and improve docs (#18641) 2022-10-15 14:33:24 +11:00
action.h [Bug] Add key event check to is_tap_record and remove is_tap_key (#18063) 2022-08-15 16:40:51 +02:00
bitwise.c Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
bitwise.h Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
caps_word.c Reduce includes for caps_word header (#18948) 2022-11-03 23:42:58 +00:00
caps_word.h Reduce includes for caps_word header (#18948) 2022-11-03 23:42:58 +00:00
color.c Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
color.h fixed typo in orange HSV colors decalartion (#15976) 2022-01-22 06:12:14 +00:00
command.c [Fix] Patches after printf library update (#17584) 2022-07-07 14:14:09 +02:00
command.h Remove legacy keycode use from command (#18002) 2022-08-12 03:03:36 +01:00
config_common.h Remove quantum/audio from global VPATH (#18753) 2022-10-20 14:41:45 +01:00
crc.c Reduce includes for crc header (#18947) 2022-11-03 21:36:58 +00:00
crc.h Reduce includes for crc header (#18947) 2022-11-03 21:36:58 +00:00
debounce.h Make debounce() signal changes in the cooked matrix as return value (#17554) 2022-07-07 10:00:40 +02:00
deferred_exec.c Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
deferred_exec.h Advanced deferred_exec for core-side code. (#15579) 2022-01-10 18:26:46 +00:00
digitizer.c Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
digitizer.h Digitizer HID interface : absolute coordinates for mouse cursor (#12851) 2021-08-18 04:52:44 +10:00
dip_switch.c Reduce includes for dip_switch header (#18951) 2022-11-04 11:54:35 +00:00
dip_switch.h Reduce includes for dip_switch header (#18951) 2022-11-04 11:54:35 +00:00
dynamic_keymap.c Formalise keyboard- and user-specific EEPROM blocks (#18874) 2022-11-04 19:20:11 +00:00
dynamic_keymap.h Add support for encoder mapping. (#13286) 2022-03-09 19:29:00 +11:00
dynamic_macro.h Normalise Dynamic Macro keycodes (#18939) 2022-11-03 23:01:06 +00:00
eeconfig.c Formalise keyboard- and user-specific EEPROM blocks (#18874) 2022-11-04 19:20:11 +00:00
eeconfig.h Formalise keyboard- and user-specific EEPROM blocks (#18874) 2022-11-04 19:20:11 +00:00
encoder.c Use TAP_CODE_DELAY for encoder mapping by default (#18098) 2022-08-28 21:53:08 -07:00
encoder.h Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
haptic.c [Feature] Add support for multiple switchs/solenoids to Haptic Feedback engine (#15657) 2022-05-15 21:24:35 +10:00
haptic.h haptic: Feature to disable it when usb port is not configured or suspended. (#12692) 2021-11-02 16:54:29 +11:00
joystick.c Further refactoring of joystick feature (#18437) 2022-09-27 18:37:13 +10:00
joystick.h Further refactoring of joystick feature (#18437) 2022-09-27 18:37:13 +10:00
keyboard.c Programmable Button API refactor and improve docs (#18641) 2022-10-15 14:33:24 +11:00
keyboard.h [Core] Process all changed keys in one scan loop, deprecate QMK_KEYS_PER_SCAN (#15292) 2022-08-06 20:51:13 +10:00
keycode_config.c PoC: Swap Escape and Caps (#16336) 2022-07-02 22:08:48 +10:00
keycode_config.h [Core] Add getreuer's Autocorrect feature to core (#15699) 2022-09-17 17:50:54 +10:00
keycode.h Initial DD keycode migration (#18643) 2022-11-05 10:30:09 +00:00
keycodes.h Reworked backlight keycodes. (#18961) 2022-11-06 08:11:59 +11:00
keymap_common.c Fix keycode parameter extraction to match the new DD keycodes (#18977) 2022-11-06 21:39:05 +00:00
keymap_introspection.c Start moving towards introspection-based data retrieval (#18441) 2022-09-29 18:25:55 +01:00
keymap_introspection.h Start moving towards introspection-based data retrieval (#18441) 2022-09-29 18:25:55 +01:00
keymap.h Start moving towards introspection-based data retrieval (#18441) 2022-09-29 18:25:55 +01:00
led_tables.c Remove unused LED_BREATHING_TABLE 2020-03-06 22:29:01 -08:00
led_tables.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
led.c quantum: led: split out led_update_ports() for customization of led behaviour (#14452) 2022-10-06 21:24:41 +11:00
led.h quantum: led: split out led_update_ports() for customization of led behaviour (#14452) 2022-10-06 21:24:41 +11:00
main.c Quantum Painter (#10174) 2022-04-13 18:00:18 +10:00
matrix_common.c Merge remote-tracking branch 'origin/master' into develop 2022-08-07 19:33:39 +00:00
matrix.c Make debounce() signal changes in the cooked matrix as return value (#17554) 2022-07-07 10:00:40 +02:00
matrix.h Custom matrix lite support for split keyboards (#14674) 2021-12-27 21:03:40 +11:00
mousekey.c add "inertia" mode for mouse keys (#18774) 2022-10-26 20:49:44 +01:00
mousekey.h add "inertia" mode for mouse keys (#18774) 2022-10-26 20:49:44 +01:00
pointing_device_internal.h [Core] Introduce pointing device specific debug messages (#17663) 2022-08-29 19:16:49 +02:00
programmable_button.c Programmable Button API refactor and improve docs (#18641) 2022-10-15 14:33:24 +11:00
programmable_button.h Programmable Button API refactor and improve docs (#18641) 2022-10-15 14:33:24 +11:00
quantum_keycodes_legacy.h Reworked backlight keycodes. (#18961) 2022-11-06 08:11:59 +11:00
quantum_keycodes.h Fix keycode parameter extraction to match the new DD keycodes (#18977) 2022-11-06 21:39:05 +00:00
quantum.c Remove thermal printer. (#18959) 2022-11-06 00:15:55 +11:00
quantum.h Remove thermal printer. (#18959) 2022-11-06 00:15:55 +11:00
raw_hid.h Relocate protocol files within tmk_core/common/ (#14972) 2021-10-28 22:31:59 +01:00
ring_buffer.h Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
secure.c Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
secure.h Enhancement and fixes of "Secure" feature (#16958) 2022-05-14 23:07:08 +01:00
sync_timer.c Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
sync_timer.h Relocate protocol files within tmk_core/common/ (#14972) 2021-10-28 22:31:59 +01:00
util.h Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
variable_trace.c clang-format changes 2019-08-30 15:01:52 -07:00
variable_trace.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
velocikey.c Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
velocikey.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
via.c Initial DD keycode migration (#18643) 2022-11-05 10:30:09 +00:00
via.h Initial DD keycode migration (#18643) 2022-11-05 10:30:09 +00:00
virtser.h Relocate protocol files within tmk_core/common/ (#14972) 2021-10-28 22:31:59 +01:00
wpm.c [Bug] Fix compilation issue with WPM (#18965) 2022-11-05 19:05:01 +00:00
wpm.h Reduce includes for wpm header (#18949) 2022-11-04 00:50:59 +00:00