Commit graph

294 commits

Author SHA1 Message Date
jding
4729e92c50 Merge branch 'upstream_main' into conditional_mod_tap 2021-10-30 20:06:13 +00:00
jding
caad69a37d build failures because enum starts at 1? 2021-10-30 15:46:54 +00:00
jding
26a6fbfefb rename other_key_down_position in decide_tap_positionally_preferred) 2021-10-30 15:41:41 +00:00
jding
db71a8e692 add compile-time hold_trigger_key_positions vs tap-positionally-preferred check 2021-10-30 15:29:41 +00:00
jding
63776e36b5 remove unnecessary if statement 2021-10-30 00:25:08 +00:00
jding
14f2b6e6ff clang 2021-10-30 00:01:59 +00:00
jding
45721afcf9 re-order function definitions 2021-10-29 23:58:16 +00:00
jding
a26e001bfd tests 2021-10-29 23:49:28 +00:00
jding
66531d97ec refactor, tap-positionally-preferred 2021-10-29 21:50:27 +00:00
jmding8
dbb31cbbe7 comments, no logic change 2021-10-29 15:53:30 +00:00
jmding8
1865ffa0c7 fix struct name 2021-10-29 04:06:12 +00:00
jmding8
a33e9e5966 flexible array 2021-10-29 04:02:47 +00:00
jmding8
f5426939ef fix minor typo in comment 2021-10-29 02:21:51 +00:00
jmding8
7f636baf73 rename to hold_trigger_key_positions 2021-10-29 02:21:11 +00:00
Jonathan Rascher
e3eb77dfc6 refactor(combos): Use ZMK_KEYMAP_EXTRACT_BINDING
Now that PR #506 is merged, we can address this TODO.
2021-10-20 23:36:31 -04:00
Richard Kjerstadius
a774ce8555 fix(display): Increase char buffer size to fit all symbols
Recent refactoring of the font handling seems to have broken the display
of the last symbol of the output status widget. From my analysis the
last symbol is truncated because the buffer simply is too small.
Increasing the buffer size to 9 fits all three possible symbols.
2021-10-12 12:00:21 -04:00
Nick Winans
f23f427cae fix(underglow): Run clang-format 2021-10-10 17:43:57 -07:00
Simon Malinge
c5b8dd85fd feat(underglow): Add support for configurable min/max brightness
Co-authored-by: jrhrsmit <jasper.770@gmail.com>
2021-10-10 17:43:57 -07:00
Peter Johanson
bc179b1030 feat(hid): Kconfig for basic/full consumer usages.
* Add ZMK_HID_CONSUMER_REPORT_USAGES choice to allow choosing
  between full consumer usage range, with poor OS compat,
  or basic consumer usage range, with broader compat.
2021-10-04 23:01:39 -04:00
Pete Johanson
91ba034896 feat(hid): Configurable NKRO HID report support.
* Add Kconfig settings for NKRO or HKRO (boot compatible), HID
  report types for keyboard page.
* Updated report storage and set/unset for each config.
2021-10-04 23:01:39 -04:00
Peter Johanson
3e6a3758ed refactor(display): Saner font selection/defaults.
* Only select fonts for the default built in status screen
* Leverage theme default fonts, instead of hardcoding theme
  details in each component.
2021-09-25 19:43:20 -04:00
Peter Johanson
2128b2b55f refactor(display): Output/layer/battery thread safety.
* Submit widget updates to display queue.
* Use mutex to control access to shared state for widgets.
2021-09-25 17:17:04 -04:00
Peter Johanson
063d98e3df feat(display): Optional dedicated work queue.
* Add new Kconfig settingsx to allow selecting system or dedicated
  work queue for performing UI updates.
* Allow UI updates to not block other system tasks when display is
  updating, especially important for e-ink displays.
2021-09-25 17:17:04 -04:00
Xudong Zheng
212a05feb3 fix(hog): use OR instead of AND for bitmap 2021-09-23 20:47:40 -04:00
Peter Johanson
a7908a94de fix(hog): encrypt perm for HID report map/ref.
* Workaround for ensuring macOS pairing happens early enough,
  for their stack, we require encryption for the hids report map and
  report ref characteristics as well, to trigger pairing ealier in the
  connection process for macOS.
