aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-04-01 14:00:02 +1100
committerGitHub <noreply@github.com>2020-04-01 14:00:02 +1100
commit712ded1f2f0966e108c87172e5061f9673f398b7 (patch)
tree11b3de8894eca105c71ea87c22949d1463717aeb
parentc67e30459390982f4f1b47f46c62322f1fe9ba87 (diff)
downloadqmk_firmware-712ded1f2f0966e108c87172e5061f9673f398b7.tar.gz
qmk_firmware-712ded1f2f0966e108c87172e5061f9673f398b7.zip
Add Latvian keymap and sendstring LUT (#8563)
-rw-r--r--quantum/keymap_extras/keymap_latvian.h187
-rw-r--r--quantum/keymap_extras/sendstring_latvian.h59
2 files changed, 246 insertions, 0 deletions
diff --git a/quantum/keymap_extras/keymap_latvian.h b/quantum/keymap_extras/keymap_latvian.h
new file mode 100644
index 000000000..452e9167b
--- /dev/null
+++ b/quantum/keymap_extras/keymap_latvian.h
@@ -0,0 +1,187 @@
1/* Copyright 2020
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "keymap.h"
20
21// clang-format off
22
23/*
24 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
25 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │       │
26 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
27 * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │
28 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
29 * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │    │
30 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
31 * │    │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │          │
32 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
33 * │    │    │    │                        │    │    │    │    │
34 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
35 */
36// Row 1
37#define LV_GRV KC_GRV // `
38#define LV_1 KC_1 // 1
39#define LV_2 KC_2 // 2
40#define LV_3 KC_3 // 3
41#define LV_4 KC_4 // 4
42#define LV_5 KC_5 // 5
43#define LV_6 KC_6 // 6
44#define LV_7 KC_7 // 7
45#define LV_8 KC_8 // 8
46#define LV_9 KC_9 // 9
47#define LV_0 KC_0 // 0
48#define LV_MINS KC_MINS // -
49#define LV_EQL KC_EQL // =
50// Row 2
51#define LV_Q KC_Q // Q
52#define LV_W KC_W // W
53#define LV_E KC_E // E
54#define LV_R KC_R // R
55#define LV_T KC_T // T
56#define LV_Y KC_Y // Y
57#define LV_U KC_U // U
58#define LV_I KC_I // I
59#define LV_O KC_O // O
60#define LV_P KC_P // P
61#define LV_LBRC KC_LBRC // [
62#define LV_RBRC KC_RBRC // ]
63// Row 3
64#define LV_A KC_A // A
65#define LV_S KC_S // S
66#define LV_D KC_D // D
67#define LV_F KC_F // F
68#define LV_G KC_G // G
69#define LV_H KC_H // H
70#define LV_J KC_J // J
71#define LV_K KC_K // K
72#define LV_L KC_L // L
73#define LV_SCLN KC_SCLN // ;
74#define LV_QUOT KC_QUOT // ' (dead)
75#define LV_BSLS KC_NUHS // (backslash)
76// Row 4
77#define LV_NUBS KC_NUBS // (backslash)
78#define LV_Z KC_Z // Z
79#define LV_X KC_X // X
80#define LV_C KC_C // C
81#define LV_V KC_V // V
82#define LV_B KC_B // B
83#define LV_N KC_N // N
84#define LV_M KC_M // M
85#define LV_COMM KC_COMM // ,
86#define LV_DOT KC_DOT // .
87#define LV_SLSH KC_SLSH // /
88
89/* Shifted symbols
90 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
91 * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │       │
92 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
93 * │     │   │   │   │   │   │   │   │   │   │   │ { │ } │     │
94 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
95 * │      │   │   │   │   │   │   │   │   │   │ : │ " │ | │    │
96 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
97 * │    │   │   │   │   │   │   │   │   │ < │ > │ ? │          │
98 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
99 * │    │    │    │                        │    │    │    │    │
100 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
101 */
102// Row 1
103#define LV_TILD S(LV_GRV) // ~
104#define LV_EXLM S(LV_1) // !
105#define LV_AT S(LV_2) // @
106#define LV_HASH S(LV_3) // #
107#define LV_DLR S(LV_4) // $
108#define LV_PERC S(LV_5) // %
109#define LV_CIRC S(LV_6) // ^
110#define LV_AMPR S(LV_7) // &
111#define LV_ASTR S(LV_8) // *
112#define LV_LPRN S(LV_9) // (
113#define LV_RPRN S(LV_0) // )
114#define LV_UNDS S(LV_MINS) // _
115#define LV_PLUS S(LV_EQL) // +
116// Row 2
117#define LV_LCBR S(LV_LBRC) // {
118#define LV_RCBR S(LV_RBRC) // }
119// Row 3
120#define LV_COLN S(LV_SCLN) // :
121#define LV_DQUO S(LV_QUOT) // " (dead)
122#define LV_PIPE S(LV_BSLS) // |
123// Row 4
124#define LV_LABK S(LV_COMM) // <
125#define LV_RABK S(LV_DOT) // >
126#define LV_QUES S(LV_SLSH) // ?
127
128/* AltGr symbols
129 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
130 * │ - │   │ « │ » │ € │   │ ’ │   │   │   │   │ – │   │       │
131 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
132 * │     │   │   │ Ē │ Ŗ │   │   │ Ū │ Ī │ Ō │   │   │   │     │
133 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
134 * │      │ Ā │ Š │   │   │ Ģ │   │   │ Ķ │ Ļ │   │ ´ │   │    │
135 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
136 * │    │   │ Ž │   │ Č │   │   │ Ņ │   │   │   │   │          │
137 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
138 * │    │    │    │                        │    │    │    │    │
139 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
140 */
141// Row 1
142#define LV_SHYP ALGR(LV_GRV) // - (soft hyphen)
143#define LV_NBSP ALGR(LV_1) //   (non-breaking space)
144#define LV_LDAQ ALGR(LV_2) // «
145#define LV_RDAQ ALGR(LV_3) // »
146#define LV_EURO ALGR(LV_4) // €
147#define LV_RSQU ALGR(LV_6) // ’
148#define LV_NDSH ALGR(LV_MINS) // –
149// Row 2
150#define LV_EMAC ALGR(LV_E) // Ē
151#define LV_RCED ALGR(LV_R) // Ŗ
152#define LV_UMAC ALGR(LV_U) // Ū
153#define LV_IMAC ALGR(LV_I) // Ī
154#define LV_OMAC ALGR(LV_O) // Ō
155// Row 3
156#define LV_AMAC ALGR(LV_A) // Ā
157#define LV_SCAR ALGR(LV_S) // Š
158#define LV_GCED ALGR(LV_G) // Ģ
159#define LV_KCED ALGR(LV_K) // Ķ
160#define LV_LCED ALGR(LV_L) // Ļ
161#define LV_ACUT ALGR(LV_QUOT) // ´ (dead)
162// Row 4
163#define LV_ZCAR ALGR(LV_Z) // Ž
164#define LV_CCAR ALGR(LV_Z) // Č
165#define LV_NCED ALGR(LV_Z) // Ņ
166
167/* Shift+AltGr symbols
168 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
169 * │   │   │   │   │ § │ ° │   │ ± │ × │   │   │ — │   │       │
170 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
171 * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │
172 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
173 * │      │   │   │   │   │   │   │   │   │   │   │ ¨ │   │    │
174 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
175 * │    │   │   │   │   │   │   │   │   │   │   │   │          │
176 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
177 * │    │    │    │                        │    │    │    │    │
178 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
179 */
180// Row 1
181#define LV_SECT S(ALGR(LV_4)) // §
182#define LV_DEG S(ALGR(LV_5)) // °
183#define LV_PLMN S(ALGR(LV_7)) // ±
184#define LV_MUL S(ALGR(LV_8)) // ×
185#define LV_MDSH S(ALGR(LV_MINS)) // —
186// Row 3
187#define LV_DIAE S(ALGR(LV_QUOT)) // ¨ (dead)
diff --git a/quantum/keymap_extras/sendstring_latvian.h b/quantum/keymap_extras/sendstring_latvian.h
new file mode 100644
index 000000000..61f788693
--- /dev/null
+++ b/quantum/keymap_extras/sendstring_latvian.h
@@ -0,0 +1,59 @@
1/* Copyright 2020
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17// Sendstring lookup tables for Latvian layouts
18
19#pragma once
20
21#include "keymap_latvian.h"
22
23// clang-format off
24
25const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
26 // NUL SOH STX ETX EOT ENQ ACK BEL
27 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
28 // BS TAB LF VT FF CR SO SI
29 KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
30 // DLE DC1 DC2 DC3 DC4 NAK SYN ETB
31 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
32 // CAN EM SUB ESC FS GS RS US
33 XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
34
35 // ! " # $ % & '
36 KC_SPC, LV_1, LV_QUOT, LV_3, LV_4, LV_5, LV_7, LV_QUOT,
37 // ( ) * + , - . /
38 LV_9, LV_0, LV_8, LV_EQL, LV_COMM, LV_MINS, LV_DOT, LV_SLSH,
39 // 0 1 2 3 4 5 6 7
40 LV_0, LV_1, LV_2, LV_3, LV_4, LV_5, LV_6, LV_7,
41 // 8 9 : ; < = > ?
42 LV_8, LV_9, LV_SCLN, LV_SCLN, LV_COMM, LV_EQL, LV_DOT, LV_SLSH,
43 // @ A B C D E F G
44 LV_2, LV_A, LV_B, LV_C, LV_D, LV_E, LV_F, LV_G,
45 // H I J K L M N O
46 LV_H, LV_I, LV_J, LV_K, LV_L, LV_M, LV_N, LV_O,
47 // P Q R S T U V W
48 LV_P, LV_Q, LV_R, LV_S, LV_T, LV_U, LV_V, LV_W,
49 // X Y Z [ \ ] ^ _
50 LV_X, LV_Y, LV_Z, LV_LBRC, LV_BSLS, LV_RBRC, LV_6, LV_MINS,
51 // ` a b c d e f g
52 LV_GRV, LV_A, LV_B, LV_C, LV_D, LV_E, LV_F, LV_G,
53 // h i j k l m n o
54 LV_H, LV_I, LV_J, LV_K, LV_L, LV_M, LV_N, LV_O,
55 // p q r s t u v w
56 LV_P, LV_Q, LV_R, LV_S, LV_T, LV_U, LV_V, LV_W,
57 // x y z { | } ~ DEL
58 LV_X, LV_Y, LV_Z, LV_LBRC, LV_BSLS, LV_RBRC, LV_GRV, KC_DEL
59};