ZMK ToolsVisual Studio Code tools for working with ZMK Firmware. It is primarily intended for editing keymaps in a ZMK user config repo, but it also works in the main ZMK repo. Create a ZMK User Config RepoIf you do not yet have a repo:
Next, open the repo in VS Code using one of the options below: Edit in a Web BrowserUsing github.dev you can edit your repo completely within your web browser.
Edit with the GitHub Repositories ExtensionUsing an extension, you can run VS Code locally but edit the repo remotely without cloning it.
Clone and Edit LocallyClone the repo to your computer and open it in VS Code. If you don't know how to do this, check Learn the Basics of Git in Under 10 Minutes or try one of the options above instead. Add a KeyboardOnce the repo is open in VS Code, you can run the Add Keyboard command to add a keyboard:
Ever time you commit a change, GitHub will automatically build the firmware for you. Open a web browser to your repo in GitHub and click the Actions tab at the top, then click the latest build (at the top of the list). If the build succeeded, you can download the firmware from the Artifacts section. TroubleshootingIf the build failed, click the failed job from the list on the left, then look for the error message. Correct the error, then repeat steps 3-6 above. The error probably looks something like Match the line number from the error (760 in this example) to a line in the file,
using the right-most column of line numbers. There is probably a typo on that line.
Find the line in your Keymap Features
DeviceTree Overlays
Help and FeedbackIf you run into an issue or you have an idea for something to add to this extension, let me know by creating an issue or joining the ZMK Discord server (see the Discord link at the bottom of the ZMK Firmware homepage.) Credits
Developing the ExtensionThe following documentation covers tasks specific to building this extension. For general instructions, see VS Code's extension documentation. Updating the Tree Sitter parserUsing Docker Run the following command to build tree-sitter-devicetree.wasm.
This method may not work on Windows due to an issue with tree-sitter incorrectly handling path separators. Using Emscripten
For subsequent builds, run the following command to set up the Emscripten environment again, then run step 4 above: PowerShell:
Bash:
|