Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio: keymap subsystem #2268

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

petejohanson
Copy link
Contributor

This PR is layered on top of #2254 showing how this will be evolving for the keymap subsystem.

Core features:

  • Adds a new "settings storage" option for keymaps for saving/restoring keymap bindings using the Zephyr settings subsystem.

Adds a new keymap subsystem that:

  • Fetches the current keymap
  • Allows setting the behavior binding (behavior + params) for a given key position in the keymap.
  • Positions with unsaved changes to the keymap are tracked.
  • Adds save and discard changes requests that will save the changed bindings to settings subsystem, or in the case of "discard" will simply reload the bindings all from settings subsystem.

Leaving this as a draft PR for now pending review of #2231 and #2254

@petejohanson petejohanson added enhancement New feature or request keymaps PRs and issues related to keymaps studio ZMK Studio (runtime keymaps) labels Apr 12, 2024
@petejohanson petejohanson self-assigned this Apr 12, 2024
@petejohanson petejohanson linked an issue Apr 12, 2024 that may be closed by this pull request
@petejohanson petejohanson force-pushed the studio/keymap-subsystem branch 6 times, most recently from ba1f1d1 to 66157f1 Compare April 22, 2024 08:46
@petejohanson petejohanson force-pushed the studio/keymap-subsystem branch 3 times, most recently from 7656aa8 to f8be471 Compare May 19, 2024 04:22
@petejohanson petejohanson force-pushed the studio/keymap-subsystem branch 8 times, most recently from fb81427 to 7585225 Compare June 9, 2024 02:17
@petejohanson petejohanson force-pushed the studio/keymap-subsystem branch 8 times, most recently from 19fe149 to 7b149df Compare June 13, 2024 18:15
@petejohanson petejohanson force-pushed the studio/keymap-subsystem branch 6 times, most recently from bbf5fbf to b41b6d5 Compare June 20, 2024 05:00
@petejohanson petejohanson force-pushed the studio/keymap-subsystem branch 9 times, most recently from 711067d to bca1018 Compare June 25, 2024 18:12
* UART and BLE/GATT transports for a protobuf encoded RPC
  request/response protocol.
* Custom framing protocol is used to frame a give message.
* Requests/responses are divided into major "subsystems" which
  handle requests and create response messages.
* Notification support, including mapping local events to RPC
  notifications by a given subsystem.
* Meta responses for "no response" and "unlock needed".
* Initial basic lock state support in a new core section, and allow specifying
  if a given RPC callback requires unlocked state or not.
* Add behavior subsystem with full metadata support and examples of
  using callback to serialize a repeated field without extra stack space needed.
 * Add an easy snippet for enabling USB UART added
   to the `zephyr_udc0` standard node.
* Add keymap API for getting/setting a bindings
  in keymap layers.
* Add layer move support via intemediary ordering array.
* Add settings storage for keymap changes.
* Add APIs for fetching the current keymap, and updating a particular
  binding in a layer of the keymap, including validation of parameters.
* Add API for savings/discarding keymap changes.
* Add storage partition.
* Default necessacy Kconfig symbols for flash/settings.
* New shield to easily test studio using the `native_posix_64` board.
* Add bindings to allow creating multiple physical layouts that specify
  their key's physical attributes, and the matching matrix transform
  and dependant kscan to use.
* Synthesize a basic physical layout if none specified, for backwards
  compatibility.
* Update matrix transform API to explicitly pass in the selected transform
  to the API instead of using a fixed chosen transform.
* Move kscan subscription and handling into the physical layout code, so
  that selecting a different physical layout at runtime can also use the
  correct kscan instance.
* Add `physical_layouts.dtsi` file to include so you can use the
  pre-configured `&key_physical_attrs` for adding you layout keys.
* Update our GPIO kscan drivers to more completely support PM device,
  by doing proper hardare init/deinit in the PM action hook.
* Add physical layout definitions for uno and split uno shields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request keymaps PRs and issues related to keymaps studio ZMK Studio (runtime keymaps)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keymap loading/persisting to settings subsystem
1 participant