2021-09-18 15:43:26 -04:00
jmding@gmail.com
48888318d1 clang, more tests 2021-09-15 05:19:01 +00:00
jmding@gmail.com
b182e422b2 rename feature 'positional hold-tap', and rewrite (again) 2021-09-13 22:48:36 -07:00
jmding@gmail.com
67db38efb4 fix NULL typecheck and add documentation note about tapping-term 2021-09-13 02:20:17 +00:00
jmding@gmail.com
6edeefa5aa minor cleanup 2021-09-12 23:09:22 +00:00
jmding@gmail.com
9a5d5d7415 refactor to eliminate additional field in active_hold_tap struct 2021-09-12 23:02:23 +00:00
jmding@gmail.com
e7b0f361d4 run clang lint 2021-09-12 05:40:23 +00:00
jmding@gmail.com
537feacdbc refactor to be keypress order aware 2021-09-12 04:28:32 +00:00
jmding@gmail.com
c63cde87fd Merge remote-tracking branch 'upstream/main' into conditional_mod_tap 2021-09-09 14:59:19 +00:00
Peter Johanson
e491c282e7 fix(display): Add proper LVGL label dep. 2021-08-27 23:06:28 -04:00
Peter Johanson
08687b1709 fix(display): Update output status on endpoint selection change. 2021-08-03 00:19:05 -04:00
Peter Johanson
d05d7ec2d2 feat(endpoints): Add endpoint select changed event. 2021-08-03 00:19:05 -04:00
Peter Johanson
9d34cf561e fix(usb): USB state changes in system thhread.
* Use a `k_work` to send usb status events from the system
  workqueue thread, not the USB work thread.
2021-08-03 00:19:05 -04:00
Nick Winans
1cafbd8069 fix(power): Manually trigger pm_low_power_devices() before sleep 2021-08-02 21:48:42 -04:00
Nick Winans
2b9deb824b feat(power): Update device power management Kconfig 2021-08-02 21:48:42 -04:00
Peter Johanson
65ff995033 fix(display): Avoid fault w/ LVGL API usage.
* Increment the tick from within the ISR itself.
* Don't call task handler until in the display callback.

PR: https://github.com/zmkfirmware/zmk/pull/736
2021-07-17 17:04:25 -04:00
Pete Johanson
2a69f31eb0 refactor(core): Move away from deprecated DT API.
* Move to `DEVICE_DT_INST_DEFINE` everywhere.

See: https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html#deprecated-in-this-release
PR: https://github.com/zmkfirmware/zmk/pull/736
2021-07-17 17:04:25 -04:00
innovaker
ad981c3bbd refactor(core): update power API to Zephyr v2.5.0
See: https://github.com/zephyrproject-rtos/zephyr/pull/29410
PR: https://github.com/zmkfirmware/zmk/pull/736
2021-07-17 17:04:25 -04:00
Okke Formsma
efa497c69b fix(behaviors): Fix timing of delayed hold-tap trigger
A hold-tap timer event would be triggered too soon if the hold-tap
was delayed for longer than its tapping-term. This may cause
accidental hold behavior when the correct behavior would be tap.

By queuing the timer event instead of executing it immediately,
other delayed events get a chance to be processed properly.
2021-06-13 10:44:18 -04:00
jmding8
acabc7a08b Add required keys for tap-hold behaviors 2021-06-12 18:25:34 -07:00
Jonathan Rascher
4e69a32103 fix(combos): Check each combo key, not just last
The current combo completion check only makes sure the last key in the
combo is set. This works when the combo is typed correctly initially, or
when reraising events in a combo of length two. However, it fails for
longer combos since the last event in pressed_keys might be set, but the
first (or subsequent) event in pressed_keys can be NULL thanks to
release_pressed_keys.

Also added a regression test.
2021-06-08 20:35:58 -04:00
Joel Spadin
0a9efbf85d fix(ble): Ignore out of range profiles
Don't allow selecting a BLE profile that is out of range to avoid
reading/writing past the end of the profiles array.
2021-06-08 20:33:43 -04:00
Okke Formsma
de4979bf58 fix(behaviors): Fix sticky keys quick-release for normal keypresses
Quick release for sticky keys failed for non-layer keys. The sticky key
was released just before the key that was supposed to be modified was
handled.

The issue was caused by an error in the sticky key logic, which released
the sticky key before handling the key up event.

Fixes #696.
2021-05-09 07:52:41 -04:00
Okke Formsma
0df7110058 fix(combos): Fix stuck keys when pressing long combos.
To properly retrigger hold-taps when a combo is not activated, some
position down events are reraised instead of released. The corresponding
position up events were never reraised, causing a potential stuck key.
2021-03-11 16:23:45 -05:00
Okke Formsma
8ebe0cd0c8 refactor(core): make the event manager a bit easier to read 2021-03-10 20:12:23 -05:00
Okke Formsma
c01243d1c6 fix(logging): remove unnecessary newline 2021-03-10 18:08:22 -05:00