* Add optional `hold-trigger-key-positions` hold-tap configuration
* Leverage configuration for decision making around when to trigger
hold decision in hold-taps.
* Add docs for new configuration.
* Tests for the new config/decision logic.
Switched the GPIO matrix driver to debouncing using a simple integrator
algorithm. Whenever a key is pressed, we now scan at a rate controlled
by debounce-scan-period-ms (default 1 ms) until all keys are released,
then return to either waiting for an interrupt or polling more slowly.
The timers for key press and release can now be controlled separately,
so debounce-period is deprecated in favor of debounce-press-ms and
debounce-release-ms. Global Kconfig options
ZMK_KSCAN_DEBOUNCE_PRESS_MS and ZMK_KSCAN_DEBOUNCE_RELEASE_MS are also
added to make these easier to set.
Added documentation for debouncing options.
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.
* 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.
* 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.
* 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.
For split keyboards using an IO expander over TRRS/i2c, if the
right half isn't connected, we should be able to gracefully
fallback to the left side still working.
Refactored the GPIO matrix kscan driver so that only the data and config
structures are defined in the foreach macro. Functionality is unchanged
except for the addition of DT properties to adjust polling speed.
This should make it easier to add other enhancements later, like
improved and customizable debounce behavior.
My Planck rev 6.1 would not register any keys without "col2row".
I also had to apply a matrix_transform in order to move them to the
correct position. Peeking into #228 helped for finding this.
I also add transforms for the 2u spacebar layouts.
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.
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.
This test doesn't test a long combo that completes, but rather one
that's incomplete (so the combo doesn't trigger). Renaming to avoid
confusion when we add more long combo tests.
This commits adds a delay of 20ms on initializing the external
power control driver. Previously, OLED's i2c driver is failing to
initialize the display. This commit fixes that issue.
Signed-off-by: Anthony Amanse <ghieamanse@gmail.com>
This commit fixes the pin definition for BlueMicro840. Based on the
schematics, the blue led is at pin 1.10.
Signed-off-by: Anthony Amanse <ghieamanse@gmail.com>
By setting CONFIG_DEBUG, the native_posix builds will not be optimized
which makes debugging them much nicer.
By setting CONFIG_SYS_CLOCK_TICKS_PER_SEC to 1000, debug prints have a
higher resolution and not always show up as multiples of 10ms.
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.
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.
This is an improvement on retro-tap, solving the 'flashing hold' issue
users people experience.
When the tapping-term expires, the hold key is normally pressed. When
retro-tap is enabled, this is undesirable; only an interrupted hold-tap
should trigger the hold behavior.
This change disables the hold behavior for the 'STATUS_HOLD_TIMER'
state when retro-tap is enabled, and makes sure the
'STATUS_HOLD_INTERRUPT' state will be triggered when appropriate.
* Public type for HSB led color.
* New API for calculating "next" HSB based on current
state.
* Update behavior to convert the increment/decrement
commands to absolute command as well.
* feat(nibble): add underglow support for nice_nano builds
* feat(nibble): add encoder to top, left most column to match standard assembly documentation
* refactor(nibble): add layer labels
* feat(nibble): add support for optional display ; off by default
* feat(nibble): add README
* fix(nibble): adjust oled rotation for easier reading
* fix(nibble): add additional note about enabling oled
* refactor(nibble): convert keymap to use tabs instead of spaces
* refactor(nibble): enable oled in dts/overlay by default
* refactor(nibble): cleanup alignment and formatting in nibble keymap
* refactor(nibble): re-align top most row of keymap to be sensible
* refactor(nibble): cleanup kscan map alignment
* refactor(nibble): indent first row of map/transform to properly align with physical columns
* fix(nibble): remove dangling code block from readme
Co-authored-by: KemoNine <mcrosson@kemonine.info>
Add a little delay so any capacitors connected to the ADC for the BVD can charge up when using power_gpios
Co-authored-by: Jasper Smit <jrhrsmit@gmail.com>
* Use lesser-known DT features to skip behaviors not referenced
in the user keymap
* Update the behaviors to skip code if no nodes found.
* Remove some empty config/data structs where unused in
behaviors.
Tap-and-hold a hold-tap to hold the tap behavior so it can repeat.
After a tap, if the same key is pressed within `quick_tap_ms`, the
tap behavior is always picked.
This is useful for things like `&ht LSHFT BACKSPACE` where holding
the backspace is required.
Implements #288.
* Add easier macros for conditional polling/interrupt code.
* Properly continue polling on intervals, without extra
enable/disable code for pins that is superfluous when not trying to
deal with interupts firing.
* Fix to allow multiple GPIO drivers when doing splits w/ IO expanders
this makes LS(LEFT_CONTROL) work as if shift and control were both
pressed explicitly. Previously, the left shift would have been released
as soon as another key was pressed. The implicit behavior is useful in
case of LS(NUMBER_1) when rolling over to other keys.
Also see #361.
* Make it easier to use *just* event payloads by defining the data,
and then having event manager macros generate "wrapper structs"
* Improve is_*/cast_* APIs to hide details of full event struct.
* Create `zmk_event_t` typedef to pass to event handlers.
* Bring event names inline w/ consistent `zmk_` prefix.
* If various events get dropped, we can end up with duplicate
codes in our report, so tweak to ensure we look for all matches
and clear them when we have a keycode released.
Aligns with the HID specification.
Usage page values were sometimes declared as uint8_t and sometimes uint16_t. This commit aligns all instances with the HID specification for consistency.
PR: #521