Commit graph

65 commits

Author SHA1 Message Date
Peter Johanson 54dabffd0d feat(behaviors): Add caps word (&caps_word).
* Add new `&caps_word` behavior that acts like caps lock, but
  releases automatically when any "break" keycode is pressed.
2021-11-28 22:41:35 -05:00
Jonathan Rascher e9140b2da9 feat(conditional-layers): Implement feature
This is a generalization of the existing concept of tri-layer support
that's already well known. Essentially, a conditional-layer
configuration activates a particular layer (the then-layer) when one or
more other layers (the if-layers) are activated.

This is commonly used on ortho keyboards to activate a third "adjust"
layer while the primary two layers ("lower" and "raise") are active.
2021-11-15 05:49:23 -05:00
Peter Johanson d05d7ec2d2 feat(endpoints): Add endpoint select changed event. 2021-08-03 00:19:05 -04:00
Ally Parker a4aaa73f06 feat: Add WPM calculator and display widget 2021-01-23 18:38:31 -05:00
Okke Formsma 5eeb310b2f feat(grave-escape): implement grave-escape
closes #85
2021-01-22 19:27:18 -05:00
Okke Formsma feb0d5b90c feat(combos): initial implementation
closes #45
2021-01-13 21:07:41 -05:00
KemoNine d207c3c30f
(feature) Add &to keycode/behavior (#489)
feat(behaviors): Add `&to` behavior to switch to a layer.
2020-12-29 11:57:49 -05:00
Pete Johanson 4db5b169bf refactor(splits): Ability to override split role.
* Move central/peripheral setting to Kconfig.defconfig
  files to allow left/right .conf files to override
  central/peripheral role for splits.
2020-12-28 10:16:24 -05:00
Nick Winans 69d48c5715 refactor(settings): Only load used subtrees 2020-12-14 22:46:49 -05:00
Pete Johanson f7c16dfe69 refactor(power): Extract activity/idle detection.
* Refactor power to extract more general purpose
  activity detection/events.
* Use activity state to implement PM callback.
2020-12-14 15:31:10 -05:00
KemoNine 2427a4ab33
feature(keymaps): Keymap layer state event, highest layer API
* 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-12-09 09:35:57 -05:00
Pete Johanson e6a27b15c1 fix(kscan): Fix building kscan for tests. 2020-12-08 22:20:12 -05:00
innovaker 82625c6bb5 build(cmake): remove unnecessary SYSCALL_INCLUDE_DIRS for drivers
PR: #406
2020-12-04 16:53:52 -05:00
Pete Johanson b3f3362b50 feat(display): Initial widget/status screen work.
* Battery and output status widgets
* Built in status screen combining them.
* Ability to define a custom status screen factory
  function.
2020-12-02 16:04:56 -05:00
Pete Johanson d5ea426975 refactor(battery): Fire event on battery event. 2020-12-02 16:04:56 -05:00
Okke Formsma 76a6d7b4c5 feat(sticky keys): initial implementation 2020-11-28 00:58:24 -05:00
Pete Johanson 7d16186b7a fix(ble): Remove unpair combo code.
* Favor the settings reset images for this.
2020-11-10 14:53:03 -05:00
Nick 953de71646 feat(battery): Add BAS GATT reporting 2020-11-01 23:00:54 -05:00
Joel Spadin 2fe1fbb526 feat(endpoints): rename behavior to outputs
"Outputs" is probably easier for most people to understand than "endpoints".
2020-10-28 18:15:05 -05:00
Joel Spadin 600bba25f0 feat(endpoints): add preferred endpoint setting
Added a new setting to remember the user's preferred endpoint. When both USB and
BLE are connected, the preferred endpoint will be used.

Added a new behavior to control this setting. It supports commands:

    &end END_USB - Prefer USB output
    &end END_BLE - Prefer BLE output
    &end END_TOG - Toggle between USB and BLE
2020-10-28 18:15:05 -05:00
Joel Spadin 1d369ffa73 feat: only send HID reports to one endpoint
Added some utility functions and an event for tracking the state of the
USB connection.

Updated endpoints.c to select a single endpoint to send HID reports to
based on the status of the USB and BLE connections. Partially fixes #206.

Future commits will add a user setting to control which endpoint is used if
both USB and BLE are ready.
2020-10-28 18:15:05 -05:00
Pete Johanson ef37f17796
Merge pull request #109 from Nicell/underglow/state-persistence
Add RGB underglow state Kconfig and settings
2020-10-18 22:29:55 -04:00
Mega Mind b5e1c8a7ad New behavior for ext power control 2020-10-12 23:42:01 +08:00
Mega Mind 4d81b10ba7 Added driver to control the external power output
This PR adds support to control the external power output from controllers like nice!nano, nRFMicro etc

I have implemented based on my understanding of Pete suggestion on this feature.

Testing done:

    Tested by enabling and disabling the ext_power from application and verified
    Verified the application does not crash with boards that does not have ext_power support
    Note:
    I did not test this in nice!nano since I don't have the boards. Will get help from others once the behavior PR is up

Next Steps:

    Create a behavior PR to control enable/disable ext_power
2020-10-10 08:11:46 +08:00
Pete Johanson a7496ab064 feat(power): Initial deep sleep work.
* New ZMK_SLEEP Kconfig symbol to enable the functionality.
* Switch to PORT events that allows wake from deep sleep.
* Initial basic power management policy, with idle ms,
  and ignoring deep sleep if we detect a USB connection.
2020-10-06 17:24:36 -04:00
Pete Johanson bbf5a5905a refactor(usb): Report USB status w/o HID output. 2020-10-04 21:56:09 -04:00
Nick 18d21b0362 Merge remote-tracking branch 'upstream/main' into underglow/state-persistence 2020-09-15 14:41:59 -05: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
Okke Formsma c33931c72c Initial implementation of hold-tap 2020-09-01 19:41:08 +02:00
Okke Formsma 21fcab208e stop on fatal errors 2020-08-31 22:24:36 +02:00
Nick 979a5bffff fix(rgb): check if settings enabled 2020-08-23 15:56:18 -05:00
Nick c5c21022a2 Move settings load 2020-08-23 10:33:19 -05:00
Mega Mind 4efce4223a Use correct macro for board 2020-08-20 18:59:41 +08:00
Pete Johanson a65b746a86 fix(bluetooth): Add unpair combo if DT node exists 2020-08-19 23:34:34 -04:00
Pete Johanson 0d3cfa8596
Merge pull request #99 from petejohanson/core/bluetooth-unpair-magic-combo
Add magic combo for unpairing BT devices on start.
2020-08-18 19:21:43 -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 a82f990d4c feat(keymap): allow users to toggle layers 2020-08-18 14:02:24 -04:00
Pete Johanson 4402e4fbc7 feeature(bt): Add "unpair combo" on startup.
* Especially for splits, we need the ability to
  unpair all paired devices as  sledgehammer
  if we need to "reset things", and doing so via
  keymaps isn't suitable.
* Allows shields to define a collection of key
  positions that if all held 2 seconds after
  startup, will unpair all existing pairs for the
  device.
2020-08-18 13:17:10 -04:00
Pete Johanson f83ec5ce2b Refactor to using .keymap files
* Still just devicetree keymaps.
* Filename can now use `<board>.keymap` or
  `<shield>.keymap` convention, including
  overrides for revisions, etc.
2020-08-06 10:32:06 -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
Pete Johanson 4e5a819f3a
Merge pull request #64 from Nicell/feature/rgb_underglow
Initial RGB Underglow implementation
2020-07-26 21:43:43 -04:00
Pete Johanson d80063ff51 Initial display support. 2020-07-25 23:10:40 -04:00
Nick 564f787280 Add suggested changes 2020-07-25 14:53:42 -05:00
Nick 295af93289 Only include behavior if feature enabled 2020-07-24 22:48:48 -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