Commit Graph

35 Commits

Author SHA1 Message Date
Okke Formsma d38740cebf
Add timestamps to position and behavior events (#147)
* 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-10-10 17:32:53 -04:00
Pete Johanson 191a2d755a chore: clang-format the codebase.
* Use the LLVM style
* Override indent width (8) and column limit (100)
* Fixes #142.
2020-09-14 00:10:34 -04:00
Pete Johanson 6c8b0b53f0 refactor(bluetooth): More concise names. 2020-09-13 22:33:31 -04:00
Pete Johanson 39f980a06d feat(bluetooth): Add back profiles, split fixes.
* Add back in profiles, not using Zephyr
  BT identity infrastructure.
* Restore additional `&bt` commands for profile
  operations.
* Fix for split pairing and subscriptions, since
  Zephyr persists subscriptions across connects.
* Remove keymap from peripheral builds, reduces
  firmware size, and avoids unneeded attempts
  to send HID data.
2020-09-13 22:33:29 -04:00
Pete Johanson fc0812bd2e fix(bluetooth): Remove identity, minimal `bt`.
* Simplify the `bt` behavior to one current command
  `BT_CLEAR_BONDS_CMD`.
* Simplify BLE code for split and non-split keyboards.
* Remove keymap processing from split peripheral side.
2020-09-13 22:33:05 -04:00
Pete Johanson cf970efb98 feat(bluetooth): Proper bond management, identity support for non-splits
* Add `bt` behavior that can be used to perform certain actions,
  such as next/prev identity, reset identity, etc.
  NOTE: Multiple identities is only supported for non-split shields,
  due to missing Zephyr identity functionality for dual
  central/peripheral devices.
* Proper bond reset tied to action, that honors peripheral bonds,
  so folks can reset and pair to other hosts, without breaking
  bonds between splt halves.
2020-09-13 22:33:05 -04:00
Pete Johanson 68e72f9275 fix: Switch to single AUTHORS file.* Closes #164 2020-09-10 10:24:23 -04:00
Okke Formsma c9a82d71d0 fixes for feedback round 2 2020-09-02 16:41:39 +02:00
Okke Formsma c5ca664411 some fixes based on feedback 2020-09-02 15:26:06 +02:00
Okke Formsma c33931c72c Initial implementation of hold-tap 2020-09-01 19:41:08 +02:00
Cody McGinnis 033bb7bfc4 fix(behavior): add logging to toggle layer for tests 2020-08-28 16:21:31 -04:00
Cody McGinnis cbea2d5bed fix(behavior): none should not be transparent 2020-08-27 23:12:56 -04:00
Okke Formsma ebc3542aa6 fix bug in modtap bahavior which cleared the wrong keycode events 2020-08-23 14:46:52 +02:00
Pete Johanson 805ea77005 feat(behaviors): Add `&bootloader` behavior.
* Allow reset behavior to have a type property.
* Add `bootloader` node that triggers DFU UF2
  bootloader mode using the AdaFruit nrf52
  bootloader.
2020-08-21 11:23:45 -04:00
Pete Johanson c054feb3c9
Merge pull request #100 from petejohanson/behaviors/add-none
Add `&none` behavior.
2020-08-18 14:31:20 -04:00
Pete Johanson 63e02d60dc feat(behaviors): Add &none behavior 2020-08-18 14:28:11 -04:00
Cody McGinnis 7facb6eee8 fix(keymap): move the toggle layer logic to keymap.c 2020-08-18 14:02:25 -04:00
Cody McGinnis a82f990d4c feat(keymap): allow users to toggle layers 2020-08-18 14:02:24 -04:00
Pete Johanson 8a07938d9b Minor cleanup. 2020-07-31 23:29:32 -04:00
Pete Johanson 8bba1fb738 Major mod-tap improvements.
* Track active mods when mods or keycode
  events occur.
* Use the tracked mods when releasing or
  generating keycode events.
* Track pending/used status in one array, for
  improved storage efficency.
2020-07-31 14:38:10 -04:00
Pete Johanson f548f2a87c Initial stab at mod-tap improvements.
* Not working: Roll over + mod-tap with multiple
  mod-tap bindings!
2020-07-31 00:07:16 -04:00
Nick 6956094ac0 Add missing return To brightness up 2020-07-25 15:39:01 -05:00
Nick 564f787280 Add suggested changes 2020-07-25 14:53:42 -05:00
Nick ca569c8143 Initial RGB Underglow implementation 2020-07-24 22:37:00 -05:00
Nick bb09707bd2 Add base files and configuration for RGB underglow 2020-07-24 01:06:56 -05:00
Pete Johanson 34ff6190bd Initial behavior for key presses on encoder rotate 2020-07-22 14:54:18 -04:00
Pete Johanson 57e061ac91 Lots of cleanup of old events/behavior mash. 2020-06-30 15:21:42 -04:00
Pete Johanson 96ec16da92 Modifier event, tweaks for linker script. 2020-06-30 10:43:09 -04:00
Pete Johanson 9a991bf019 Initial event manager work, and two first events.
* 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-30 00:31:09 -04:00
Pete Johanson 55cf9db564 Fix consumer keys w/ refactored behaviors. 2020-06-22 11:06:01 -04:00
Pete Johanson 93635077e6 Implement momentary layer + transparent behaviors
* Implement "momentary layer" behavior with `&mo`
  reference.
* Implement basic "transparent" behavior with `&trans`
  reference.
2020-06-21 21:56:49 -04:00
Pete Johanson 223edf05ad Refactor global bindings, implement mod-tap.
* 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-21 21:43:44 -04:00
Pete Johanson 7e659851c8 Refactor matrix transform, positions pervasively
* Do mapping to positions right in kscan handler, and then
  surface positions throughout the API.
2020-06-20 17:54:52 -04:00
Pete Johanson d65629b9a0 Lots more pieces toward HID working again. 2020-06-20 00:11:39 -04:00
Pete Johanson c23d752917 Some initial work on behavior bindings for keymaps 2020-06-19 15:32:33 -04:00