Commit Graph

1155 Commits

Author SHA1 Message Date
Peter Johanson
329d6474ee feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ
* Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ
  is not enabled.
2023-12-01 16:47:49 -08:00
Peter Johanson
744f70c80c feat(bt): Add support for unauth overwrite
* Properly handle the user enabling the
  `CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE`
  Zephyr flag and handle re-pairing to an existing taken
  profile from the same address.
2023-12-01 23:39:31 +00:00
ReFil
69f7bfb409
feat(boards): Kinesis Advantage 360 pro
Add the Kinesis Advantage 360 Pro board definition.
2023-11-27 19:09:58 -05:00
Peter Johanson
817ce8764f refactor: Move to zmk_hid_indicators_t type. 2023-11-27 16:03:18 -08:00
Alessandro Bortolin
d9bb0d7d0e feat: LED indicators on peripheral side 2023-11-27 16:03:18 -08:00
Alessandro Bortolin
4e55c5f6e9 feat: handle LED indicators report 2023-11-27 16:03:18 -08:00
ReFil
6276e973d5 feat(ble): Only update BAS when active
Subscribes to the activity changing event, will stop the battery work timer when in idle or deep sleep, restart when board goes active
2023-11-27 09:58:20 -08:00
Chris Andreae
0a4b1a6533
feat(ble): add behavior to disconnect from BLE profile
Adds new functionality and a behavior to disconnect an active BLE connection.
The motivation for this is that for some devices like phones, the presence of an
active BLE connection results in the onscreen keyboard being selected.
2023-11-20 15:00:10 -05:00
Alexander Krikun
d7d9eed317 feat(mouse): Initial mouse keys support.
* Add HID report/descriptor for a new report with mouse buttons,
  and x/y/wheel deltas.
* New mouse key press behavior for press/release of mouse keys.
* Add constants for HID main item values (e.g. data/array/absolute)
* Define and use constants for our HID report IDs.
2023-11-15 11:16:59 -08:00
ReFil
8776911da5
feat(ble): Allow disabling BLE BAS reporting
The battery reporting has been known to cause macOS computers to wakeup repeatedly. In some cases (e.g. display or custom lighting implementation) one might want to collect battery SOC without broadcasting over BLE

* Update docs/docs/config/battery.md

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-11-15 13:03:30 -05:00
Peter Johanson
3027b2a6e8 chore(usb): Don't enable ZMK_USB_ROOT by default.
* Some initial reports of crashes with this code enabled, so disabling
  by default for now pending further investigation.
2023-11-13 23:56:10 -08:00
Peter Johanson
f6716f869a fix(usb): Build with ZMK_USB_BOOT disabled.
* Invert the logic so `get_keyboard_report` is sane when `ZMK_USB_BOOT`
  is disabled.
2023-11-13 23:56:10 -08:00
Chris Andreae
2a1904e184
feat(boards): Add Glove80 to boards
* Add board definition for MoErgo Glove80
2023-11-14 02:08:58 -05:00
Peter Johanson
964c54139d fix(usb): Tweak how ZMK_USB gets enabled.
* Previous version of multiple overrides of the default value of ZMK_USB
  were problematic. Move to using board _defconfig files for the
  defaults for those, along with proper `depends on` for ZMK_USB that
  accounts for split and split roles.
2023-11-13 12:56:23 -08:00
Chris Andreae
91aa3378f3
feat(usb): Add boot protocol support
* USB boot protocol support
* Use a single definition of a boot report, used for regular reports in
  non-6KRO, and for rollover in all branches.
* Handle gaps in the zmk report when producing a boot report in HKRO mode. For
  .example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0
  17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6
  bytes would not show up the single pressed key.
* Disable usb status change and callback on SOF events:
  SOF events were introduced by the boot protocol changes, and required internally
  by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the
  usb status callback.

---------

Co-authored-by: Andrew Childs <lorne@cons.org.nz>
2023-11-13 13:04:04 -05:00
Peter Johanson
c2d220fbdf refactor(hid): Use proper defines for HID values.
* Add report ID defines and use them consistently.
* Add defines for main item value flags to avoid magic constants.
2023-11-08 16:00:19 -08:00
Peter Johanson
34c8b3f1e3 refactor: Update boards/shields for encoders.
* Update existing boards/shields for new `steps` and
  `triggers-per-rotation` set up.
