Skip to content

Commit

Permalink
Add qwertz layout (#554)
Browse files Browse the repository at this point in the history
* Add qwertz layout

* Add qwertz documentation
  • Loading branch information
BenediktBroich committed Feb 7, 2024
1 parent 61a67cb commit 574d63f
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 48 deletions.
1 change: 1 addition & 0 deletions GET_STARTED.org
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
157 changes: 157 additions & 0 deletions KEYBINDING_QWERTZ.org
Original file line number Diff line number Diff line change
@@ -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
'("<escape>" . ignore)))
#+end_src
146 changes: 98 additions & 48 deletions meow-cheatsheet-layout.el
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,56 @@
(<AB10> "/" "?")
(<BKSL> "\\" "|")))

(defconst meow-cheatsheet-layout-qwertz
'((<TLDE> "^" "°")
(<AE01> "1" "!")
(<AE02> "2" "\"")
(<AE03> "3" "§")
(<AE04> "4" "$")
(<AE05> "5" "%")
(<AE06> "6" "&")
(<AE07> "7" "/")
(<AE08> "8" "(")
(<AE09> "9" ")")
(<AE10> "0" "=")
(<AE11> "ß" "?")
(<AE12> "´" "`")
(<AD01> "q" "Q")
(<AD02> "w" "W")
(<AD03> "e" "E")
(<AD04> "r" "R")
(<AD05> "t" "T")
(<AD06> "z" "Z")
(<AD07> "u" "U")
(<AD08> "i" "I")
(<AD09> "o" "O")
(<AD10> "p" "P")
(<AD11> "ü" "Ü")
(<AD12> "+" "*")
(<AC01> "a" "A")
(<AC02> "s" "S")
(<AC03> "d" "D")
(<AC04> "f" "F")
(<AC05> "g" "G")
(<AC06> "h" "H")
(<AC07> "j" "J")
(<AC08> "k" "K")
(<AC09> "l" "L")
(<AC10> "ö" "Ö")
(<AC11> "ä" "Ä")
(<BKSL> "#" "'")
(<LSGT> "<" ">")
(<AB01> "y" "Y")
(<AB02> "x" "X")
(<AB03> "c" "C")
(<AB04> "v" "V")
(<AB05> "b" "B")
(<AB06> "n" "N")
(<AB07> "m" "M")
(<AB08> "," ";")
(<AB09> "." ":")
(<AB10> "-" "_")))

(defconst meow-cheatsheet-layout-dvorak
'((<TLDE> "`" "~")
(<AE01> "1" "!")
Expand Down Expand Up @@ -237,54 +287,54 @@
(<LSGT> "-" "_")))

(defconst meow-cheatsheet-layout-colemak-dh
'((<TLDE> "`" "~")
(<AE01> "1" "!")
(<AE02> "2" "@")
(<AE03> "3" "#")
(<AE04> "4" "$")
(<AE05> "5" "%")
(<AE06> "6" "^")
(<AE07> "7" "&")
(<AE08> "8" "*")
(<AE09> "9" "(")
(<AE10> "0" ")")
(<AE11> "-" "_")
(<AE12> "=" "+")
(<AD01> "q" "Q")
(<AD02> "w" "W")
(<AD03> "f" "F")
(<AD04> "p" "P")
(<AD05> "b" "B")
(<AD06> "j" "J")
(<AD07> "l" "L")
(<AD08> "u" "U")
(<AD09> "y" "Y")
(<AD10> ";" ":")
(<AD11> "[" "{")
(<AD12> "]" "}")
(<BKSL> "\\" "|")
(<AC01> "a" "A")
(<AC02> "r" "R")
(<AC03> "s" "S")
(<AC04> "t" "T")
(<AC05> "g" "G")
(<AC06> "m" "M")
(<AC07> "n" "N")
(<AC08> "e" "E")
(<AC09> "i" "I")
(<AC10> "o" "O")
(<AC11> "'" "\"")
(<AB01> "z" "Z")
(<AB02> "x" "X")
(<AB03> "c" "C")
(<AB04> "d" "D")
(<AB05> "v" "V")
(<AB06> "k" "K")
(<AB07> "h" "H")
(<AB08> "," "<")
(<AB09> "." ">")
(<AB10> "/" "?")
(<LSGT> "-" "_")))
'((<TLDE> "`" "~")
(<AE01> "1" "!")
(<AE02> "2" "@")
(<AE03> "3" "#")
(<AE04> "4" "$")
(<AE05> "5" "%")
(<AE06> "6" "^")
(<AE07> "7" "&")
(<AE08> "8" "*")
(<AE09> "9" "(")
(<AE10> "0" ")")
(<AE11> "-" "_")
(<AE12> "=" "+")
(<AD01> "q" "Q")
(<AD02> "w" "W")
(<AD03> "f" "F")
(<AD04> "p" "P")
(<AD05> "b" "B")
(<AD06> "j" "J")
(<AD07> "l" "L")
(<AD08> "u" "U")
(<AD09> "y" "Y")
(<AD10> ";" ":")
(<AD11> "[" "{")
(<AD12> "]" "}")
(<BKSL> "\\" "|")
(<AC01> "a" "A")
(<AC02> "r" "R")
(<AC03> "s" "S")
(<AC04> "t" "T")
(<AC05> "g" "G")
(<AC06> "m" "M")
(<AC07> "n" "N")
(<AC08> "e" "E")
(<AC09> "i" "I")
(<AC10> "o" "O")
(<AC11> "'" "\"")
(<AB01> "z" "Z")
(<AB02> "x" "X")
(<AB03> "c" "C")
(<AB04> "d" "D")
(<AB05> "v" "V")
(<AB06> "k" "K")
(<AB07> "h" "H")
(<AB08> "," "<")
(<AB09> "." ">")
(<AB10> "/" "?")
(<LSGT> "-" "_")))

(defconst meow-cheatsheet-layout-dvp
'((<TLDE> "$" "~")
Expand Down

0 comments on commit 574d63f

Please sign in to comment.