summaryrefslogtreecommitdiff
path: root/app/src/behaviors
AgeCommit message (Collapse)Author
2021-11-26fix(underglow): Handle cycling effects on splits.Peter Johanson
* Convert relative effect cycling to absolute effect selection.
2021-11-26feature(split): behavior locality support.Pete Johanson
* GATT characteristic allowing passng data + behavior label to invoke the behavior on the peripheral side. * Behaviors have a locality setting to specify where they run. * Build reset/power/RGB on peripheral.
2021-11-09feat: hold/tap flavor tap-unless-interruptedjding
Implements new hold/tap flavor, tap-unless-interrupted Adds tests Adds docs
2021-11-01fix(behavior): Properly break in decision switch statement.jmding8
Co-authored-by: jding <jding@roblox.com>
2021-11-01feat(behaviors) Required keys for tap-hold behaviorsjmding8
* 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.
2021-07-17refactor(core): Move away from deprecated DT API.Pete Johanson
* 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-06-13fix(behaviors): Fix timing of delayed hold-tap triggerOkke Formsma
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-05-09fix(behaviors): Fix sticky keys quick-release for normal keypressesOkke Formsma
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-02-27fix(behaviors): Add missing hold-tap triggerOkke Formsma
A hold-tap trigger was missing in the scenario where a hold-tap behavior was queued for a while and it's timer should've run out.
2021-02-24feature(hold-tap): no-hold-flash for retro tapsOkke Formsma
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.
2021-02-24feature(hold-tap): Retro tappingOkke Formsma
2021-02-24refactor(hold-tap): improve switch statementsOkke Formsma
2021-02-24refactor(hold-tap): pretty print decision_momentOkke Formsma
2021-02-24refactor(hold-tap): create press_binding and release_binding functionsOkke Formsma
2021-02-24refactor(hold-tap): split hold state into interrupt and timerOkke Formsma
2021-02-24refactor(hold-tap): use enum for hold-tap statusOkke Formsma
2021-02-24refactor(hold-tap): simplify flavor enumOkke Formsma
2021-02-10style(hold-tap)!: Write hold-tap params with dashesOkke Formsma
tapping_term_ms -> tapping-term-ms quick_tap_ms -> quick-tap-ms The old style works, although it's deprecated.
2021-02-09feat(underglow): Convert HSB changes to absolute.Pete Johanson
* 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.
2021-02-09refactor(behaviors): Convert state dependent params.Pete Johanson
* Allow each behavior to map a relative binding, e.g. "toggle", to an absolute one, e.g. "on", before being invoked.
2021-02-09refactor(rgb): Expose explicit on/off command/API.Pete Johanson
2021-02-04refactor(core): Use /omit-if-no-ref/ for behaviors.Pete Johanson
* 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.
2021-02-02behaviors(hold-tap): Implement quick_tap_ms (TAPPING_FORCE_HOLD)Okke Formsma
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.
2021-02-02refactor(behaviors): simplify hold-taps by not using _TRANSFORM_ENTRYOkke Formsma
2021-02-02refactor(behaviors): factor out multiple uses of _TRANSFORM_ENTRYOkke Formsma
2021-01-28feature(sticky_keys): add quick-releaseOkke Formsma
when quick-release is enabled, the sticky key is released immediately after another key is pressed
2021-01-24refactor(modifiers): define is_mods functionOkke Formsma
2021-01-22feat(grave-escape): implement grave-escapeOkke Formsma
closes #85
2021-01-20refactor(core): Combine `is_` and `cast_` event functions.Pete Johanson
* Use a single `as_foo` generated function to conditionally return a certain event type from a generic `zmk_event_t*` pointer.
2021-01-20refactor(core): Extra event payloads to own types, refactor API.Pete Johanson
* 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.
2021-01-20refactor(core): Extra position state change data struct.Pete Johanson
* Separate header and data struct for the event. * Remove duplicate struct in split code.
2021-01-08(feat) Allow setting underglow color by key pressKemoNine
2021-01-02chore(behavior): use ZMK_BEHAVIOR_OPAQUE in to-layer behaviorOkke Formsma
2021-01-01refactor(behaviors): use ZMK_BEHAVIOR_OPAQUE and ZMK_BEHAVIOR_TRANSPARENTOkke Formsma
Use these instead of the magic return values 0 and 1 for behavior_driver_api return values.
2021-01-01refactor(events): return 'ZMK_EV_EVENT_BUBBLE' instead of magic number 0Okke Formsma
2020-12-29(feature) Add &to keycode/behavior (#489)KemoNine
feat(behaviors): Add `&to` behavior to switch to a layer.
2020-12-28refactor: replace filename hyphens with underscoresinnovaker
Aligns *.h and *.c to underscore naming convention. These were kept (with warnings) for backwards compatibility with external boards/shields: - kscan-mock.h - matrix-transform.h They should be removed in the future. PR: #523
2020-12-17fix(sticky keys): add 0xFF mask to usage_pageinnovaker
Aligns unpacking of usage_page with its equivalent line in keycode-state-changed.h PR: #520
2020-12-15refactor(sticky keys): use DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) instead ↵Okke Formsma
of DT_NODE_EXISTS(DT_DRV_INST(0))
2020-12-15refactor(sticky keys): use pointer to avoid repetition in store_sticky_keyOkke Formsma
2020-12-15refactor(sticky keys): rename ZMK_BHV_STICKY_KEY_POSITION_NOT_USED to ↵Okke Formsma
ZMK_BHV_STICKY_KEY_POSITION_FREE
2020-12-15refactor(sticky keys): rename timer_is_started to timer_startedOkke Formsma
2020-12-14refactor(app): replace `struct device *` with `const struct device *`innovaker
Replaced with RegExp: /(?<!const )(struct device \*)/g See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace `config_info` with `config`innovaker
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace Zephyr integer types with C99 integer typesinnovaker
u8_t → uint8_t u16_t → uint16_t u32_t → uint32_t u64_t → uint64_t s8_t → int8_t s16_t → int16_t s32_t → int32_t s64_t → int64_t Prerequisite for #223 See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0 PR: #467
2020-12-06fix(sticky keys): fix tapping-sticky-keys bug.Okke Formsma
Sticky keys should be cleared when they were tapped in rapid succession before the timer runs out.
2020-12-06fix(sticky keys): always clear sticky key when releasing the behaviorOkke Formsma
2020-12-06fix(sticky keys): use correct timestamp when clearing sticky key in timerOkke Formsma
2020-12-06fix(sticky keys): simplify timer managementOkke Formsma
2020-11-29bugfix(sticky keys): release active sticky keys properlyOkke Formsma
see https://github.com/zmkfirmware/zmk/issues/445