Commit graph

1920 commits

Author SHA1 Message Date
Sophie Tyalie
34d9eb0e96 Behavior: Add custom lock functionality
Custom lock behavior can now be defined and actively used in the
keyboard.

A lock is toggled by typing a key, containing reference to the root
variable definition (`compatible = "zmk,behavior-custom-lock.yaml"`).

In order to have "A pressed -> Lock pressed -> A released" behave
correctly, this commit introduces a queue for currently pressed keys.
A release of such a key would then release the previous used behavior,
instead of the behavior the current lock state would suggest.

The size of the queue can be adjusted with `ZMK_BHV_LOCK_KEY_MAX_HELD`

Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
2022-11-17 16:52:46 +01:00
Sophie Tyalie
dadf1e611f Behavior: Change way lock keys are defined in dts
Previously the definition was copied almost 1:1 from the `none` behavior
in order to set up the important files and have a small running, but
featureless sample.

This change introduces a way to actually configure the custom lock
behavior, using the following syntax:

```
behaviors {
  dead_lock_prevent {
    compatible = "zmk,behavior-custom-lock";

    // to define a key
    dead: dead_key {
      #binding-cells = <2>;
      bindings = <&kp>, <&kp>;
    }

    // or to define a macro
    deadm: dead_macro {
      #binding-cells = <2>;
      bindings = <&macro>, <&kp>;
    }
  }
}
```

Additionally, there's now no standard definition flying around (deletion
of `dts/behaviors/custom_lock.dtsi`)

Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
2022-11-17 13:14:57 +01:00
Sophie Tyalie
776b118d95 CustomLock: add basic file structure
This is the first commit introducing custom lock behavior. Currently
does nothing, except existing and that one can reference it in the
keyboard layout not dissimilar to e.g. `&none`.

The code is also orientated along the latter for right now, ready to be
extended.

Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
2022-11-15 16:40:47 +01:00
Michael Anthony
6e7c2a08a2
fix(docs): Update link to Zephyr led docs
* Change Zephyr gpio-leds link to 3.0.0
2022-11-14 16:58:28 -06:00
jhorology
768fc4a5e5 fix: HID report descriptor 2022-11-10 22:15:06 -06:00
Albert Y
1e98ea0afb fix(ci): Refactor west build step 2022-11-10 22:12:01 -06:00
Peter Johanson
a9048956b5 feat(shields): Add splitkb.com Aurora Corne. 2022-11-10 21:05:26 -06:00
byran.tech
c7d83fb951
fix(docs): changed MacOS to macOS as per Apple styling 2022-11-09 20:38:08 -06:00
Terence Stenvold
9847a4c5d5
fix(docs): copy error not exclusive to Apple silicon 2022-11-09 14:56:22 -06:00
Peter Johanson
2364960f84 feat(shields): Add splitkb.com Aurora Sweep. 2022-11-04 12:13:16 -05:00
Okke Formsma
a61eac9139
fix(behaviors): make tap dances work on a combo
* Tap dance event handler goes after combos
* Add test
2022-11-01 15:13:19 -05:00
HookyQR
d393247e15
fix(display): Set bits per pixel and color depth on n!v 2022-10-30 19:50:21 -05:00
Albert Y
4e11913127
feat(docs): troubleshooting steps for macOS 13 Finder bug 2022-10-27 21:03:16 -05:00
Peter Johanson
3353712bc1 fix(docs): npm start to work from Docker.
* Listen on 0.0.0.0 so testing docs within our container works
  properly with port forwarding.