2023-11-03 12:35:25 -07:00
Khalid Aj
7fe9ecd87f
feat(shields): Add Reviung53 shield.
* Initial Reviung53 shield

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-17 18:43:50 -04:00
Alex Kang
a9a53e6da4
feat(shields): Reviung34 shield definition
* Initial implementation of REVIUNG34 shield.
* Add copyright information to files
* Added a README with instructions on how to enable the 1x2u layout.
* Add a default chosen matrix transform in the default keymap, alongside a commented out version for the alternate layout.

---------

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-14 19:39:42 -07:00
Peter Johanson
3ab922822c feat(shields): Add ZMK Uno nice!view support.
Export the `nice_view_spi` node properly from the ZMK Uno overlay
to ensure the shield will work when built along with the `nice_view`
shield.
2023-10-14 10:51:48 -07:00
Diogo Doreto
6af22424f1 feat(shields): add right encoders support to waterfowl 2023-10-09 11:46:05 -07:00
Joel Spadin
8a84b7dd5b
fix(shields): Fix incorrect union access in nice view
Fixed an error in a previous commit where a member of the selected
endpoint was used without checking if it was the correct transport type.
The nice!view status screen displays the active BLE profile regardless
of whether BLE is active, so we have to get that data directly from the
BLE code instead of from the selected endpoint.
2023-10-08 19:30:23 -04:00
Alex Kang
fd05478897
feat(shields): Microdox V2 shield definition
* Refactor common parts of the Microdox sheild into a separate file. This is in preparation for adding Microdox V2 as another shield in the same directory.
* Refactor Microdox keymap into a common file in preparation for Microdox V2
* Add Microdox V2 shield definition
* Added a README to explain v1/v2 differences.
2023-10-06 15:27:38 -04:00
Seth Milliken
df92b0e37d
feat(shields): sofle: add underglow support with &pinctrl update
* Sofle Shield: Add underglow support

---------

Co-authored-by: Kim Streich <kim@infusedinsight.com>
Co-authored-by: Seth Milliken <seth_zmk@araxia.net>
2023-10-04 11:48:46 -04:00
Andrew Rae
11996ff7f0 refactor(behaviors): Final global-quick-tap deprecation. 2023-10-03 01:12:47 -07:00
Andrew Rae
f0f6d61e79 fix(tests): Updating old tests includes 2023-10-03 01:12:47 -07:00
Andrew Rae
b85ffa4b6c refactor(behaviors): global-quick-tap -> require-prior-idle
Renaming global-quick-tap-ms to require-prior-idle.
2023-10-03 01:12:47 -07:00
Andrew Rae
77eb44ba9b feat(behaviors): Adding global-quick-tap-ms for combos
This brings the 'global-quick-tap' functionality to combos by filtering
out candidate combos that fell within their own quick tap term.

I also replaced `return 0` with `return ZMK_EV_EVENT_BUBBLE` where appropriate.
(I assume this was done in past as it is similar to errno returning, but
being that this is to signify an event type I find this more clear)
2023-10-03 01:12:47 -07:00
Andrew Rae
2f6abff3bc refactor(behaviors): Giving global-quick-tap its own term
Detaching the global-quick-tap functionality from the quick-tap term.
This makes way for two improvements:

1. This functionality can be added to combos under a unified name
   'global-quick-tap-ms'.

2. This allows users to set a lower term for the 'global-quick-tap'
   (typically ~100ms), and a higher term for the regular
   quick-tap (typically ~200ms)

