From 574d63f16ff9cc1b642d89c4e48bb3d4eacafe2d Mon Sep 17 00:00:00 2001 From: Benedikt Broich Date: Wed, 7 Feb 2024 08:55:12 +0000 Subject: [PATCH] Add qwertz layout (#554) * Add qwertz layout * Add qwertz documentation --- GET_STARTED.org | 1 + KEYBINDING_QWERTZ.org | 157 ++++++++++++++++++++++++++++++++++++++ meow-cheatsheet-layout.el | 146 +++++++++++++++++++++++------------ 3 files changed, 256 insertions(+), 48 deletions(-) create mode 100644 KEYBINDING_QWERTZ.org diff --git a/GET_STARTED.org b/GET_STARTED.org index ec9ce0c9..10e84ec6 100644 --- a/GET_STARTED.org +++ b/GET_STARTED.org @@ -34,6 +34,7 @@ Meow has no default command layout. You can write your own setup function from scratch or pick one from below as your starting point. - [[file:KEYBINDING_QWERTY.org][Qwerty layout]] +- [[file:KEYBINDING_QWERTZ.org][Qwertz layout]] - [[file:KEYBINDING_DVORAK.org][Dvorak layout]] - [[file:KEYBINDING_DVP.org][Programmer Dvorak layout]] - [[file:KEYBINDING_COLEMAK.org][Colemak layout]] diff --git a/KEYBINDING_QWERTZ.org b/KEYBINDING_QWERTZ.org new file mode 100644 index 00000000..bf4c10af --- /dev/null +++ b/KEYBINDING_QWERTZ.org @@ -0,0 +1,157 @@ +* KEYBINDINGS QWERTZ + +This is the example ~meow-setup~ function for Qwertz layout. +Add it to your configuration and call it before ~(meow-global-mode 1)~. + + Meow Cheatsheet + +┏━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━┓ +┃ ° │ ! │ " │ § │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ BKSP ┃ +┃ | | | | | | | | | | | | | ┃ +┠─┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┤ ┃ +┃ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ß │ ´ │ ┃ +┃ | ex →1| ex →2| ex →3| ex →4| ex →5| ex →6| ex →7| ex →8| ex →9| ex →0| | | ┃ +┠─────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────────┨ +┃ TAB │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ü │ * │ ┃ +┃ | | | open ↑| open ↓| | | ←sym| ex ↑| sym→| pop-sel| | | ┃ +┃ ├┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┤ ┃ +┃ │ q │ w │ e │ r │ t │ z │ u │ i │ o │ p │ ü │ + │ RET ┃ +┃ | join| block| insert| append| del| search| ←word| ↑| word→| quit sel| ←indent| indent→| ┃ +┠─────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┐ ┃ +┃ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ ┃ +┃ | ←sym→|goto-line| | | pop-grab|undo-tre…| ex ←| ex ↓| ex →| | │ │ ┃ +┃ ├┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┤ ┃ +┃ │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ö │ ä │ # │ ┃ +┃ | ←word→| line| kill| chg| grab|undo-tre…| ←| ↓| →| +prefix | reverse | | ┃ +┠───────────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────┬───┴─────────┴───────┨ +┃ │ > │ Y │ X │ C │ V │ B │ N │ M │ ; │ : │ _ │ ┃ +┃ | | | | | yank-pop|split-li…| |sync-grab| ←thing→| [thing]| | ┃ +┃ ├┄┄┄┄┄┄┄┄┄├┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┤ ┃ +┃ │ < │ y │ x │ c │ v │ b │ n │ m │ , │ . │ - │ ┃ +┃ | | find| till| save| yank|open-line| |swap-grab| ←thing| thing→| visit| ┃ +┗━━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━╅─────────┴─────────┴─────────┴─────────╆━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━┛ + ┃ SPC ┃ + ┃ ┃ + ┃ ┃ + ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +NOTE: +ex means this command will expand current region. +←thing→ (inner), [thing] (bounds), ←thing (begin) and thing→ (end) require a THING as input: + round -> f square -> d curly -> s angle -> a string -> r +paragraph -> v line -> c buffer -> x + +#+begin_src emacs-lisp + (defun meow-setup () + (setq meow-cheatsheet-physical-layout meow-cheatsheet-physical-layout-iso) + (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwertz) + + (meow-thing-register 'angle + '(pair (";") (":")) + '(pair (";") (":"))) + + (setq meow-char-thing-table + '((?f . round) + (?d . square) + (?s . curly) + (?a . angle) + (?r . string) + (?v . paragraph) + (?c . line) + (?x . buffer))) + + (meow-leader-define-key + ;; Use SPC (0-9) for digit arguments. + '("1" . meow-digit-argument) + '("2" . meow-digit-argument) + '("3" . meow-digit-argument) + '("4" . meow-digit-argument) + '("5" . meow-digit-argument) + '("6" . meow-digit-argument) + '("7" . meow-digit-argument) + '("8" . meow-digit-argument) + '("9" . meow-digit-argument) + '("0" . meow-digit-argument) + '("-" . meow-keypad-describe-key) + '("_" . meow-cheatsheet)) + + (meow-normal-define-key + ;; expansion + '("0" . meow-expand-0) + '("1" . meow-expand-1) + '("2" . meow-expand-2) + '("3" . meow-expand-3) + '("4" . meow-expand-4) + '("5" . meow-expand-5) + '("6" . meow-expand-6) + '("7" . meow-expand-7) + '("8" . meow-expand-8) + '("9" . meow-expand-9) + '("ä" . meow-reverse) + + ;; movement + '("i" . meow-prev) + '("k" . meow-next) + '("j" . meow-left) + '("l" . meow-right) + + '("z" . meow-search) + '("-" . meow-visit) + + ;; expansion + '("I" . meow-prev-expand) + '("K" . meow-next-expand) + '("J" . meow-left-expand) + '("L" . meow-right-expand) + + '("u" . meow-back-word) + '("U" . meow-back-symbol) + '("o" . meow-next-word) + '("O" . meow-next-symbol) + + '("a" . meow-mark-word) + '("A" . meow-mark-symbol) + '("s" . meow-line) + '("S" . meow-goto-line) + '("w" . meow-block) + '("q" . meow-join) + '("g" . meow-grab) + '("G" . meow-pop-grab) + '("m" . meow-swap-grab) + '("M" . meow-sync-grab) + '("p" . meow-cancel-selection) + '("P" . meow-pop-selection) + + '("x" . meow-till) + '("y" . meow-find) + + '("," . meow-beginning-of-thing) + '("." . meow-end-of-thing) + '(";" . meow-inner-of-thing) + '(":" . meow-bounds-of-thing) + + ;; editing + '("d" . meow-kill) + '("f" . meow-change) + '("t" . meow-delete) + '("c" . meow-save) + '("v" . meow-yank) + '("V" . meow-yank-pop) + + '("e" . meow-insert) + '("E" . meow-open-above) + '("r" . meow-append) + '("R" . meow-open-below) + + '("h" . undo-only) + '("H" . undo-redo) + + '("b" . open-line) + '("B" . split-line) + + '("ü" . indent-rigidly-left-to-tab-stop) + '("+" . indent-rigidly-right-to-tab-stop) + + ;; ignore escape + '("" . ignore))) +#+end_src diff --git a/meow-cheatsheet-layout.el b/meow-cheatsheet-layout.el index 972b6d75..0bfb9438 100644 --- a/meow-cheatsheet-layout.el +++ b/meow-cheatsheet-layout.el @@ -137,6 +137,56 @@ ( "/" "?") ( "\\" "|"))) +(defconst meow-cheatsheet-layout-qwertz + '(( "^" "°") + ( "1" "!") + ( "2" "\"") + ( "3" "§") + ( "4" "$") + ( "5" "%") + ( "6" "&") + ( "7" "/") + ( "8" "(") + ( "9" ")") + ( "0" "=") + ( "ß" "?") + ( "´" "`") + ( "q" "Q") + ( "w" "W") + ( "e" "E") + ( "r" "R") + ( "t" "T") + ( "z" "Z") + ( "u" "U") + ( "i" "I") + ( "o" "O") + ( "p" "P") + ( "ü" "Ü") + ( "+" "*") + ( "a" "A") + ( "s" "S") + ( "d" "D") + ( "f" "F") + ( "g" "G") + ( "h" "H") + ( "j" "J") + ( "k" "K") + ( "l" "L") + ( "ö" "Ö") + ( "ä" "Ä") + ( "#" "'") + ( "<" ">") + ( "y" "Y") + ( "x" "X") + ( "c" "C") + ( "v" "V") + ( "b" "B") + ( "n" "N") + ( "m" "M") + ( "," ";") + ( "." ":") + ( "-" "_"))) + (defconst meow-cheatsheet-layout-dvorak '(( "`" "~") ( "1" "!") @@ -237,54 +287,54 @@ ( "-" "_"))) (defconst meow-cheatsheet-layout-colemak-dh - '(( "`" "~") - ( "1" "!") - ( "2" "@") - ( "3" "#") - ( "4" "$") - ( "5" "%") - ( "6" "^") - ( "7" "&") - ( "8" "*") - ( "9" "(") - ( "0" ")") - ( "-" "_") - ( "=" "+") - ( "q" "Q") - ( "w" "W") - ( "f" "F") - ( "p" "P") - ( "b" "B") - ( "j" "J") - ( "l" "L") - ( "u" "U") - ( "y" "Y") - ( ";" ":") - ( "[" "{") - ( "]" "}") - ( "\\" "|") - ( "a" "A") - ( "r" "R") - ( "s" "S") - ( "t" "T") - ( "g" "G") - ( "m" "M") - ( "n" "N") - ( "e" "E") - ( "i" "I") - ( "o" "O") - ( "'" "\"") - ( "z" "Z") - ( "x" "X") - ( "c" "C") - ( "d" "D") - ( "v" "V") - ( "k" "K") - ( "h" "H") - ( "," "<") - ( "." ">") - ( "/" "?") - ( "-" "_"))) + '(( "`" "~") + ( "1" "!") + ( "2" "@") + ( "3" "#") + ( "4" "$") + ( "5" "%") + ( "6" "^") + ( "7" "&") + ( "8" "*") + ( "9" "(") + ( "0" ")") + ( "-" "_") + ( "=" "+") + ( "q" "Q") + ( "w" "W") + ( "f" "F") + ( "p" "P") + ( "b" "B") + ( "j" "J") + ( "l" "L") + ( "u" "U") + ( "y" "Y") + ( ";" ":") + ( "[" "{") + ( "]" "}") + ( "\\" "|") + ( "a" "A") + ( "r" "R") + ( "s" "S") + ( "t" "T") + ( "g" "G") + ( "m" "M") + ( "n" "N") + ( "e" "E") + ( "i" "I") + ( "o" "O") + ( "'" "\"") + ( "z" "Z") + ( "x" "X") + ( "c" "C") + ( "d" "D") + ( "v" "V") + ( "k" "K") + ( "h" "H") + ( "," "<") + ( "." ">") + ( "/" "?") + ( "-" "_"))) (defconst meow-cheatsheet-layout-dvp '(( "$" "~")