2022-10-26 23:02:54 -05:00
Peter Johanson
a02eb28271 fix(docs): Move to data-tooltip for profiler.
* Fix ESLint warning by using `data-` prefixed custom attr.
2022-10-26 23:02:54 -05:00
Peter Johanson
2d7c8f6073 chore(docs): Bump docusaurus and run audit fix. 2022-10-26 23:02:54 -05:00
Jay Greco
41fdd07315 feat(boards): Add nullbits SNAP shield 2022-10-25 07:50:56 -05:00
dependabot[bot]
f59da74a3e chore(deps): bump actions/checkout from 2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 22:49:54 -05:00
Albert Y
b90e3ae03d
fix(ci): Replace workflow set-output with environment variables
* Needed for deprecation: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-10-22 00:50:44 -04:00
Nick Winans
d3d5b8eb8a
fix(displays): Adjust alignment and spacing
* Adjust alignment and spacing
* Fix char array lengths
2022-10-21 23:10:55 -04:00
ebastler
c9eb63199a
feat(keymaps): add NUHS/NUBS alias for Non-US-Backslash/Non-US-Hash 2022-10-17 21:48:19 -04:00
byran.tech
3f00f14e36
feat(docs): Added a Spelling Error Caution Notice 2022-10-15 14:00:09 -05:00
Robert U
ef2e6e9156
feat(behaviors): Add mod-morph keep-mods
* Update docs for mod-morph
* Add unit tests for mod-morph
* Add keep-mods to DT binding

Co-authored-by: Martin Aumüller <aumuell@reserv.at>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2022-10-14 20:40:28 -05:00
Nick Winans
18b8b9b3a5
fix(shields): Disable idle blanking on nice!view 2022-10-14 11:39:47 -05:00
Nick Winans
bdc706f88d
docs(power profiling): add nice!view 2022-10-07 20:43:12 -04:00
Peter Johanson
605d88f266 feat(ble): Default a few configs for DIS GATT svc.
Default values for DIS GATT characteristics for:

* Vendor ID
* Product ID
* Manufacturer
* Model
2022-10-05 11:34:37 -04:00
Joe Peterson
a035fe4cc8 docs(codes): Windows Support: F20-F24
F20-24 are confirmed to work on Windows 11 via a web based keyboard
tester

Refs: #1476
2022-10-05 09:01:37 -04:00
Joe Peterson
fd5e9e1403 docs(codes): Windows Support: F13-F19
F13-F19 are confirmed to work on Windows 11 in VSCode 1.71.2.

