diff --git a/zmk-nodefree-config/README.md b/zmk-nodefree-config/README.md index e61f547..0229546 100644 --- a/zmk-nodefree-config/README.md +++ b/zmk-nodefree-config/README.md @@ -11,22 +11,21 @@ streamlined syntax. Check out [example.keymap](example.keymap) to see it in acti ## Overview The following convenience macros are provided: -1. `ZMK_BEHAVIOR` can be used to create new behaviors such as hold-taps, tap-dances or +1. `ZMK_BEHAVIOR` creates behaviors such as hold-taps, tap-dances or ZMK macros [\[doc\]](#zmk_behavior) -2. `ZMK_LAYER` adds new layers to your keymap [\[doc\]](#zmk_layer) -3. `ZMK_COMBO` defines new combos [\[doc\]](#zmk_combo) -4. `ZMK_CONDITIONAL_LAYERS` sets up "tri-layer" conditions [\[doc\]](#zmk_conditional_layers) +2. `ZMK_LAYER` adds layers to the keymap [\[doc\]](#zmk_layer) +3. `ZMK_COMBO` defines combos [\[doc\]](#zmk_combo) +4. `ZMK_CONDITIONAL_LAYER` sets up "tri-layer" conditions [\[doc\]](#zmk_conditional_layer) 5. `ZMK_UNICODE_SINGLE` and `ZMK_UNICODE_PAIR` create unicode characters [\[doc\]](#zmk_unicode) -6. optional `international_chars` source files define a number of international character such - as ä/Ä or δ/Δ that can be added to the keymap +6. `international_chars` provides character definitions for some non-English languages [\[doc\]](#international-characters) -7. optional `keypos_def` source files define human-readable key position shortcuts for some popular +7. `keypos_def` provides human-readable key position shortcuts for some popular keyboards that simplify the configuration of combos and positional hold-taps - [\[doc\]](#key-position-shortcuts) + [\[doc\]](#key-position-helpers) ## Quickstart -1. Copy this repository into the root folder of your private zmk-config repository. The +1. Copy this repository into the root folder of your zmk-config. The folder structure should look as follows: ``` zmk-config @@ -55,7 +54,7 @@ hold-tap, key-repeat, macro, mod-morph, sticky-key or tap-dance **Syntax:** `ZMK_BEHAVIOR(name, type, specification)` * `name`: a unique string chosen by the user (e.g., `my_behavior`). The new behavior can - be added to the keymap using `&name` (e.g., `&my_behavior`) + be added to the keymap using `&name` (e.g., `&my_behavior`). * `type`: the behavior to be created. It must be one of the following: `caps_word`, `hold_tap`, `key_repeat`, `macro`, `mod_morph`, `sticky_key` or `tap_dance`. Note that two-word types are separated by underscores (`_`). @@ -76,9 +75,8 @@ ZMK_BEHAVIOR(hrm, hold_tap, ) ``` -The new behavior can be added to the keymap-layout using `&hrm` (e.g., `&hrm LSHIFT T` -creates a key that yields `T` on tap and `LSHIFT` on hold, using the custom -configuration above). +This creates a custom "homerow mod" that can be added to the keymap using `&hrm`. For example, +`&hrm LSHIFT T` creates a key that yields `T` on tap and `LSHIFT` on hold. #### Example 2: Creating a custom tap-dance key @@ -88,9 +86,8 @@ ZMK_BEHAVIOR(ss_cw, tap_dance, bindings = <&sk LSHFT>, <&caps_word>; ) ``` - -The new behavior can be added to the keymap-layout using `&ss_cw`. The key yields -sticky-shift on tap and caps-word on double tap; +This behavior yields sticky-shift on tap and caps-word on double tap. It can be added to +the keymap using `&ss_cw`. #### Example 3: Creating a custom "win-sleep" macro @@ -102,15 +99,14 @@ ZMK_BEHAVIOR(win_sleep, macro, ) ``` -This creates a "Windows sleep key" that can be added to the keymap-layout using -`&win_sleep`. +This creates a "Windows sleep macro" that can be added to the keymap using `&win_sleep`. ### ZMK\_LAYER `ZMK_LAYER` adds new keymap layers to the configuration. **Syntax:** `ZMK_LAYER(name, layout)` -* `name`: a unique identifier string chosen by the user (usually this isn't referenced elsewhere) +* `name`: a unique identifier string chosen by the user (usually there is no reason to reference this elsewhere) * `layout`: the layout specification using the same syntax as the `bindings` property of the [ZMK keymap configuration](https://zmk.dev/docs/config/keymap) @@ -139,18 +135,18 @@ ZMK_KEYMAP(default_layer, `ZMK_COMBO` defines new combos. **Syntax:** `ZMK_COMBO(name, bindings, keypos, layers)` -* `name`: a unique identifier string chosen by the user (usually this isn't referenced elsewhere) +* `name`: a unique identifier string chosen by the user (usually there is not reason to reference this elsewhere) * `binding`: the binding triggered by the combo (this can be any stock or previously defined behavior) * `keypos`: a list of 2 or more key positions that trigger the combo (e.g., `12 13`). Note that the mapping from key positions to keys depends on your keyboard. To facilitate - the combo set-up and increase portability, this repository provides shortcuts for some popular keyboards. - See [below](#key-position-shortcuts) on how to use them. + the combo setup and increase portability, one can use key-position helpers instead. + See [below](#key-position-helpers) on how to use them. * `layers`: a list of layers for which the combo is active (e.g., `0 1` for the first two layers). If set to `ALL` the combo is active on all layers. By default, the timeout for combos created with `ZMK_COMBO` is 30ms. If `COMBO_TERM` is set prior to calling `ZMK_COMBO`, the value of `COMBO_TERM` is used instead. Note: while -it is possible to set different timeout for different combos, this is known to cause +it is possible to set different timeouts for different combos, this is known to cause [issues](https://github.com/zmkfirmware/zmk/issues/905) with overlapping combos and should be avoided. #### Example: copy and paste combos @@ -161,16 +157,16 @@ ZMK_COMBO(copy, &kp LC(C), 12 13, ALL) ZMK_COMBO(paste, &kp LC(V), 13 14, ALL) ``` This sets the combo timeout to 50ms, and then creates two combos which both are -active all layers. The first combo is triggered when the +active on all layers. The first combo is triggered when the 12th and 13th keys are pressed jointly within the `COMBO_TERM`, sending Ctrl + C. The second combo is triggered when the 13th and 14th keys are pressed jointly, sending Ctrl + V. -### ZMK\_CONDITIONAL\_LAYERS +### ZMK\_CONDITIONAL\_LAYER This sets up tri-layer conditions. -**Syntax:** `ZMK_CONDITIONAL_LAYERS(if_layers, then_layers)` +**Syntax:** `ZMK_CONDITIONAL_LAYER(if_layers, then_layers)` * `if_layers`: a list of layers which trigger the `then_layer` if simultaneously active * `then_layer`: the layer which is activated when the if-condition is met. Due to ZMK's layering model, it should generally have a higher number than the `if_layers` @@ -178,38 +174,19 @@ This sets up tri-layer conditions. For instance, this triggers "layer 3" if layers "1" and "2" are simultaneously active. ```C++ -ZMK_CONDITIONAL_LAYERS(1 2, 3) +ZMK_CONDITIONAL_LAYER(1 2, 3) ``` -Mind that ZMK's layer numbering starts at 0! In general, it is recommended to use layer +Mind that ZMK's layer numbering starts at 0. One can use layer definitions, as demonstrated in [example.keymap](example.keymap), to simplify life. ### ZMK\_UNICODE -There are two macros that simplify creating new unicode characters that +There are two macros that create new unicode characters that can be added to the keymap. `ZMK_UNICODE_SINGLE` creates single unicode characters such -as , whereas `ZMK_UNICODE_PAIR` creates pairs of shifted/unshifted unicode +as , and `ZMK_UNICODE_PAIR` creates pairs of shifted/unshifted unicode characters that are useful for specifying international characters such as ä/Ä or δ/Δ. -Note that the input of unicode characters differs across operation systems. By default, -`ZMK_UNICODE` is configured for Windows (using WinCompose). The easiest way to set up unicode -characters for other operation systems is to set the variable `HOST_OS` **before** -sourcing `helper.h`. - -For Linux use: -```C++ -#define HOST_OS 1 // set to 1 for Linux, default is 0 (Windows) -#include helper.h -``` -For macOS use: -```C++ -#define HOST_OS 2 // set to 2 for macOS, default is 0 (Windows) -#include helper.h -``` -This will send unicode characters using the OS's default input channels. -For non-default input channels or for other operation systems, one can instead set the -variables `OS_UNICODE_LEAD` and `OS_UNICODE_TRAIL` to the character sequences that -initialize/terminate the unicode input. **Syntax:** `ZMK_UNICODE_SINGLE(name, L0, L1, L2, L3)` * `name:` a unique string chosen by the user (e.g., `my_char`). The unicode character can @@ -224,35 +201,36 @@ initialize/terminate the unicode input. * `U0` to `U3`: a 4-digit sequence defining the shifted unicode string (which is send when holding Shift while pressing &name) -Note: 5-digit unicode characters are currently not supported. +Note: 5-digit unicode characters are currently not supported (but would be easy to add +if there is interest). -#### Example 1: Euro sign (U+20AC) +#### Example 1: Euro sign (€) ```C++ ZMK_UNICODE_SINGLE(euro_sign, N2, N0, A, C) ``` -The Euro character can be added to the keymap using `&euro_sign`. +This creates a Euro character that can be added to the keymap using `&euro_sign`. #### Example 2: German umlauts (ä/Ä, ö/Ö, ü/Ü) ```C++ -// name unshifted shifted -ZMK_UNICODE_PAIR( ae, N0, N0, E, N4, N0, N0, C, N4 ) -ZMK_UNICODE_PAIR( oe, N0, N0, F, N6, N0, N0, D, N6 ) -ZMK_UNICODE_PAIR( ue, N0, N0, F, C, N0, N0, D, C ) +// name unshifted shifted +ZMK_UNICODE_PAIR( de_ae, N0, N0, E, N4, N0, N0, C, N4 ) +ZMK_UNICODE_PAIR( de_oe, N0, N0, F, N6, N0, N0, D, N6 ) +ZMK_UNICODE_PAIR( de_ue, N0, N0, F, C, N0, N0, D, C ) ``` -The "umlaut"-pairs can be added to the keymap using `&ae`, `&oe` and `&ue`. +The creates "umlaut" pairs that can be added to the keymap using `&de_ae`, `&de_oe` and `&de_ue`. -#### Dependencies for unicodes +#### Dependencies for unicode -* `ZMK_UNICODE_PAIR` requires a ZMK version patched with - [PR#1114](https://github.com/zmkfirmware/zmk/pull/1114) (not needed for - `ZMK_UNICODE_SINGLE`). If you don't want to maintain - your own ZMK repository, you can use ZMK's [beta + +* `ZMK_UNICODE_PAIR` requires ZMK patched with a modified version of the "masked-mods" + PR, available from [https://github.com/urob/zmk/tree/masked-mods](https://github.com/urob/zmk/tree/masked-mods).[^1] If you don't want + to maintain your own ZMK repository, you can use ZMK's [beta testing](https://zmk.dev/docs/features/beta-testing) feature to configure Github Actions to build against a patched remote branch of ZMK. To do so, replace the - contents of `west.yml` in your local `zmk-config/config` directory with the following - contents: + contents of `west.yml` in your `zmk-config/config` directory with the following + contents, which adds the required patch: ``` manifest: remotes: @@ -266,36 +244,58 @@ The "umlaut"-pairs can be added to the keymap using `&ae`, `&oe` and `&ue`. self: path: config ``` -* Depending on the operation system there are addition requirements for unicode input to - work. On Windows, one must install - [WinCompose](https://github.com/samhocevar/wincompose). On macOS one must enable - unicode input in the system preferences. +* The input of unicode characters differs across operating systems. By + default, `ZMK_UNICODE` is configured for Windows (using WinCompose). To set it up + for another OS, set the variable + `HOST_OS` **before** sourcing `helper.h`. + + For Linux use: + ```C++ + #define HOST_OS 1 // set to 1 for Linux, default is 0 (Windows) + #include helper.h + ``` + For macOS use: + ```C++ + #define HOST_OS 2 // set to 2 for macOS, default is 0 (Windows) + #include helper.h + ``` + This will send unicode characters using the OS's default input channels. + For non-default input channels or for other operating systems, one can instead set the + variables `OS_UNICODE_LEAD` and `OS_UNICODE_TRAIL` to the character sequences that + initialize/terminate the unicode input.[^2] + +* On Windows and macOS there are additional requirements for unicode input to work. On + Windows, one must install [WinCompose](https://github.com/samhocevar/wincompose). On + macOS one must enable unicode input in the system preferences. ### International characters There are pre-defined definitions for international characters for a few -languages (currently German and Greek --- contributions are welcome!). These can be -loaded by sourcing the corresponding files. +languages --- currently German, Greek and Swedish (contributions are welcome)[^3]. These can be +loaded by sourcing the corresponding files; e.g.: ```C++ -#include "../zmk-nodefree-config/international_chars/greek.dtsi" #include "../zmk-nodefree-config/international_chars/german.dtsi" +#include "../zmk-nodefree-config/international_chars/greek.dtsi" +#include "../zmk-nodefree-config/international_chars/swedish.dtsi" ``` -These definitions make use of unicode in the background, please see the unicode documentation -above for prerequisites. Once sourced, Greek and German characters can be added to the -keymap using, e.g., `&alpha`, `&upsilon`, `&tau` or `&omikron` (see the language files for -a complete list of available characters). +Once sourced, international characters can be added to the +keymap using, e.g., `&de_ae`, `&el_alpha` or `&sv_ao` +(each language has its own prefix; see the language files for a complete list of available characters). -### Key position shortcuts +**Dependencies:** These definitions make use of unicode in the background, +see the unicode section above for [prerequisites](#dependencies-for-unicode). -Certain configuration options such as combos and positional hold-taps are based on the -physical position of keys on your keyboard. This reduces portability of configuration -files across keyboards with different layouts. +### Key-position helpers -To increase portability, this repository comes with key position definitions for some -popular keyboard layouts (48-key boards such as Planck, 42-key boards such as Corne, -36-key boards and 34-key boards). +Certain configuration options such as combos and positional hold-taps are based on the +physical position of keys on the keyboard. This can be cumbersome and reduces +portability of configuration files across keyboards with different layouts. -These layouts provide a map from the physical key positions to human-readable shortcuts. +To increase portability and ease of use, this repo provides optional key-position +helpers for some popular keyboard layouts (48-key boards such as Planck, 42-key +boards such as Corne, 36-key boards and 34-key boards). + +These key-position helpers provide a map from the physical key positions to human-readable shortcuts. All shortcuts are of the following form: * `L/R` for **L**eft/**R**ight hand * `T/M/B/H` for **T**op/**M**iddle/**B**ottom and t**H**umb row. @@ -312,16 +312,16 @@ For instance, the shortcuts layout for a 36-key board looks as follows: ╰───────╮ LH2 LH1 LH0 │ RH0 RH1 RH2 ╭───────╯ ╰─────────────┴─────────────╯ ``` -Schematics for all existing layout files can be found at the top of the corresponding -definition files. +Schematics for all supported keyboards can be found in the corresponding +definition files in the `keypos_def` folder. -To use these shortcut definitions, source the definition file for your keyboard +To use these key-position helpers, source the definition file for your keyboard into your `.keymap` file. E.g., for a 36-key board, use: ```C++ #include "../zmk-nodefree-config/keypos_def/keypos_36keys.h" ``` -#### Example 1: Defining combos using key position shortcuts +#### Example 1: Defining combos using key-position helpers ```C++ ZMK_COMBO(copy, &kp LC(C), LB2 LB3, ALL) @@ -335,8 +335,8 @@ This defines a "copy"-combo for the middle + ring finger on the left bottom row, Here we use ZMK's [positional hold-tap](https://zmk.dev/docs/behaviors/hold-tap#positional-hold-tap-and-hold-trigger-key-positions) -feature to make home-row mods only trigger with "opposite hand" keys.[^1] Using our -positional shortcuts makes this straightforward: +feature to make home-row mods only trigger with "opposite hand" keys.[^4] Using +key-position helpers makes this straightforward: ```C++ #define HRM_LT LM1 LM2 LM3 LM4 // left-hand HRMs @@ -363,5 +363,19 @@ ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs hold-trigger-key-positions = ; // include right-hand HRMs for chording ) ``` +[^1]: The original "masked-mods" PR is available [here](https://github.com/zmkfirmware/zmk/pull/1114). + It works well when using the standard unicode configuration with Windows or macOS, + but leads to garbled unicode sequences under Linux. Using the patched version from + https://github.com/urob/zmk/tree/masked-mods makes it work under all three + operating systems and for non-standard configurations. -[^1]: We also whitelist same-hand HRMs so that we can combine them to chord mods. +[^2]: The default for Windows is `OS_UNICODE_LEAD` set to tap Right Alt + followed by U and `OS_UNICODE_TRAIL` set to tap Return. + The default for Linux is `OS_UNICODE_LEAD` set to tap Shift + + Ctrl + U and `OS_UNICODE_TRAIL` set to tap Space. + The default for macOS is `OS_UNICODE_LEAD` set to hold Left Alt + and `OS_UNICODE_TRAIL` set to release Left Alt. + +[^3]: Swedish language support was added by discord user "captainwoot". + +[^4]: We also whitelist same-hand HRMs so that we can combine them to chord mods. diff --git a/zmk-nodefree-config/example.keymap b/zmk-nodefree-config/example.keymap index 7de6684..0679200 100644 --- a/zmk-nodefree-config/example.keymap +++ b/zmk-nodefree-config/example.keymap @@ -9,7 +9,7 @@ #define ___ &trans -#define DEF 0 +#define DEF 0 // layer shortcuts, must match order in which they are defined below #define NAV 1 #define NUM 2 #define GER 3 @@ -44,17 +44,18 @@ ZMK_BEHAVIOR(win_sleep, macro, bindings = <&kp LG(X) &kp U &kp S>; ) -/* combos */ +// euro sign +ZMK_UNICODE_SINGLE(euro_sign, N2, N0, A, C) // € +// replace a/o/u/s with German umlauts when NAV and NUM are held jointly +ZMK_CONDITIONAL_LAYER(NAV NUM, GER) + +// combos #define COMBO_TERM 40 // timeout of 40ms (default is 30ms if omitted) ZMK_COMBO(combo_sleep, &win_sleep, RT3 RT4, NAV) // custom sleep macro, only active on NAV layer ZMK_COMBO(combo_copy, &kp LC(C), LB2 LB3, ALL) // Ctrl + C, active on all layers ZMK_COMBO(combo_paste, &kp LC(V), LB1 LB2, ALL) // Ctrl + V, active on all layers -/* conditional layer */ - -ZMK_CONDITIONAL_LAYERS(NAV NUM, GER) // replace A/O/U/S with umlauts when NAV and NUM are held jointly - /* keymap */ ZMK_LAYER(default_layer, @@ -95,9 +96,9 @@ ZMK_LAYER(num_layer, ZMK_LAYER(german_layer, // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ - ___ ___ ___ ___ ___ ___ ___ &ue ___ ___ + ___ ___ ___ ___ ___ ___ ___ &de_ue ___ ___ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ - &ae ___ &eszett ___ ___ ___ ___ ___ ___ &oe + &de_ae ___ &de_eszett ___ ___ ___ ___ &euro_sign ___ &de_oe // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ // ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ diff --git a/zmk-nodefree-config/helper.h b/zmk-nodefree-config/helper.h index 8b45b68..5eb94c8 100644 --- a/zmk-nodefree-config/helper.h +++ b/zmk-nodefree-config/helper.h @@ -62,9 +62,9 @@ }; \ }; -/* ZMK_CONDITIONAL_LAYERS */ +/* ZMK_CONDITIONAL_LAYER */ -#define ZMK_CONDITIONAL_LAYERS(if_layers, then_layer) \ +#define ZMK_CONDITIONAL_LAYER(if_layers, then_layer) \ / { \ conditional_layers { \ compatible = "zmk,conditional-layers"; \ @@ -125,11 +125,11 @@ }; #define ZMK_UNICODE_SINGLE(name, L0, L1, L2, L3) \ - UC_MACRO(uc_lower_ ## name, &kp L0 &kp L1 &kp L2 &kp L3) \ - UC_MODMORPH(uc_ ## name, &uc_lower_ ## name, &none) + UC_MACRO(name ## _lower, &kp L0 &kp L1 &kp L2 &kp L3) \ + UC_MODMORPH(name, &name ## _lower, &none) #define ZMK_UNICODE_PAIR(name, L0, L1, L2, L3, U0, U1, U2, U3) \ - UC_MACRO(uc_lower_ ## name, &kp L0 &kp L1 &kp L2 &kp L3) \ - UC_MACRO(uc_upper_ ## name, &kp U0 &kp U1 &kp U2 &kp U3) \ - UC_MODMORPH(uc_ ## name, &uc_lower_ ## name, &uc_upper_ ## name) + UC_MACRO(name ## _lower, &kp L0 &kp L1 &kp L2 &kp L3) \ + UC_MACRO(name ## _upper, &kp U0 &kp U1 &kp U2 &kp U3) \ + UC_MODMORPH(name, &name ## _lower, &name ## _upper) diff --git a/zmk-nodefree-config/international_chars/german.dtsi b/zmk-nodefree-config/international_chars/german.dtsi index bce8776..637dd0f 100644 --- a/zmk-nodefree-config/international_chars/german.dtsi +++ b/zmk-nodefree-config/international_chars/german.dtsi @@ -1,6 +1,6 @@ /* German umlauts */ -ZMK_UNICODE_PAIR( ae, N0, N0, E, N4, N0, N0, C, N4) -ZMK_UNICODE_PAIR( oe, N0, N0, F, N6, N0, N0, D, N6) -ZMK_UNICODE_PAIR( ue, N0, N0, F, C, N0, N0, D, C) -ZMK_UNICODE_SINGLE( eszett, N0, N0, D, F) +ZMK_UNICODE_PAIR( de_ae, N0, N0, E, N4, N0, N0, C, N4) +ZMK_UNICODE_PAIR( de_oe, N0, N0, F, N6, N0, N0, D, N6) +ZMK_UNICODE_PAIR( de_ue, N0, N0, F, C, N0, N0, D, C) +ZMK_UNICODE_SINGLE( de_eszett, N0, N0, D, F) diff --git a/zmk-nodefree-config/international_chars/greek.dtsi b/zmk-nodefree-config/international_chars/greek.dtsi index e3bf6f7..662e12e 100644 --- a/zmk-nodefree-config/international_chars/greek.dtsi +++ b/zmk-nodefree-config/international_chars/greek.dtsi @@ -1,26 +1,26 @@ /* Greek letters */ -ZMK_UNICODE_PAIR( alpha, N0, N3, B, N1, N0, N3, N9, N1) -ZMK_UNICODE_PAIR( beta, N0, N3, B, N2, N0, N3, N9, N2) -ZMK_UNICODE_PAIR( gamma, N0, N3, B, N3, N0, N3, N9, N3) -ZMK_UNICODE_PAIR( delta, N0, N3, B, N4, N0, N3, N9, N4) -ZMK_UNICODE_PAIR( epsilon, N0, N3, F, N5, N0, N3, N9, N5) // varepsilon = 03B5 -ZMK_UNICODE_PAIR( zeta, N0, N3, B, N6, N0, N3, N9, N6) -ZMK_UNICODE_PAIR( eta, N0, N3, B, N7, N0, N3, N9, N7) -ZMK_UNICODE_PAIR( theta, N0, N3, B, N8, N0, N3, N9, N8) -ZMK_UNICODE_PAIR( iota, N0, N3, B, N9, N0, N3, N9, N9) -ZMK_UNICODE_PAIR( kappa, N0, N3, B, A, N0, N3, N9, A) -ZMK_UNICODE_PAIR( lambda, N0, N3, B, B, N0, N3, N9, B) -ZMK_UNICODE_PAIR( mu, N0, N3, B, C, N0, N3, N9, C) -ZMK_UNICODE_PAIR( nu, N0, N3, B, D, N0, N3, N9, D) -ZMK_UNICODE_PAIR( xi, N0, N3, B, E, N0, N3, N9, E) -ZMK_UNICODE_PAIR( omikron, N0, N3, B, F, N0, N3, N9, F) -ZMK_UNICODE_PAIR( pi, N0, N3, C, N0, N0, N3, A, N0) -ZMK_UNICODE_PAIR( rho, N0, N3, C, N1, N0, N3, A, N1) -ZMK_UNICODE_PAIR( sigma, N0, N3, C, N3, N0, N3, A, N3) -ZMK_UNICODE_PAIR( tau, N0, N3, C, N4, N0, N3, A, N4) -ZMK_UNICODE_PAIR( upsilon, N0, N3, C, N5, N0, N3, A, N5) -ZMK_UNICODE_PAIR( phi, N0, N3, C, N6, N0, N3, A, N6) // varphi = 03C6 -ZMK_UNICODE_PAIR( chi, N0, N3, C, N7, N0, N3, A, N7) -ZMK_UNICODE_PAIR( psi, N0, N3, C, N8, N0, N3, A, N8) -ZMK_UNICODE_PAIR( omega, N0, N3, C, N9, N0, N3, A, N9) +ZMK_UNICODE_PAIR(el_alpha, N0, N3, B, N1, N0, N3, N9, N1) +ZMK_UNICODE_PAIR(el_beta, N0, N3, B, N2, N0, N3, N9, N2) +ZMK_UNICODE_PAIR(el_gamma, N0, N3, B, N3, N0, N3, N9, N3) +ZMK_UNICODE_PAIR(el_delta, N0, N3, B, N4, N0, N3, N9, N4) +ZMK_UNICODE_PAIR(el_epsilon, N0, N3, F, N5, N0, N3, N9, N5) // varepsilon = 03B5 +ZMK_UNICODE_PAIR(el_zeta, N0, N3, B, N6, N0, N3, N9, N6) +ZMK_UNICODE_PAIR(el_eta, N0, N3, B, N7, N0, N3, N9, N7) +ZMK_UNICODE_PAIR(el_theta, N0, N3, B, N8, N0, N3, N9, N8) +ZMK_UNICODE_PAIR(el_iota, N0, N3, B, N9, N0, N3, N9, N9) +ZMK_UNICODE_PAIR(el_kappa, N0, N3, B, A, N0, N3, N9, A) +ZMK_UNICODE_PAIR(el_lambda, N0, N3, B, B, N0, N3, N9, B) +ZMK_UNICODE_PAIR(el_mu, N0, N3, B, C, N0, N3, N9, C) +ZMK_UNICODE_PAIR(el_nu, N0, N3, B, D, N0, N3, N9, D) +ZMK_UNICODE_PAIR(el_xi, N0, N3, B, E, N0, N3, N9, E) +ZMK_UNICODE_PAIR(el_omikron, N0, N3, B, F, N0, N3, N9, F) +ZMK_UNICODE_PAIR(el_pi, N0, N3, C, N0, N0, N3, A, N0) +ZMK_UNICODE_PAIR(el_rho, N0, N3, C, N1, N0, N3, A, N1) +ZMK_UNICODE_PAIR(el_sigma, N0, N3, C, N3, N0, N3, A, N3) +ZMK_UNICODE_PAIR(el_tau, N0, N3, C, N4, N0, N3, A, N4) +ZMK_UNICODE_PAIR(el_upsilon, N0, N3, C, N5, N0, N3, A, N5) +ZMK_UNICODE_PAIR(el_phi, N0, N3, C, N6, N0, N3, A, N6) // varphi = 03C6 +ZMK_UNICODE_PAIR(el_chi, N0, N3, C, N7, N0, N3, A, N7) +ZMK_UNICODE_PAIR(el_psi, N0, N3, C, N8, N0, N3, A, N8) +ZMK_UNICODE_PAIR(el_omega, N0, N3, C, N9, N0, N3, A, N9) diff --git a/zmk-nodefree-config/international_chars/swedish.dtsi b/zmk-nodefree-config/international_chars/swedish.dtsi new file mode 100644 index 0000000..804702a --- /dev/null +++ b/zmk-nodefree-config/international_chars/swedish.dtsi @@ -0,0 +1,5 @@ +/* Swedish letters */ +ZMK_UNICODE_PAIR(sv_ae, N0, N0, E, N4, N0, N0, C, N4) +ZMK_UNICODE_PAIR(sv_ao, N0, N0, E, N5, N0, N0, C, N5) +ZMK_UNICODE_PAIR(sv_oe, N0, N0, F, N6, N0, N0, D, N6) +