aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-02-22 00:40:28 +1100
committerGitHub <noreply@github.com>2020-02-21 14:40:28 +0100
commit032fbf3f24ce0d537fbb71e584cdb79780dfb10b (patch)
tree976498561e0c8d5bdae34c673f52d4f8b4db2905
parenta7d859dab86ee0d741559da68eee14949116fe16 (diff)
downloadqmk_firmware-032fbf3f24ce0d537fbb71e584cdb79780dfb10b.tar.gz
qmk_firmware-032fbf3f24ce0d537fbb71e584cdb79780dfb10b.zip
Add Danish keymap and sendstring LUT (#8218)
-rw-r--r--quantum/keymap_extras/keymap_danish.h153
-rw-r--r--quantum/keymap_extras/sendstring_danish.h99
2 files changed, 252 insertions, 0 deletions
diff --git a/quantum/keymap_extras/keymap_danish.h b/quantum/keymap_extras/keymap_danish.h
new file mode 100644
index 000000000..618e42ccf
--- /dev/null
+++ b/quantum/keymap_extras/keymap_danish.h
@@ -0,0 +1,153 @@
1/* Copyright 2019
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 DK_HALF KC_GRV // ½
38#define DK_1 KC_1 // 1
39#define DK_2 KC_2 // 2
40#define DK_3 KC_3 // 3
41#define DK_4 KC_4 // 4
42#define DK_5 KC_5 // 5
43#define DK_6 KC_6 // 6
44#define DK_7 KC_7 // 7
45#define DK_8 KC_8 // 8
46#define DK_9 KC_9 // 9
47#define DK_0 KC_0 // 0
48#define DK_PLUS KC_MINS // +
49#define DK_ACUT KC_EQL // ´ (dead)
50// Row 2
51#define DK_Q KC_Q // Q
52#define DK_W KC_W // W
53#define DK_E KC_E // E
54#define DK_R KC_R // R
55#define DK_T KC_T // T
56#define DK_Y KC_Y // Y
57#define DK_U KC_U // U
58#define DK_I KC_I // I
59#define DK_O KC_O // O
60#define DK_P KC_P // P
61#define DK_ARNG KC_LBRC // Å
62#define DK_DIAE KC_RBRC // ¨ (dead)
63// Row 3
64#define DK_A KC_A // A
65#define DK_S KC_S // S
66#define DK_D KC_D // D
67#define DK_F KC_F // F
68#define DK_G KC_G // G
69#define DK_H KC_H // H
70#define DK_J KC_J // J
71#define DK_K KC_K // K
72#define DK_L KC_L // L
73#define DK_AE KC_SCLN // Æ
74#define DK_OSTR KC_QUOT // Ø
75#define DK_QUOT KC_NUHS // '
76// Row 4
77#define DK_LABK KC_NUBS // <
78#define DK_Z KC_Z // Z
79#define DK_X KC_X // X
80#define DK_C KC_C // C
81#define DK_V KC_V // V
82#define DK_B KC_B // B
83#define DK_N KC_N // N
84#define DK_M KC_M // M
85#define DK_COMM KC_COMM // ,
86#define DK_DOT KC_DOT // .
87#define DK_MINS KC_SLSH // -
88
89/* Shifted symbols
90 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
91 * │ § │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │       │
92 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
93 * │     │   │   │   │   │   │   │   │   │   │   │   │ ^ │     │
94 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
95 * │      │   │   │   │   │   │   │   │   │   │   │   │ * │    │
96 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
97 * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │          │
98 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
99 * │    │    │    │                        │    │    │    │    │
100 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
101 */
102// Row 1
103#define DK_SECT S(DK_HALF) // §
104#define DK_EXLM S(DK_1) // !
105#define DK_DQUO S(DK_2) // "
106#define DK_HASH S(DK_3) // #
107#define DK_CURR S(DK_4) // ¤
108#define DK_PERC S(DK_5) // %
109#define DK_AMPR S(DK_6) // &
110#define DK_SLSH S(DK_7) // /
111#define DK_LPRN S(DK_8) // (
112#define DK_RPRN S(DK_9) // )
113#define DK_EQL S(DK_0) // =
114#define DK_QUES S(DK_PLUS) // ?
115#define DK_GRV S(DK_ACUT) // ` (dead)
116// Row 2
117#define DK_CIRC S(DK_DIAE) // ^ (dead)
118// Row 3
119#define DK_ASTR S(DK_QUOT) // *
120// Row 4
121#define DK_RABK S(DK_LABK) // >
122#define DK_SCLN S(DK_COMM) // ;
123#define DK_COLN S(DK_DOT) // :
124#define DK_UNDS S(DK_MINS) // _
125
126/* AltGr symbols
127 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
128 * │   │   │ @ │ £ │ $ │ € │   │ { │ [ │ ] │ } │   │ | │       │
129 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
130 * │     │   │   │   │   │   │   │   │   │   │   │   │ ~ │     │
131 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
132 * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │
133 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
134 * │    │ \ │   │   │   │   │   │   │ µ │   │   │   │          │
135 * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
136 * │    │    │    │                        │    │    │    │    │
137 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
138 */
139// Row 1
140#define DK_AT ALGR(DK_2) // @
141#define DK_PND ALGR(DK_3) // £
142#define DK_DLR ALGR(DK_4) // $
143#define DK_EURO ALGR(DK_5) // €
144#define DK_LCBR ALGR(DK_7) // {
145#define DK_LBRC ALGR(DK_8) // [
146#define DK_RBRC ALGR(DK_9) // ]
147#define DK_RCBR ALGR(DK_0) // }
148#define DK_PIPE ALGR(DK_ACUT) // |
149// Row 2
150#define DK_TILD ALGR(DK_DIAE) // ~ (dead)
151// Row 4
152#define DK_BSLS ALGR(DK_LABK) // (backslash)
153#define DK_MICR ALGR(DK_M) // µ
diff --git a/quantum/keymap_extras/sendstring_danish.h b/quantum/keymap_extras/sendstring_danish.h
new file mode 100644
index 000000000..3505a076b
--- /dev/null
+++ b/quantum/keymap_extras/sendstring_danish.h
@@ -0,0 +1,99 @@
1/* Copyright 2019
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 Danish layouts
18
19#pragma once
20
21#include "keymap_danish.h"
22
23// clang-format off
24
25const bool ascii_to_shift_lut[128] PROGMEM = {
26 0, 0, 0, 0, 0, 0, 0, 0,
27 0, 0, 0, 0, 0, 0, 0, 0,
28 0, 0, 0, 0, 0, 0, 0, 0,
29 0, 0, 0, 0, 0, 0, 0, 0,
30
31 0, 1, 1, 1, 0, 1, 1, 0,
32 1, 1, 1, 0, 0, 0, 0, 1,
33 0, 0, 0, 0, 0, 0, 0, 0,
34 0, 0, 1, 1, 0, 1, 1, 1,
35 0, 1, 1, 1, 1, 1, 1, 1,
36 1, 1, 1, 1, 1, 1, 1, 1,
37 1, 1, 1, 1, 1, 1, 1, 1,
38 1, 1, 1, 0, 0, 0, 1, 1,
39 1, 0, 0, 0, 0, 0, 0, 0,
40 0, 0, 0, 0, 0, 0, 0, 0,
41 0, 0, 0, 0, 0, 0, 0, 0,
42 0, 0, 0, 0, 0, 0, 0, 0
43};
44
45const bool ascii_to_altgr_lut[128] PROGMEM = {
46 0, 0, 0, 0, 0, 0, 0, 0,
47 0, 0, 0, 0, 0, 0, 0, 0,
48 0, 0, 0, 0, 0, 0, 0, 0,
49 0, 0, 0, 0, 0, 0, 0, 0,
50
51 0, 0, 0, 0, 1, 0, 0, 0,
52 0, 0, 0, 0, 0, 0, 0, 0,
53 0, 0, 0, 0, 0, 0, 0, 0,
54 0, 0, 0, 0, 0, 0, 0, 0,
55 1, 0, 0, 0, 0, 0, 0, 0,
56 0, 0, 0, 0, 0, 0, 0, 0,
57 0, 0, 0, 0, 0, 0, 0, 0,
58 0, 0, 0, 1, 1, 1, 0, 0,
59 0, 0, 0, 0, 0, 0, 0, 0,
60 0, 0, 0, 0, 0, 0, 0, 0,
61 0, 0, 0, 0, 0, 0, 0, 0,
62 0, 0, 0, 1, 1, 1, 1, 0
63};
64
65const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
66 // NUL SOH STX ETX EOT ENQ ACK BEL
67 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
68 // BS TAB LF VT FF CR SO SI
69 KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
70 // DLE DC1 DC2 DC3 DC4 NAK SYN ETB
71 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
72 // CAN EM SUB ESC FS GS RS US
73 XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
74
75 // ! " # $ % & '
76 KC_SPC, DK_1, DK_2, DK_3, DK_4, DK_5, DK_6, DK_QUOT,
77 // ( ) * + , - . /
78 DK_8, DK_9, DK_QUOT, DK_PLUS, DK_COMM, DK_MINS, DK_DOT, DK_7,
79 // 0 1 2 3 4 5 6 7
80 DK_0, DK_1, DK_2, DK_3, DK_4, DK_5, DK_6, DK_7,
81 // 8 9 : ; < = > ?
82 DK_8, DK_9, DK_DOT, DK_COMM, DK_LABK, DK_0, DK_LABK, DK_PLUS,
83 // @ A B C D E F G
84 DK_2, DK_A, DK_B, DK_C, DK_D, DK_E, DK_F, DK_G,
85 // H I J K L M N O
86 DK_H, DK_I, DK_J, DK_K, DK_L, DK_M, DK_N, DK_O,
87 // P Q R S T U V W
88 DK_P, DK_Q, DK_R, DK_S, DK_T, DK_U, DK_V, DK_W,
89 // X Y Z [ \ ] ^ _
90 DK_X, DK_Y, DK_Z, DK_8, DK_LABK, DK_9, DK_DIAE, DK_MINS,
91 // ` a b c d e f g
92 DK_ACUT, DK_A, DK_B, DK_C, DK_D, DK_E, DK_F, DK_G,
93 // h i j k l m n o
94 DK_H, DK_I, DK_J, DK_K, DK_L, DK_M, DK_N, DK_O,
95 // p q r s t u v w
96 DK_P, DK_Q, DK_R, DK_S, DK_T, DK_U, DK_V, DK_W,
97 // x y z { | } ~ DEL
98 DK_X, DK_Y, DK_Z, DK_7, DK_ACUT, DK_0, DK_DIAE, KC_DEL
99};