Commit Graph

31 Commits

Author SHA1 Message Date
jhorology 768fc4a5e5 fix: HID report descriptor 2022-11-10 22:15:06 -06: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
Caleb Goates 0d5bb100ba feat(behavior): Add key toggle 2022-06-03 00:04:41 -04:00
Okke Formsma 57fca34dc0 refactor(hid): Move hid logic into hid.c
Move the logic for picking the correct hid function into hid.c.
2022-06-03 00:04:41 -04:00
Peter Johanson 1dccb7fe50 fix(hid): Use a full valid range for consumer page
* Switch to a logical max for the consumer page
  that avoid signed issue, and still allows
  full range of documented consumer page
  values.
2022-04-10 22:32:09 -04:00
Peter Johanson 40d8470664 refactor: Handle HID macro/API changes in Zephyr. 2022-04-03 00:10:29 -04:00
Peter Johanson f8018b22d0 fix(hid): Basic consumer code fixes for signed logical max.
* Logical max values are signed, so for the report descriptor, use a two
  byte logical max descriptor item to impart proper 0xFF max logical
  value.
2021-11-09 10:38:49 -05:00
Peter Johanson bc179b1030 feat(hid): Kconfig for basic/full consumer usages.
* Add ZMK_HID_CONSUMER_REPORT_USAGES choice to allow choosing
  between full consumer usage range, with poor OS compat,
  or basic consumer usage range, with broader compat.
2021-10-04 23:01:39 -04:00
Pete Johanson 91ba034896 feat(hid): Configurable NKRO HID report support.
* Add Kconfig settings for NKRO or HKRO (boot compatible), HID
  report types for keyboard page.
* Updated report storage and set/unset for each config.
2021-10-04 23:01:39 -04:00
Okke Formsma 7b7701ae90 feature(modifiers): add explicit modifiers
this makes LS(LEFT_CONTROL) work as if shift and control were both
pressed explicitly. Previously, the left shift would have been released
as soon as another key was pressed. The implicit behavior is useful in
case of LS(NUMBER_1) when rolling over to other keys.

Also see #361.
2021-01-24 23:30:41 -05:00
Okke Formsma 5eeb310b2f feat(grave-escape): implement grave-escape
closes #85
2021-01-22 19:27:18 -05:00
innovaker 87e7c04b00 refactor(app): replace zmk_mod_flags with zmk_mod_flags_t
Aligns with typedef _t convention.

PR: #531
2020-12-28 10:20:12 -05:00
innovaker 05b0d185a8 refactor(app): replace zmk_mod with zmk_mod_t
Aligns with typedef _t convention.

PR: #531
2020-12-28 10:20:12 -05:00
innovaker 87179698b4 refactor(app): replace zmk_key with zmk_key_t
Aligns with typedef _t convention.

PR: #531
2020-12-28 10:20:12 -05:00
innovaker bac1f17cf6 refactor(app): replace Zephyr integer types with C99 integer types
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-14 12:41:25 -05:00
innovaker 3ac1a11a37 refactor: change `keypad` to `keyboard`
The application usage used by report 1 is `HID_USAGE_GD_KEYBOARD`.  Moreover, the `keys` usage page (0x07) that primarily feeds into this report is predominantly keyboard codes.  The rest of the system should align with this naming convention.
2020-11-21 15:52:16 -05:00
innovaker b6e63683d4 refactor(hid): Replace modifier usage values with their cpp definitions
Improves readability of the HID reports.
2020-11-20 22:26:42 -05:00
innovaker 194854ff7b refactor(hid): Replace `0x01` with `HID_USAGE_CONSUMER_CONSUMER_CONTROL`
This should've changed alongside: 711658206f
2020-11-06 09:53:23 -05:00
innovaker 7e795bf4f9 feat(hid): Enhance consumer report to support higher codes
Switch from single byte to double byte usages.

Allow the entire 0x0C page for future compatibility.

Closes #234.  Co-requisite of #21.
2020-11-03 23:50:54 -05:00
innovaker 711658206f refactor(hid): Replace Zephyr usages with ZMK usages in HID reports
Replace `USAGE_GEN_DESKTOP` with `HID_USAGE_GD`.

Replace `USAGE_GEN_DESKTOP_KEYBOARD` with `HID_USAGE_GD_KEYBOARD`.

Replace `USAGE_GEN_DESKTOP_KEYPAD` with `HID_USAGE_KEY`.

Replace `0x0C` with `HID_USAGE_CONSUMER`.

Closes #217.
2020-11-03 23:50:54 -05:00
Okke Formsma 4f258efbf1 initial implementation for modifiers
https://github.com/zmkfirmware/zmk/issues/86
2020-11-03 00:19:37 -05:00
Pete Johanson 2d31e1d05f
Merge pull request #269 from joelspadin/endpoint-selection
feat: only send HID reports to one endpoint
2020-10-31 00:09:47 -04:00
Joel Spadin 8f666cecc9 feat(endpoints): clear HID report on endpoint change
This prevents stuck keys when switching endpoints by clearing
everything in the HID report and sending one last report before
switching to the new endpoint.
2020-10-28 18:15:05 -05:00
innovaker c402e953f6 feat(hid): Make keypad report boot friendly
Add missing byte to make keypad report boot friendly.
2020-10-27 22:55:40 +00:00
innovaker 8ce7d8de01 refactor(hid): Refactor consumer report to a configurable size 2020-10-27 22:36:26 +00:00
innovaker f4596fc784 refactor(hid): Refactor keypad report to use a configurable integer array
Replace NKRO bit array with configurable integer (DV) array.
2020-10-27 22:36:26 +00: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 68e72f9275 fix: Switch to single AUTHORS file.* Closes #164 2020-09-10 10:24:23 -04:00
Pete Johanson 55cf9db564 Fix consumer keys w/ refactored behaviors. 2020-06-22 11:06:01 -04:00
Pete Johanson ec663310c1 Clean up after refactor, better HID constants. 2020-06-21 22:46:27 -04:00
Pete Johanson 38f1dbd984 Move Zephyr app into subdirectory. 2020-06-08 21:07:16 -04:00
Renamed from include/zmk/hid.h (Browse further)