{"id":24547086,"url":"https://github.com/joelspadin/zmk-locales","last_synced_at":"2025-07-05T02:03:50.916Z","repository":{"id":273651668,"uuid":"857816627","full_name":"joelspadin/zmk-locales","owner":"joelspadin","description":"Helpers for localizing ZMK keymaps","archived":false,"fork":false,"pushed_at":"2025-06-22T23:37:16.000Z","size":295,"stargazers_count":17,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T00:31:04.660Z","etag":null,"topics":["zmk","zmk-module"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joelspadin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-15T17:24:05.000Z","updated_at":"2025-06-22T23:37:21.000Z","dependencies_parsed_at":"2025-01-22T07:20:16.023Z","dependency_job_id":"00e4bd78-f70b-4473-ac83-90623298d1ee","html_url":"https://github.com/joelspadin/zmk-locales","commit_stats":null,"previous_names":["joelspadin/zmk-locales"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/joelspadin/zmk-locales","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelspadin%2Fzmk-locales","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelspadin%2Fzmk-locales/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelspadin%2Fzmk-locales/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelspadin%2Fzmk-locales/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelspadin","download_url":"https://codeload.github.com/joelspadin/zmk-locales/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelspadin%2Fzmk-locales/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263645556,"owners_count":23494005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["zmk","zmk-module"],"created_at":"2025-01-22T22:18:41.255Z","updated_at":"2025-07-05T02:03:50.899Z","avatar_url":"https://github.com/joelspadin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZMK Locales\n\nThis is a [module for ZMK](https://zmk.dev/docs/features/modules) which helps with creating keymaps for non-US keyboard layouts.\n\nMany of the files in this repo are generated by [ZMK Locale Generator](https://github.com/joelspadin/zmk-locale-generator). Pull requests to update any files in the \"include\" subfolder will not be accepted, because the changes would just get overwitten the next time I re-generate them. Please submit pull requests to the locale generator instead.\n\n## Usage\n\nSee the [ZMK module documentation](https://zmk.dev/docs/features/modules#building-with-modules) for instructions on how to add this module to your firmware build. Once it is added to the build, you can use the features described below:\n\n### Key Codes\n\nZMK's key codes follow the [HID specification](https://www.usb.org/hid), and many key codes indicate the *position* of a key on a US keyboard layout, not the key's function. If your operating system (OS) is set to a different keyboard locale, then the character a key types may not match its key code name. For example, on a German QWERTZ layout, `\u0026kp Y` will type \u003ckbd\u003ez\u003c/kbd\u003e and `\u0026kp Z` will type \u003ckbd\u003ey\u003c/kbd\u003e. This module provides headers with localized key codes, so instead of having to remember that `Y` is `Z` and `Z` is `Y`, you can just include the German header and use `DE_Y` and `DE_Z`.\n\nFirst, find the header that matches your OS keyboard layout inside the [include/locale](include/locale) folder. Each file starts with a comment that gives the full name of the keyboard layout.\n\nNext, include it at the top of your keymap like this. The path inside the `#include \u003c...\u003e` is the path to the header relative to the `/include` folder in this repo.\n\n```dts\n#include \u003clocale/keys_de.h\u003e\n\n/ {\n    keymap {\n        ...\n    };\n};\n```\n\nFinally, look inside the header to see what key codes it provides, and use these key codes in your keymap instead of the standard ZMK key codes.\n\nFor example, this snippet of [keys_de.h](include/locale/keys_de.h)...\n\n```c\n/* y */\n#define DE_Y (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_Z))\n\n/* z */\n#define DE_Z (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_Y))\n```\n\n...says you can use `DE_Y` for \u003ckbd\u003ey\u003c/kbd\u003e and `DE_Z` for \u003ckbd\u003ez\u003c/kbd\u003e, while this one...\n\n```c\n/* ß */\n#define DE_SHARP_S (ZMK_HID_USAGE(HID_USAGE_KEY, HID_USAGE_KEY_KEYBOARD_MINUS_AND_UNDERSCORE))\n#define DE_ESZETT (DE_SHARP_S)\n#define DE_SZ (DE_SHARP_S)\n```\n\n...says you can use `DE_SHARP_S`, `DE_ESZETT`, or `DE_SZ` for \u003ckbd\u003eß\u003c/kbd\u003e.\n\nA keymap using these localized key codes might look like this:\n\n```dts\n#include \u003clocale/keys_de.h\u003e\n\n/ {\n    keymap {\n        compatible = \"zmk,keymap\";\n\n        default_layer {\n            bindings = \u003c\n                \u0026kp DE_CARET  \u0026kp DE_N1 \u0026kp DE_N2 \u0026kp DE_N3 \u0026kp DE_N4 \u0026kp DE_N5 \u0026kp DE_N6      ...\n                \u0026kp TAB         \u0026kp DE_Q  \u0026kp DE_W  \u0026kp DE_E  \u0026kp DE_R  \u0026kp DE_T  \u0026kp DE_Z     ...\n                \u0026kp CAPS          \u0026kp DE_A  \u0026kp DE_S  \u0026kp DE_D  \u0026kp DE_F  \u0026kp DE_G  \u0026kp DE_H   ...\n                \u0026kp LSHFT \u0026kp DE_LT \u0026kp DE_Y  \u0026kp DE_X  \u0026kp DE_C  \u0026kp DE_V  \u0026kp DE_B  \u0026kp DE_N ...\n                \u0026kp LCTRL \u0026kp LGUI \u0026kp LALT                               \u0026kp DE_SPACE         ...\n            \u003e;\n        };\n    };\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelspadin%2Fzmk-locales","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelspadin%2Fzmk-locales","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelspadin%2Fzmk-locales/lists"}