This deprecates the global-quick-tap option, however if it is set, the
quick-tap-ms value will be copied to global-quick-tap-ms.
2023-10-03 01:12:47 -07:00
Flo Kempenich
aa4cb143bf
fix(combos)Fix bug with overlapping combos timeouts (#1945)
* Fix bug with overlapping combos timeouts

* Fix trailing whitespace

* Fix log format
2023-10-03 04:03:59 -04:00
Joel Spadin
6a3cc914fc fix: Fix nice_view display widgets 2023-10-02 22:03:08 -07:00
Joel Spadin
b17d896c5c fix: Address review comments 2023-10-02 22:03:08 -07:00
Joel Spadin
651ed05e9a refactor: Split endpoint to transport and instance
Changed the endpoints code to rename the existing endpoint types to
"transport" and add the concept of "endpoint instances". A transport is
the method by which data is sent, while instances allow describing
multiple endpoints that use the same transport (e.g. bluetooth profiles)

Also added new APIs to get the total number of possible endpoint
instances and assign each instance a unique index, which can be used
for tracking separate state for each endpoint in other code files.
2023-10-02 22:03:08 -07:00
Andrew Rae
2f05ad55ca fix(core): Prevent pre-releasing explicit mods. 2023-10-02 12:28:02 -07:00
Andrew Rae
dffdb2365e test(core): Adding coverage for key pre-releasing.
Added cases for the two use cases I know of:
    1. Rolling with key-repeat behavior
    2. Rolling symbols that have the same base key, eg `+=`
2023-10-02 12:28:02 -07:00
Andrew Rae
933e369d7c feat(core): Adding pre-release for keys that were already pressed.
This fixes #1207 and #1076 (and maybe more?).
2023-10-02 12:28:02 -07:00
ReFil
c1ebadcd2a
feat(hid): Add apple globe keycode
* feat(hid): Add apple globe keycode
* Update docs/src/data/hid.js

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Nick Coutsos <nick@coutsos.com>
2023-09-29 13:14:31 -07:00
zhiayang
9b3d2cb99f
fix(driver): Fix broken compilation for MAX7318 driver 2023-09-28 12:19:14 -04:00
ClicketySplit
07c82836e0
fix(shields): Leeloo-Micro set status disabled for encoders. 2023-09-28 11:54:08 -04:00
zhiayang
8abc449cc2
feat(drivers): add driver for MAX17048 fuel gauge
Add driver for MAX17048 fuel gauge for battery reporting.
2023-09-25 21:04:03 -04:00
Peter Johanson
28ce23d489 chore(tests): Move to proper header name. 2023-09-16 11:52:40 -07:00
Peter Johanson
0ca7f69b6d refactor: Promote debounce to exposed mod lib.
* Promote previously local debounce code from kscan drivers to exposed
  module lib, for use with other drivers as needed.
* Refactor existing kscan driver to new "public" API.
2023-09-16 11:52:40 -07:00
Peter Johanson
c28ef1b61e refactor(drivers): Use proper init stage/priority.
* Avoid APPLICATION stage and use the proper earlier stage for
  kscan drivers.
2023-09-16 11:52:40 -07:00
Peter Johanson
690bc1bb44 refactor: Move drivers into properly module.
* Align our driver module layout to properly match Zephyr conventions,
  allowing proper CMake setup to amend the library for each type of driver.
2023-09-16 11:52:40 -07:00
Cem Aksoylar
7f9e9f8c64 fix(boards): Disable QSPI for Xiao BLE
The GD25Q16 flash connected via QSPI seems to be causing issues
with excessive battery use and inability to sleep. Since ZMK doesn't
use it, disable it.

Resolves #1901
2023-09-05 22:40:25 -07:00
Peter Johanson
718500543b feat(split): Use directed advertising.
* Split centrals to scan with their identity so they receive direct
  advertising packets.
* Split peripherals to use direct advertising if they have an existing
  bond to a split central.
2023-09-04 13:54:07 -07:00
Peter Johanson
647945d9f8 feat(shields): Add splitkb.com Aurora Helix
* Add new shield for splitkb.com Aurora Helix, supporting
  keys, encoder(s), displays, and RGB.
2023-09-03 22:39:10 -07:00
フィルターペーパー
ac0691471f feat(shields): Add Bluetooth bindings to kyria keymaps
Bluetooth bindings are useful for handling pairings with hosts. This
change adds the header and a few default commands as template for
new users to work with.
2023-09-02 23:08:17 -07:00
Xudong Zheng
544612c8c0 fix(split): reserve peripheral slot before stopping scanning
In the event that the peripheral MAC address does not match, this allows
scanning to continue.
2023-09-02 23:06:41 -07:00
Mikhail Stralenia
185457bc11
fix(shields): leeloo - proper encoder status for split encoders. 2023-08-29 08:53:30 -07:00