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
Peter Johanson
2128b2b55f
refactor(display): Output/layer/battery thread safety.
...
* Submit widget updates to display queue.
* Use mutex to control access to shared state for widgets.
2021-09-25 17:17:04 -04:00
Peter Johanson
063d98e3df
feat(display): Optional dedicated work queue.
...
* Add new Kconfig settingsx to allow selecting system or dedicated
work queue for performing UI updates.
* Allow UI updates to not block other system tasks when display is
updating, especially important for e-ink displays.
2021-09-25 17:17:04 -04:00
Peter Johanson
d05d7ec2d2
feat(endpoints): Add endpoint select changed event.
2021-08-03 00:19:05 -04:00
JP Bonn
c643f1cd96
added battery.h, last_state_of_charge to uint8_t
2021-03-10 18:07:18 -05:00
JP Bonn
df4ec51f96
only send zmk_battery_state_changed on change
2021-03-10 18:07:18 -05:00
Pete Johanson
2af794eed3
feat(underglow): Convert HSB changes to absolute.
...
* Public type for HSB led color.
* New API for calculating "next" HSB based on current
state.
* Update behavior to convert the increment/decrement
commands to absolute command as well.
2021-02-09 01:27:50 -05:00
Pete Johanson
bb2c478af9
refactor(rgb): Expose explicit on/off command/API.
2021-02-09 01:27:50 -05:00
Okke Formsma
4e20bf5de1
refactor(behaviors): simplify hold-taps by not using _TRANSFORM_ENTRY
2021-02-02 00:43:26 -05:00
Okke Formsma
84d19fe79b
refactor(behaviors): factor out multiple uses of _TRANSFORM_ENTRY
2021-02-02 00:43:26 -05: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
0c30b49063
refactor(modifiers): define is_mods function
2021-01-24 23:30:41 -05: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
Pete Johanson
3368a81057
refactor(core): Combine is_
and cast_
event functions.
...
* Use a single `as_foo` generated function to conditionally
return a certain event type from a generic `zmk_event_t*`
pointer.
2021-01-20 07:06:11 -05:00
Pete Johanson
3fe2acc2d1
refactor(core): Extra event payloads to own types, refactor API.
...
* Make it easier to use *just* event payloads by defining the data,
and then having event manager macros generate "wrapper structs"
* Improve is_*/cast_* APIs to hide details of full event struct.
* Create `zmk_event_t` typedef to pass to event handlers.
* Bring event names inline w/ consistent `zmk_` prefix.
2021-01-20 07:06:11 -05:00
Pete Johanson
003db892ad
refactor(core): Extra position state change data struct.
...
* Separate header and data struct for the event.
* Remove duplicate struct in split code.
2021-01-20 07:06:11 -05:00
innovaker
1d18900a99
refactor(core): define usage page as uint16_t
...
Aligns with the HID specification.
Usage page values were sometimes declared as uint8_t and sometimes uint16_t. This commit aligns all instances with the HID specification for consistency.
PR: #521
2021-01-15 01:48:39 -05:00
KemoNine
99f932a47d
(feat) Allow setting underglow color by key press
2021-01-08 16:08:13 -05:00
Pete Johanson
a55b1397c9
feat(keymap): API for retrieving label for a layer
2021-01-04 13:02:38 -05:00
Okke Formsma
fa07ba9d32
refactor(behaviors): use ZMK_BEHAVIOR_OPAQUE and ZMK_BEHAVIOR_TRANSPARENT
...
Use these instead of the magic return values 0 and 1 for
behavior_driver_api return values.
2021-01-01 23:07:54 -05:00
Okke Formsma
caa285852a
refactor(events): return 'ZMK_EV_EVENT_BUBBLE' instead of magic number 0
2021-01-01 23:07:54 -05:00
Pete Johanson
5072590af5
fix(sensors): Use status filter on sensors node.
2020-12-31 14:46:15 -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
KemoNine
87dbd4ca28
Add uppermost, current layer status widget to oled ( #493 )
...
* Add uppermost, current layer status widget to oled
* Run clang format
* Fixup display widget source includes in CMakeLists
* Update layer widget to only be enabled on primary half of a split keyboard and shuffle some of the options specific to the widget to be enabled via the widget
* Update to latest lvgl/zmk/zephyr ; remove version text from oled per PR
* Fixup file names
* Remove last remenants of the version display text from the oled
* Fixup clang-format
Co-authored-by: KemoNine <mcrosson@kemonine.info>
2020-12-28 20:17:32 -05:00
innovaker
0e71dbc860
refactor(app): replace zmk_keymap_layers_state with zmk_keymap_layers_state_t
...
Aligns with typedef _t convention.
PR: #531
2020-12-28 10:20:12 -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
842aa5a842
refactor: replace filename hyphens with underscores
...
Aligns *.h and *.c to underscore naming convention.
These were kept (with warnings) for backwards compatibility with external boards/shields:
- kscan-mock.h
- matrix-transform.h
They should be removed in the future.
PR: #523
2020-12-28 01:15:35 -05:00
innovaker
f8e43932ba
refactor(app): remove zmk_action
...
zmk_action isn't referenced anywhere.
PR: #530
2020-12-21 23:34:40 -05:00
innovaker
1f5680f0df
refactor(app): remove handlers.h
...
handlers.h isn't referenced elsewhere.
PR: #526
2020-12-21 23:26:52 -05:00
innovaker
0d52915756
chore(display): align status_screen copyright
...
PR: #535
2020-12-21 23:15:53 -05:00
innovaker
e2aef89d99
refactor(endpoints): rename usage_report parameter to usage_page
...
Aligns zmk_endpoints_send_report function declaration with its definition.
PR: #522
2020-12-17 16:40:59 -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
innovaker
00ca0d2f1c
refactor(app): replace struct device *
with const struct device *
...
Replaced with RegExp: /(?<!const )(struct device \*)/g
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
2020-12-14 12:41:25 -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
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
7ea1892bbb
fix(display): All display updates in work thread.
...
* Make sure all LVGL access is from main work thread.
2020-12-06 22:47:21 -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
bee45f9b3a
feat(events): add timestamp to keycode_state_changed and sensor_event
...
These timestamps are necessary to correctly deal with delayed events due to hold-tap shenanigans.
2020-11-28 00:58:24 -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
c21897856b
refactor(app): Replace HID_EXT_USAGE
with HID_USAGE
...
Simplifies terminology and improves readability.
2020-11-10 21:00:20 +00: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
Pete Johanson
eff1b8223b
refactor(keys): Unify usage page.
...
* Remove need for separate `&cp` behavior, but
keep it for now for backward compat.
* Refactor sensor inc/dec as well.
2020-11-05 14:55:40 -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