Commit Graph

352 Commits (f56580404d44af8a0e8b7205618c084a9acb3772)

Author SHA1 Message Date
Joel Challis 403b0addea
Align magic keycodes (#19877) 2023-02-23 08:14:29 +11:00
Drashna Jaelre 48a79b08cc
Fix functions when `NO_ACTION_TAPPING` is defined (#11528) 2023-02-19 12:08:03 +11:00
Joel Challis f587a0c548
Align sequencer keycodes (#19875) 2023-02-18 15:44:36 +00:00
Drashna Jaelre a63808c23f
[Bug] Fix compiliation issue for Key Overrides (#19856) 2023-02-15 21:06:10 +00:00
Eric.a Gebhart db1eeea478
Add combo hook to allow per layer combo reference layers. (#16699)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2023-02-13 03:31:04 +11:00
Ryan bbf7a20b33
Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-02-13 03:19:02 +11:00
Drashna Jaelre fe02abc479
[Core] Tri Layer Keys (#19795)
Co-authored-by: wilba <wilba@wilba.tech>
Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-02-12 10:23:07 +11:00
Joel Challis 1d0b4c8d38
Tidy up use of keycode range helpers (#19756) 2023-02-10 21:10:14 +00:00
Ryan 2d843088a2
Normalise Swap Hands keycodes (#19720) 2023-01-30 18:37:19 +00:00
Ryan cf935d97ae
Fix functions with empty params (#19647)
* Fix functions with empty params

* Found a bunch more
2023-01-20 16:21:17 +00:00
Joel Challis d0ebafaea6
Align definition of unicode_map (#19452) 2023-01-01 11:54:12 +11:00
Ryan 1978007fae
Tap Dance: remove `qk_` prefix (#19313) 2022-12-14 12:40:25 -08:00
Stefan Kerkmann 962e4c0e18
[Test] Reset timer for every unit test and provide timestamps for log messages (#17028) 2022-12-15 02:31:08 +11:00
Ryan e2117564c5
Leader: remove `qk_` prefix (#19304) 2022-12-14 13:46:01 +11:00
Ryan 9e4cfcd181
UCIS: remove `qk_` prefix (#19302) 2022-12-14 13:44:36 +11:00
precondition 515dd18c28
Remove IGNORE_MOD_TAP_INTERRUPT_PER_KEY in favour of HOLD_ON_OTHER_KEY_PRESS_PER_KEY (#15741) 2022-12-13 22:20:07 +11:00
Joel Challis e4d2ba9a4d
Align haptic feedback keycode names (#18964) 2022-11-07 02:43:53 +00:00
Ryan 8b658dcc9a
Normalise MIDI keycodes (#18972)
* `MI_ON`, `MI_OFF`, `MI_TOG` -> `MI_TOGG`

* `MI_CH*`, `MI_CHU` -> `MI_CHNU`, `MI_CHD` -> `MI_CHND`

* `MI_VEL_*` -> `MI_VL*`, `MI_VELU`, `MI_VELD`

* `MI_TRNS_*` -> `MI_TR*`, `MI_TRNSU` -> `MI_TRSU`, `MI_TRNSD` -> `MI_TRSD`

* `MI_OCT_*` -> `MI_OC*`, `MI_OCTU`, `MI_OCTD`

* Misc controls

* Note keycodes

* Add legacy keycodes

* Regenerate keycodes

* Typo
2022-11-07 02:26:15 +00:00
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
Nick Brassel 219afaba42
Reworked backlight keycodes. (#18961)
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-11-06 08:11:59 +11:00
Joel Challis 69fa02c37d
Align audio keycode names (#18962)
* Align audio keycode names

* Update docs

* Update quantum
2022-11-05 17:05:19 +00:00
Joel Challis fd4c3f46fb
Align dynamic tapping term keycode names (#18963)
* Align dynamic tapping term keycode names

* regen header
2022-11-05 16:58:30 +00:00
Nick Brassel 5233c69bc6
Remove thermal printer. (#18959) 2022-11-06 00:15:55 +11:00
Joel Challis a69ab05dd6
Initial DD keycode migration (#18643)
* Initial DD keycode migration

* Sort magic keycodes
2022-11-05 10:30:09 +00:00
Ryan fe18df9d41
Normalise Dynamic Macro keycodes (#18939)
* `DYN_REC_START1` -> `QK_DYNAMIC_MACRO_RECORD_START_1`

* `DYN_REC_START2` -> `QK_DYNAMIC_MACRO_RECORD_START_2`

* `DYN_MACRO_PLAY1` -> `QK_DYNAMIC_MACRO_PLAY_1`

* `DYN_MACRO_PLAY2` -> `QK_DYNAMIC_MACRO_PLAY_2`

* `DYN_REC_STOP` -> `QK_DYNAMIC_MACRO_RECORD_STOP`

* Update docs
2022-11-03 23:01:06 +00:00
Ryan 5974d989fe
Normalise Unicode keycodes (#18898)
* `UC_MOD`/`UC_RMOD` -> `UC_NEXT`/`UC_PREV`

* `UNICODE_MODE_*` -> `QK_UNICODE_MODE_*`

* `UC_MAC` -> `UNICODE_MODE_MACOS`

* `UC_LNX` -> `UNICODE_MODE_LINUX`

* `UC_WIN` -> `UNICODE_MODE_WINDOWS`

* `UC_BSD` -> `UNICODE_MODE_BSD`

* `UC_WINC` -> `UNICODE_MODE_WINCOMPOSE`

* `UC_EMACS` -> `UNICODE_MODE_EMACS`

* `UC__COUNT` -> `UNICODE_MODE_COUNT`

* `UC_M_MA` -> `UC_MAC`

* `UC_M_LN` -> `UC_LINX`

* `UC_M_WI` -> `UC_WIN`

* `UC_M_BS` -> `UC_BSD`

* `UC_M_WC` -> `UC_WINC`

* `UC_M_EM` -> `UC_EMAC`

* Docs

* Update quantum/unicode/unicode.h
2022-10-31 21:15:12 +00:00
Ryan 22be7e79ac
Normalise Auto Shift keycodes (#18892)
* Normalise Auto Shift keycodes

* Add keycode table to main list

* Add old keycodes to legacy header
2022-10-28 13:53:15 +01:00
Ryan 2ff1d85290
Normalise Autocorrect keycodes (#18893) 2022-10-28 12:21:24 +01:00
Ryan efe520645e
Normalise Combo keycodes (#18877) 2022-10-27 13:59:58 +01:00
Ryan 002b58f0e4
Normalise Space Cadet keycodes (#18864) 2022-10-27 11:19:16 +01:00
Joel Challis ec2414c074
Deprecate `SECURE_*` keycodes for `QK_SECURE_*` (#18847)
* Deprecate SECURE_* keycodes for QK_SECURE_*

* Update keycode process

* Update process_secure.c

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2022-10-25 22:59:17 +01:00
Ryan 1d34f380eb
Deprecate `KEY_OVERRIDE_*` keycodes for `KO_*` (#18843) 2022-10-25 14:45:57 +01:00
Joel Challis 4f63be4d1d
Remove some assumptions on sequential keycode ranges (#18838) 2022-10-24 22:07:34 -07:00
Selene ToyKeeper e863c431f6
added BS_TOGG so BS_SWAP and BS_NORM can be on a single key (#18837)
Co-authored-by: Selene ToyKeeper <git@toykeeper.net>
2022-10-24 22:02:21 -07:00
Ryan a80b886751
Deprecate `CAPS_WORD`/`CAPSWRD` for `CW_TOGG` (#18834) 2022-10-24 17:30:37 +01:00
Ryan 6bbe8b6edd
Normalise Joystick and Programmable Button keycodes (#18832) 2022-10-24 15:50:33 +01:00
Ryan 7cbff9d921
Deprecate `KC_LOCK` for `QK_LOCK` (#18796) 2022-10-21 15:46:10 +01:00
Ryan b33fc34967
Deprecate `KC_LEAD` for `QK_LEAD` (#18792) 2022-10-21 14:25:54 +01:00
Ryan f0b2bfd5ca
Programmable Button API refactor and improve docs (#18641) 2022-10-15 14:33:24 +11:00
precondition 49030e3e5b
Use get_u16_str instead of snprintf in autoshift_timer_report (#18606) 2022-10-05 10:42:05 -07:00
Sergey Vlasov ca0c12847a
Fix layer switching from tap dances by redoing the keymap lookup (#17935) 2022-10-03 20:48:16 +11:00
Jason Ken Adhinarta c0e6a28bc6
Prevent tap dance from wiping dynamic macros (#17880) 2022-10-03 18:26:47 +11:00
Ryan be8907d634
Further refactoring of joystick feature (#18437) 2022-09-27 18:37:13 +10:00
Drashna Jaelre fb29c0ae53
[Core] Add getreuer's Autocorrect feature to core (#15699)
Co-authored-by: Albert Y <76888457+filterpaper@users.noreply.github.com>
2022-09-17 17:50:54 +10:00
Ryan 3d667f0970
Refactor Unicode feature (#18333) 2022-09-12 08:49:04 -07:00
Ryan 8833b28361
Remove `UNICODE_KEY_OSX` and `UC_OSX` (#18290) 2022-09-06 18:07:08 +01:00
QMK Bot 165c15e250 Merge remote-tracking branch 'origin/master' into develop 2022-09-06 04:26:03 +00:00
Joel Challis 0306bdf7fd
Remove use of legacy keycode (#18281) 2022-09-06 05:25:32 +01:00
Joshua Diamond e4bf832368
Add unicode mode change callbacks (#18235) 2022-08-31 16:39:16 -07:00
Jeff Epler 9632360caa
Use a macro to compute the size of arrays at compile time (#18044)
* Add ARRAY_SIZE and CEILING utility macros

* Apply a coccinelle patch to use ARRAY_SIZE

* fix up some straggling items

* Fix 'make test:secure'

* Enhance ARRAY_SIZE macro to reject acting on pointers

The previous definition would not produce a diagnostic for
```
int *p;
size_t num_elem = ARRAY_SIZE(p)
```
but the new one will.

* explicitly get definition of ARRAY_SIZE

* Convert to ARRAY_SIZE when const is involved

The following spatch finds additional instances where the array is
const and the division is by the size of the type, not the size of
the first element:
```
@ rule5a using "empty.iso" @
type T;
const T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

@ rule6a using "empty.iso" @
type T;
const T[] E;
@@

- sizeof(E)/sizeof(T)
+ ARRAY_SIZE(E)
```

* New instances of ARRAY_SIZE added since initial spatch run

* Use `ARRAY_SIZE` in docs (found by grep)

* Manually use ARRAY_SIZE

hs_set is expected to be the same size as uint16_t, though it's made
of two 8-bit integers

* Just like char, sizeof(uint8_t) is guaranteed to be 1

This is at least true on any plausible system where qmk is actually used.

Per my understanding it's universally true, assuming that uint8_t exists:
https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1

* Run qmk-format on core C files touched in this branch

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-08-30 10:20:04 +02:00