summaryrefslogtreecommitdiff
path: root/app/src/keymap.c
AgeCommit message (Collapse)Author
2021-11-22feature(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-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-02refactor(behaviors): factor out multiple uses of _TRANSFORM_ENTRYOkke Formsma
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-04feat(keymap): API for retrieving label for a layerPete Johanson
2020-12-29(feature) Add &to keycode/behavior (#489)KemoNine
feat(behaviors): Add `&to` behavior to switch to a layer.
2020-12-28refactor(app): replace zmk_keymap_layers_state with zmk_keymap_layers_state_tinnovaker
Aligns with typedef _t convention. PR: #531
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-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 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-09feature(keymaps): Keymap layer state event, highest layer APIKemoNine
* Fire an event w/ layer number, state, and timestamp when a layer is activated/deactivated. * Add `zmk_keymap_highest_layer_active()` query. Co-authored-by: KemoNine <mcrosson@kemonine.info>
2020-11-28feat(events): add timestamp to keycode_state_changed and sensor_eventOkke Formsma
These timestamps are necessary to correctly deal with delayed events due to hold-tap shenanigans.
2020-11-16fix momentary layer bug when top layer is not &transOkke Formsma
Key release events released keys on the wrong layer if the 'top layer' was not &trans above the &mo key. base <&mo 1> layer 1 <&kp B> This was caused by overwriting `zmk_keymap_active_behavior_layer[position]` after the &mo key was handled.
2020-11-03initial implementation for modifiersOkke Formsma
https://github.com/zmkfirmware/zmk/issues/86
2020-10-10Add timestamps to position and behavior events (#147)Okke Formsma
* Add timestamps to position events and behaviors. - Take original event timestamps into consideration so nested tap-holds have proper timing. - Add position and timestamp to keycode state changed event so the one-shot behavior can properly identify other keypresses and timings. - Add timestamp to position events received from peripheral * reduce number of arguments to behaviors
2020-09-14chore: clang-format the codebase.Pete Johanson
* Use the LLVM style * Override indent width (8) and column limit (100) * Fixes #142.
2020-09-10fix: Switch to single AUTHORS file.* Closes #164Pete Johanson
2020-09-01fix(core): track layer state with keypressCody McGinnis
2020-08-18fix(keymap): add brackets around if statement bodyCody McGinnis
2020-08-18fix(keymap): move the toggle layer logic to keymap.cCody McGinnis
2020-08-18feat(keymap): allow users to toggle layersCody McGinnis
2020-08-09Invoke called behavior after layer change.Pete Johanson
* If you press a key with a layer active, then deactivate the layer (e.g. releasing a `&mo`, then release the key, we currently may send the wrong key release event. * Fixes #67.
2020-08-06Remove debugging line that snuck in.Pete Johanson
2020-08-06Refactor to simpler keymaps.Pete Johanson
2020-07-22Initial behavior for key presses on encoder rotatePete Johanson
2020-07-22More sensor keymap work.Pete Johanson
2020-07-22Initial work on sensor bindings.Pete Johanson
2020-06-30Whitespace fix.Pete Johanson
2020-06-30Initial event manager work, and two first events.Pete Johanson
* Add initial event manager implementation, roughly mimicking Nordic's API. * Add `position_state_changed` and `keycode_state_changed` events. * Hook up HID and keymap to new events instead of using behaviour global event crazy.
2020-06-27Kyria left/right overlays, matrix transform fixesPete Johanson
* Refactor Kyria into separate left/right "revisions" of the Kyria shield, and include central kyria.dtsi file with common definition. * Fixes for keymaps to work fully with matrix transforms that override effective rows/columns. * Add ability for matrix transform to do row/col offsets, which is needed for split keyboards.
2020-06-22Fix consumer keys w/ refactored behaviors.Pete Johanson
2020-06-21Refactor global bindings, implement mod-tap.Pete Johanson
* Use extra comptible = "zmk,behavior-global" to add behaviors to global bindings for event notification. * Implement mod-tap, as a keymap binding and global one to skip tap if other keycode pressed while held.
2020-06-20Refactor matrix transform, positions pervasivelyPete Johanson
* Do mapping to positions right in kscan handler, and then surface positions throughout the API.
2020-06-19Some initial work on behavior bindings for keymapsPete Johanson
2020-06-16Rename keymap-transform to matrix-transform.Pete Johanson
* Clearer name to capture essence of the role of the transform.
2020-06-15Initial work on keymap transforms for non-standard matrixes.Pete Johanson
* Allows "gaps" for keyboards like Kyra. * Allows keyboards with matrixes that don't map the logical key locations to have normal looking keymaps when defined.
2020-06-08Move Zephyr app into subdirectory.Pete Johanson