Refs: #1476
2022-10-05 09:01:37 -04:00
Pavel Glushkov
1e25ee77d2
fear(boards): Add nrfmicro_13_52833 board
* Add nrfmicro_13_52833 board definition.

Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-10-02 22:01:55 -04:00
zhiayang
cc3d5529fd
feat(drivers): Driver for MAX7318 GPIO expander (#1295)
Add driver for max7318 i2c gpio expander

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-09-29 21:22:01 -04:00
Nick Winans
3d3c45bc80
feature(shields): Add nice!view
* Use two shield system, nice_view, and nice_view_adapter
* Build system fixes for interconnect use.
2022-09-29 21:11:26 -04:00
Peter Johanson
30e9accc95 feat(docs): Wait options for matrix driver.
* Document `CONFIG_ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS` and
  `CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS` options
2022-09-29 01:06:54 -04:00
Peter Johanson
9782518397 feature(drivers): Option for read wait on matrix.
* Add a new Kconfig option, `ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS`
  to delay reading inputs after setting an output active.
2022-09-29 01:06:54 -04:00
innovaker
0b39bf4336 ci: remove 4- prefix from zephyr-modules cache keys
This is no longer required.
2022-09-28 04:08:43 +01:00
dependabot[bot]
fad8dd6612 chore(deps): bump terser from 5.9.0 to 5.14.2 in /docs
Bumps [terser](https://github.com/terser/terser) from 5.9.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-25 23:47:15 -04:00
Kurtis Lew
8976b353ae fix(docs): Correct mo_tog implementation in tabbed menu 2022-09-25 20:06:20 -05:00
ReFil
b655554b03
refactor(boards): CRBN and Planck keymap fixes
* Update planck_rev6.keymap

Third layer was causing problems so i moved reset and bootloader to second layer

* BT_sel functions

A customer requested this so we added it

* Update crbn.keymap

Co-authored-by: Nick Winans <nick@winans.codes>
2022-09-22 15:14:09 -04:00
David A. Bell
8f67333957 Update docs/docs/behaviors/hold-tap.md
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2022-09-21 23:44:09 -05:00
David A. Bell
9756a16306 fix(docs): Consistent naming in Mo-Tog example.
Updated all references in example to conform to Hold action-Tap action wording order.
2022-09-21 23:44:09 -05:00
David A. Bell
597a48ff2d Update hold-tap.md
The bindings for the toggle-layer-on-tap/momentary-layer-on-hold example code were backwards, resulting in toggle-on-hold. This also made momentary unachievable.
2022-09-21 23:44:09 -05:00
ReFil
cc6dd5fc49 chore(lighting): fix deprecation
Removed deprecated macros, replace with correct Zephyr 3 implementation
2022-09-13 09:51:46 -04:00
Robert U
3f28a55452
fix(docs): Fix ambiguous tap-preferred desc. 2022-09-11 21:06:04 -04:00
John Drogo
6124d254f9 fix(usb): add USB_DC_RESUME to supported states
All credit for this one goes to @xudongzheng (thanks for helping debug
this!). Should fix the issue where keyboards go unresponsive after their
host machine wakes from sleep due to the USB driver entering an error
state. I was able to both reliably reproduce the issue before the patch
goes in and confirmed it no longer occurs post patch.

The `USB_DC_RESUME` state indicates the host event has resumed the connection.
Adding it to the list of valid connection states to prevent the error
when waking from sleep.

Zephyr API Link:
https://docs.zephyrproject.org/apidoc/latest/group____usb__device__controller__api.html#gac09e3e0af1a2b41a5bfbad91f900baf7

fixes #1372
2022-09-11 13:00:20 -04:00
Ben
41bfc56e13
feat(board): add puchi_ble_v1 to boards
* feat(board): Add Puchi-BLE v1 board
2022-09-05 18:15:24 -04:00
Elliot Pahl
ce7a0e2b6c
feat(shields): Add Eternal Keypad
* Add Eternal Keypad

Co-authored-by: Duccio <ducciobreschi@gmail.com>
2022-09-05 18:07:02 -04:00
Shreyas
391f80f069
feat(hid): Add C_AC_DESKTOP_SHOW_ALL_APPLICATIONS
* support for C_AC_DESKTOP_SHOW_ALL_APPLICATIONS

Co-authored-by: Shreyas Kale <shreyaskale@Shreyass-MacBook-Pro.local>
2022-08-22 00:27:47 -04:00
byran.tech
b21ddcf79a
fix(docs): added concrete number for Bluetooth advertising name length
* Update new-shield.md
* Update config docs.
2022-08-19 10:29:12 -04:00
Anton
f238001904
doc(keymaps): fix typo (#1425) 2022-08-12 07:37:06 -04:00
Pete Johanson
fc511e40cc
fix(behaviors): Fixing erroneous combo triggering, hold-taps sticking
* This is a very simple fix to a rather complicated issue. Essentially,
hold-taps will "release" (raise) their captured keys before actually
telling the event manager they have captured a key. This means the event
manager ends up assigning the `last_listener_index` to the hold-tap
subscription rather than the combo. So when the combo calls
`ZMK_EVENT_RELEASE` it raises after the hold-tap instead of after the
combo as the combo code expects.
* The corresponding test (which fails without this change) has also been added.
* An event can be captured and released in the same event handler, before
the last_listener_index would have been updated. This causes some handlers
to be triggered multiple times.
* The solution is to update the last_listener_index before calling the next
event handler, so capturing and releasing within an event handler is harmless.
* Also see discussion at https://github.com/zmkfirmware/zmk/pull/1401
* If our handler dedides our undedided hold-tap,
  return early before continuing.
* Fix incorrect pointer logic, resulting in combo
  candidate filtering leaving incorrect timeout details.

Co-authored-by: Andrew Rae <ajrae.nv@gmail.com>
Co-authored-by: okke <okke@formsma.nl>
2022-08-03 20:09:50 -04:00
Kurtis Lew
eee7e1cd41
fix(docs): Update tap-dance and hold-tap documentation
Co-Authored-By: Cem Aksoylar <caksoylar@users.noreply.github.com>
2022-07-30 10:24:49 +01:00