You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Using with zmk-helpers](#using-with-zmk-helpers)
45
47
-[Community](#community)
46
-
*[Tools](#tools)
47
-
*[Examples](#examples)
48
-
*[Related projects](#related-projects)
48
+
-[Tools](#tools)
49
+
-[Examples](#examples)
50
+
-[Related projects](#related-projects)
49
51
-[Development](#development)
50
52
-[Questions? Feedback?](#questions-feedback)
51
53
@@ -282,6 +284,36 @@ jobs:
282
284
> You should understand the implications of rewriting history if you amend a commit that has already been published.
283
285
> See [remarks](https://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase) in `git-rebase` documentation.
284
286
287
+
### ZMK locale headers
288
+
289
+
If you use locale headers via [`zmk-locales`](https://github.com/joelspadin/zmk-locales) module or [`zmk-locale-generator`](https://github.com/joelspadin/zmk-locale-generator),
290
+
you might want to preserve the keycode names without the locale prefix for `keymap-drawer` to parse.
291
+
292
+
To do that, follow these two steps:
293
+
294
+
1. Put the locale header `#include` in a define guard so it isn't processed by `keymap-drawer`:
295
+
296
+
```c
297
+
#ifndef KEYMAP_DRAWER
298
+
#include "keys_de.h"
299
+
#endif
300
+
```
301
+
302
+
This step should not be necessary if you use `zmk-locales` as a module, like `#include <locale/keys_de.h>`.
303
+
304
+
2. Remove the locale prefix from the keycodes, so that they can be converted easier using [`zmk_keycode_map`](CONFIGURATION.md#zmk_keycode_map).
305
+
This can be done via the `zmk_remove_keycode_prefix` [configuration option](CONFIGURATION.md#zmk_remove_keycode_prefix):
306
+
307
+
```yaml
308
+
parse_config:
309
+
zmk_remove_keycode_prefix: ["DE_"]
310
+
```
311
+
312
+
### Using with zmk-helpers
313
+
314
+
Using [`zmk-helpers`](https://github.com/urob/zmk-helpers) will break the parsing of ZMK keymaps by default.
315
+
Check out [this document](https://github.com/urob/zmk-helpers/blob/main/docs/keymap_drawer.md) that describes the configuration setting needed to enable parsing.
316
+
285
317
## Community
286
318
287
319
Below are a few tools and example usages from the community that might be inspirational, whether they are doing unique things with styling, configuration or legends used, or integrate `keymap-drawer` into other workflows.
0 commit comments