diff --git a/docs/docs/codes/_keyboard-keypad.mdx b/docs/docs/codes/_keyboard-keypad.mdx index b1852d64..43c0efd6 100644 --- a/docs/docs/codes/_keyboard-keypad.mdx +++ b/docs/docs/codes/_keyboard-keypad.mdx @@ -22,10 +22,6 @@ import Table from "@site/src/components/codes/Table"; -### Modifiers - -
- ### Locks
diff --git a/docs/docs/codes/modifiers.mdx b/docs/docs/codes/modifiers.mdx new file mode 100644 index 00000000..be08df55 --- /dev/null +++ b/docs/docs/codes/modifiers.mdx @@ -0,0 +1,33 @@ +--- +title: Modifiers +sidebar_label: Modifiers +--- + +import Table from "@site/src/components/codes/Table"; + +To add a modifier key like 'Control' to your board, use one of the codes from the following table. + +If you want to send a modified key like ctrl+a, see the Modified keys section below. + +### Modifier keys + +
+ +### Modified keys + +To send a shifted key such as capital A (`LEFT_SHIFT` + `A`) use the `LS` macro: `&kp LS(A)`. You can also use the "right-hand" version of this macro, `RS`. + +Control (`LC`, `RC`), Alt (`LA`,`RA`) and GUI (`LG`,`RG`) can be used in the same way. For example, to send ctrl+c, use `&kp LC(C)` or `&kp RC(C)`. + +It's possible to combine modifiers: `&kp LC(RA(A))` will result in `LEFT_CONTROL` + `RIGHT_ALT` + `A` being pressed. + +| Macro | Corresponding keycode | +| ----- | --------------------- | +| `LS` | `LEFT_SHIFT` | +| `RS` | `RIGHT_SHIFT` | +| `LC` | `LEFT_CONTROL` | +| `RC` | `RIGHT_CONTROL` | +| `LA` | `LEFT_ALT` | +| `RA` | `RIGHT_ALT` | +| `LG` | `LEFT_GUI` | +| `RG` | `RIGHT_GUI` | diff --git a/docs/docs/feature/keymaps.md b/docs/docs/feature/keymaps.md index 203b9408..b4870310 100644 --- a/docs/docs/feature/keymaps.md +++ b/docs/docs/feature/keymaps.md @@ -135,7 +135,7 @@ that defines just one layer for this keymap: bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp QUOTE - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LC(A) &kp LC(C) &kp LC(V) &kp LC(X) &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT >; @@ -167,12 +167,12 @@ Putting this all together, a complete [`kyria.keymap`](https://github.com/zmkfir // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | R CTRL | +// | SHIFT | Z | X | C | V | B | CTRL+A | CTRL+C | | CTRL+V | CTRL+X | N | M | , | . | / | R CTRL | // | GUI | DEL | RETURN | SPACE | ESCAPE | | RETURN | SPACE | TAB | BSPC | R ALT | bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp QUOTE - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LC(A) &kp LC(C) &kp LC(V) &kp LC(X) &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT >; diff --git a/docs/sidebars.js b/docs/sidebars.js index f05cd056..15d531ec 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -29,6 +29,7 @@ module.exports = { Codes: [ "codes/index", "codes/keyboard-keypad", + "codes/modifiers", "codes/editing", "codes/media", "codes/applications",