zmk/docs
Joel Spadin 36eda571b7 refactor(behaviors): Create a list to lookup behaviors
Added BEHAVIOR_DT_DEFINE() and BEHAVIOR_DT_INST_DEFINE(), which work
exactly like the DEVICE_*_DEFINE() macros, except they also register the
device as a behavior by adding a pointer to it to a memory section.

Added zmk_behavior_get_binding(), which works like device_get_binding()
except that it only searches the devices that have been registered as
behaviors. This ensures that behaviors cannot have name collisions with
other devices defined by the SoC, which will be important when we remove
the label property from behaviors so they are given their node names.

As an added benefit, this is faster since it searches a smaller list.
Some basic benchmark code I wrote indicates it takes 30-70% as long,
depending on where the behavior is in the list and whether the name
string is an exact pointer match.

From now on, behaviors should use BEHAVIOR_*_DEFINe() instead of
DEVICE_*_DEFINE(), and any code that looks up a behavior by name should
use zmk_behavior_get_binding() instead of device_get_binding().
2023-12-04 20:06:54 -06:00
..
blog docs: Remove label property from documentation 2023-12-04 20:06:54 -06:00
docs refactor(behaviors): Create a list to lookup behaviors 2023-12-04 20:06:54 -06:00
src feat(docs): Document globe key specific quirks 2023-10-10 14:04:28 -07:00
static docs: Update tree-sitter 2023-05-20 01:33:11 -06:00
.eslintignore docs: Add eslint support 2020-10-25 21:23:16 +00:00
.eslintrc.js fix(docs): Updated eslint config for unified prettier setup. 2021-05-05 00:54:55 -04:00
.gitignore Initial work on basic documentation. 2020-05-25 21:33:21 -04:00
.nvmrc docs: Set netlify node version to lts/* 2020-10-26 22:55:15 +00:00
.prettierignore feat: Generate setup scripts from metadata. 2021-09-11 00:50:36 -04:00
.prettierrc.js docs: Set prettier endOfLine to auto 2020-10-26 05:28:31 +00:00
docusaurus.config.js feat(blog): Show all posts on sidebar 2023-11-08 23:00:26 -08:00
netlify.toml fix(docs): Allow CORS for hardware-metadata.json 2022-03-30 07:13:13 -04:00
package-lock.json chore(deps): bump postcss from 8.4.18 to 8.4.31 in /docs 2023-10-10 16:17:44 -07:00
package.json chore(deps): bump @fortawesome/fontawesome-svg-core in /docs 2023-09-04 23:20:33 -07:00
README.md docs: Add syntax highlighting to more code blocks 2023-10-09 15:19:24 -07:00
sidebars.js feat(mouse): Initial mouse keys support. 2023-11-15 11:16:59 -08:00
tsconfig.json fix(docs): Fix typescript error 2023-05-20 01:33:11 -06:00

Website

This website is built using Docusaurus 2, a modern static website generator.

License

The ZMK Documentation is licensed CC-BY-NC-SA.

Installation

$ npm ci

Local Development

$ npm start

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

Build

$ npm build

This command generates static content into the build directory and can be served using any static contents hosting service.