diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-08-18 04:41:37 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-08-18 04:41:37 +0200 |
commit | 4844315b793b2984632dcc8c111f829140228b7e (patch) | |
tree | c53677d56b6b3cdfc06c45e5d7653a7bff745828 /res | |
parent | add fi dvorak (diff) | |
download | mds-4844315b793b2984632dcc8c111f829140228b7e.tar.gz mds-4844315b793b2984632dcc8c111f829140228b7e.tar.bz2 mds-4844315b793b2984632dcc8c111f829140228b7e.tar.xz |
add a sv layout for programming
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | res/keyboard/layout/sv/programmer | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/res/keyboard/layout/sv/programmer b/res/keyboard/layout/sv/programmer new file mode 100644 index 0000000..9bfe055 --- /dev/null +++ b/res/keyboard/layout/sv/programmer @@ -0,0 +1,163 @@ +information + language "Swedish" + country "Sweden" + variant "QWERTY, programmer" +end information + +# This variant is intended to reduce the risk +# repetitive strain injury for programmers. +# Do not forget the caps_is_ctrl mod. + + +include "../common/qwerty" +include "../common/base" + + +function comma/0 + "," +end function +function altcomma/0 + "." +end function + +macro mod_letter/2 + <letter \1> : "\1" + <shift letter \1> : "\2" + <caps letter \1> : "\2" + <shift caps letter \1> : "\1" +end macro + +mod_letter("å" "Å") +mod_letter("ä" "Ä") +mod_letter("ö" "Ö") + +<keycode 41> : <letter |> +<keycode 12> : <letter +> +<keycode 13> : <dead letter ´> +<keycode 26> : <letter -> +<keycode 27> : <dead letter ^> +<keycode 39> : <letter ö> +<keycode 40> : <letter .> +<keycode 43> : <letter '> +<keycode 86> : <letter <> +<keycode 51> : <letter å> +<keycode 52> : <letter ,> +<keycode 53> : <letter ä> + + +macro key/5 + <letter \1> : "\2" + <shift letter \1> : "\3" + <altgr letter \1> : "\4" + <altgr shift letter \1> : "\5" +end macro + +macro key/4 + key("\1" "\1" "\2" "\3" "\3") +end macro + +macro nocaps/2 + <altgr letter \1> : "\2" + <altgr shift letter \1> : <void> +end macro + +macro nocaps/3 + <altgr letter \1> : "\2" + <altgr shift letter \1> : "\3" +end macro + +macro caps/3 + <altgr letter \1> : "\2" + <altgr shift letter \1> : "\3" + <altgr caps letter \1> : "\3" + <altgr caps shift letter \1> : "\2" +end macro + + +key("|" "|" "\\" "/" "`") +key("1" "!" "1" "" "¡") +key("2" "\"" "2" "@" "“") +key("3" "#" "3" "£" "”") +key("4" "$" "4" "¢" "‘") +key("5" "%" "5" "€" "’") +key("6" "&" "6" "¥" "¬") +key("7" "/" "7" "{" "÷") +key("8" "(" "8" "[" "«") +key("9" ")" "9" "]" "»") +key("0" "=" "0" "}" "°") +key("+" "+" "?" "\\" "¿") +<shift dead letter ´> : <dead letter `> +<altgr dead letter ´> : "±" +<altgr shift dead letter ´> : <dead letter ¨> + +<shift dead letter ^> : "^" +<altgr dead letter ^> : <dead letter ~> +<altgr shift dead letter ^> : "~" + +key("'" "*" "`" "×") +key("<" ">" "|" "\\") + +<letter ,> : "," +<shift letter ,> : ";" +<altgr letter ,> : <dead letter ¸> +<altgr shift letter ,> : <dead letter ˛> + +<letter .> : "." +<shift letter .> : ":" +<altgr letter .> : "·" +<altgr shift letter .> : <dead letter ˙> + +<letter -> : "-" +<shift letter -> : "_" +<altgr letter -> : <dead letter \u0323> +<altgr shift letter -> : <dead letter ¯> + + +nocaps("q" "[" "<") +nocaps("w" "]" ">") +nocaps("e" "“" "‘") +nocaps("r" "”" "’") +nocaps("t" "/" "*") +<altgr letter y> : "switch ()" <left> +<altgr shift letter y> : "default:" +<altgr letter u> : "unsigned " +<altgr shift letter u> : "signed " +<altgr letter i> : "else if ()" <left> +<altgr shift letter i> : "else" +<altgr letter o> : "while ()" <left> +<altgr shift letter o> : "for ()" <left> +<altgr letter p> : "continue;" +<altgr shift letter p> : "break;" +# - (see earlier) +# ^ (see earlier) + +nocaps("a" "(" "{") +nocaps("s" ")" "}") +nocaps("d" "'" "\"") +nocaps("f" "`" "\\") +nocaps("g" "↑") +# h +<altgr letter j> : "goto fail;" +<altgr shigy letter j> : "goto " +<altgr letter k> : "const " +<altgr shift letter k> : "restrict " +<altgr letter l> : "static " +<altgr shift letter l> : "static inline " +<altgr letter ö> : "return " +<altgr shift letter ö> : "volatile " +# . (see earlier) +# ' (see earlier) + +# < (see earlier) +<altgr letter i> : "size_t" +<altgr shift letter i> : "sizeof()" <left> +# x +nocaps("c" "©" "®") +nocaps("v" "←") +nocaps("b" "↓") +nocaps("n" "→" "–") +nocaps("m" "µ" "—") +# å +# , (see earlier) +# ä + |