Peter Johanson
d05d7ec2d2
feat(endpoints): Add endpoint select changed event.
3 years ago
Dom H
4c1a71551b
feat(keys): Add LSHIFT and RSHIFT aliases
...
Using LSHIFT or RSHIFT instead of LSHFT or RSHFT was a common error.
3 years ago
JP Bonn
c643f1cd96
added battery.h, last_state_of_charge to uint8_t
4 years ago
JP Bonn
df4ec51f96
only send zmk_battery_state_changed on change
4 years ago
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.
4 years ago
Pete Johanson
e6f168d6df
refactor(behaviors): Convert state dependent params.
...
* Allow each behavior to map a relative binding, e.g. "toggle",
to an absolute one, e.g. "on", before being invoked.
4 years ago
Pete Johanson
bb2c478af9
refactor(rgb): Expose explicit on/off command/API.
4 years ago
Okke Formsma
4e20bf5de1
refactor(behaviors): simplify hold-taps by not using _TRANSFORM_ENTRY
4 years ago
Okke Formsma
84d19fe79b
refactor(behaviors): factor out multiple uses of _TRANSFORM_ENTRY
4 years ago
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 .
4 years ago
Okke Formsma
0c30b49063
refactor(modifiers): define is_mods function
4 years ago
Ally Parker
a4aaa73f06
feat: Add WPM calculator and display widget
4 years ago
Okke Formsma
5eeb310b2f
feat(grave-escape): implement grave-escape
...
closes #85
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
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
4 years ago
KemoNine
99f932a47d
(feat) Allow setting underglow color by key press
4 years ago
Pete Johanson
a55b1397c9
feat(keymap): API for retrieving label for a layer
4 years ago
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.
4 years ago
Okke Formsma
caa285852a
refactor(events): return 'ZMK_EV_EVENT_BUBBLE' instead of magic number 0
4 years ago
Pete Johanson
5072590af5
fix(sensors): Use status filter on sensors node.
4 years ago
KemoNine
d207c3c30f
(feature) Add &to keycode/behavior ( #489 )
...
feat(behaviors): Add `&to` behavior to switch to a layer.
4 years ago
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>
4 years ago
innovaker
0e71dbc860
refactor(app): replace zmk_keymap_layers_state with zmk_keymap_layers_state_t
...
Aligns with typedef _t convention.
PR: #531
4 years ago
innovaker
87e7c04b00
refactor(app): replace zmk_mod_flags with zmk_mod_flags_t
...
Aligns with typedef _t convention.
PR: #531
4 years ago
innovaker
05b0d185a8
refactor(app): replace zmk_mod with zmk_mod_t
...
Aligns with typedef _t convention.
PR: #531
4 years ago
innovaker
87179698b4
refactor(app): replace zmk_key with zmk_key_t
...
Aligns with typedef _t convention.
PR: #531
4 years ago
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
4 years ago
innovaker
f8e43932ba
refactor(app): remove zmk_action
...
zmk_action isn't referenced anywhere.
PR: #530
4 years ago
innovaker
1f5680f0df
refactor(app): remove handlers.h
...
handlers.h isn't referenced elsewhere.
PR: #526
4 years ago
innovaker
0d52915756
chore(display): align status_screen copyright
...
PR: #535
4 years ago
innovaker
e2aef89d99
refactor(endpoints): rename usage_report parameter to usage_page
...
Aligns zmk_endpoints_send_report function declaration with its definition.
PR: #522
4 years ago
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.
4 years ago
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
4 years ago
innovaker
33c959d031
refactor(app): replace `driver_api` with `api`
...
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
4 years ago
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
4 years ago
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>
4 years ago
Pete Johanson
7ea1892bbb
fix(display): All display updates in work thread.
...
* Make sure all LVGL access is from main work thread.
4 years ago
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.
4 years ago
Pete Johanson
d5ea426975
refactor(battery): Fire event on battery event.
4 years ago
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.
4 years ago
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.
4 years ago
innovaker
b6e63683d4
refactor(hid): Replace modifier usage values with their cpp definitions
...
Improves readability of the HID reports.
4 years ago
innovaker
c21897856b
refactor(app): Replace `HID_EXT_USAGE` with `HID_USAGE`
...
Simplifies terminology and improves readability.
4 years ago
innovaker
194854ff7b
refactor(hid): Replace `0x01` with `HID_USAGE_CONSUMER_CONSUMER_CONTROL`
...
This should've changed alongside: 711658206f
4 years ago
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.
4 years ago
innovaker
c6abdb1890
fix(keys): Replace GUI with Application / Context Menu
...
This was a misrepresentation in the standardized keys that originated in earlier code.
4 years ago
innovaker
a65295c2a7
feat(keys): Standardize keys
...
Deprecate superseded names with comments.
Add standardized key names.
Closes #21 . Closes #158 . Closes #161 . Closes #246 .
4 years ago
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 .
4 years ago