summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-03-22 19:52:54 +1100
committerGitHub <noreply@github.com>2020-03-22 19:52:54 +1100
commitf9e67338a4f0b038d1f79a9bc06cc9b4289152e3 (patch)
tree9148c54d958d52847c9a2f7fc22ad05bbdab48f7 /quantum
parent5f9f62fb8c56edf20a55e025e070ee61dee16860 (diff)
Add Finnish keymap and sendstring LUT (#8495)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap_extras/keymap_finnish.h153
-rw-r--r--quantum/keymap_extras/sendstring_finnish.h100
2 files changed, 253 insertions, 0 deletions
diff --git a/quantum/keymap_extras/keymap_finnish.h b/quantum/keymap_extras/keymap_finnish.h
new file mode 100644
index 0000000000..81a8027ff4
--- /dev/null
+++ b/quantum/keymap_extras/keymap_finnish.h
@@ -0,0 +1,153 @@
+/* Copyright 2020
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "keymap.h"
+
+// clang-format off
+
+/*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │       │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │     │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
+ * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │    │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │          │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │    │    │    │                        │    │    │    │    │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+// Row 1
+#define FI_SECT KC_GRV // §
+#define FI_1 KC_1 // 1
+#define FI_2 KC_2 // 2
+#define FI_3 KC_3 // 3
+#define FI_4 KC_4 // 4
+#define FI_5 KC_5 // 5
+#define FI_6 KC_6 // 6
+#define FI_7 KC_7 // 7
+#define FI_8 KC_8 // 8
+#define FI_9 KC_9 // 9
+#define FI_0 KC_0 // 0
+#define FI_PLUS KC_MINS // +
+#define FI_ACUT KC_EQL // ´ (dead)
+// Row 2
+#define FI_Q KC_Q // Q
+#define FI_W KC_W // W
+#define FI_E KC_E // E
+#define FI_R KC_R // R
+#define FI_T KC_T // T
+#define FI_Y KC_Y // Y
+#define FI_U KC_U // U
+#define FI_I KC_I // I
+#define FI_O KC_O // O
+#define FI_P KC_P // P
+#define FI_ARNG KC_LBRC // Å
+#define FI_DIAE KC_RBRC // ¨ (dead)
+// Row 3
+#define FI_A KC_A // A
+#define FI_S KC_S // S
+#define FI_D KC_D // D
+#define FI_F KC_F // F
+#define FI_G KC_G // G
+#define FI_H KC_H // H
+#define FI_J KC_J // J
+#define FI_K KC_K // K
+#define FI_L KC_L // L
+#define FI_ODIA KC_SCLN // Ö
+#define FI_ADIA KC_QUOT // Ä
+#define FI_QUOT KC_NUHS // '
+// Row 4
+#define FI_LABK KC_NUBS // <
+#define FI_Z KC_Z // Z
+#define FI_X KC_X // X
+#define FI_C KC_C // C
+#define FI_V KC_V // V
+#define FI_B KC_B // B
+#define FI_N KC_N // N
+#define FI_M KC_M // M
+#define FI_COMM KC_COMM // ,
+#define FI_DOT KC_DOT // .
+#define FI_MINS KC_SLSH // -
+
+/* Shifted symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ½ │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │       │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │ ^ │     │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
+ * │      │   │   │   │   │   │   │   │   │   │   │   │ * │    │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │          │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │    │    │    │                        │    │    │    │    │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+// Row 1
+#define FI_HALF S(FI_SECT) // ½
+#define FI_EXLM S(FI_1) // !
+#define FI_DQUO S(FI_2) // "
+#define FI_HASH S(FI_3) // #
+#define FI_CURR S(FI_4) // ¤
+#define FI_PERC S(FI_5) // %
+#define FI_AMPR S(FI_6) // &
+#define FI_SLSH S(FI_7) // /
+#define FI_LPRN S(FI_8) // (
+#define FI_RPRN S(FI_9) // )
+#define FI_EQL S(FI_0) // =
+#define FI_QUES S(FI_PLUS) // ?
+#define FI_GRV S(FI_ACUT) // ` (dead)
+// Row 2
+#define FI_CIRC S(FI_DIAE) // ^ (dead)
+// Row 3
+#define FI_ASTR S(FI_QUOT) // *
+// Row 4
+#define FI_RABK S(FI_LABK) // >
+#define FI_SCLN S(FI_COMM) // ;
+#define FI_COLN S(FI_DOT) // :
+#define FI_UNDS S(FI_MINS) // _
+
+/* AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │   │   │ @ │ £ │ $ │ € │   │ { │ [ │ ] │ } │ \ │   │       │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │ ~ │     │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
+ * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │    │ | │   │   │   │   │   │   │ µ │   │   │   │          │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │    │    │    │                        │    │    │    │    │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+// Row 1
+#define FI_AT ALGR(FI_2) // @
+#define FI_PND ALGR(FI_3) // £
+#define FI_DLR ALGR(FI_4) // $
+#define FI_EURO ALGR(FI_5) // €
+#define FI_LCBR ALGR(FI_7) // {
+#define FI_LBRC ALGR(FI_8) // [
+#define FI_RBRC ALGR(FI_9) // ]
+#define FI_RCBR ALGR(FI_0) // }
+#define FI_BSLS ALGR(FI_PLUS) // (backslash)
+// Row 2
+#define FI_TILD ALGR(FI_DIAE) // ~ (dead)
+// Row 4
+#define FI_PIPE ALGR(FI_LABK) // |
+#define FI_MICR ALGR(FI_M) // µ
diff --git a/quantum/keymap_extras/sendstring_finnish.h b/quantum/keymap_extras/sendstring_finnish.h
new file mode 100644
index 0000000000..cf23483843
--- /dev/null
+++ b/quantum/keymap_extras/sendstring_finnish.h
@@ -0,0 +1,100 @@
+/* Copyright 2020
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Sendstring lookup tables for Finnish layouts
+
+#pragma once
+
+#include "keymap_finnish.h"
+#include "quantum.h"
+
+// clang-format off
+
+const uint8_t ascii_to_shift_lut[16] PROGMEM = {
+ KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
+ KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
+ KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
+ KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
+
+ KCLUT_ENTRY(0, 1, 1, 1, 0, 1, 1, 0),
+ KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
+ KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
+ KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
+ KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
+ KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
+ KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
+ KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
+ KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
+ KCLUT_ENTRY(0, 0, 0,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XXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ // CAN EM SUB ESC FS GS RS US
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+
+ // ! " # $ % & '
+ KC_SPC, FI_1, FI_2, FI_3, FI_4, FI_5, FI_6, FI_QUOT,
+ // ( ) * + , - . /
+ FI_8, FI_9, FI_QUOT, FI_PLUS, FI_COMM, FI_MINS, FI_DOT, FI_7,
+ // 0 1 2 3 4 5 6 7
+ FI_0, FI_1, FI_2, FI_3, FI_4, FI_5, FI_6, FI_7,
+ // 8 9 : ; < = > ?
+ FI_8, FI_9, FI_DOT, FI_COMM, FI_LABK, FI_0, FI_LABK, FI_PLUS,
+ // @ A B C D E F G
+ FI_2, FI_A, FI_B, FI_C, FI_D, FI_E, FI_F, FI_G,
+ // H I J K L M N O
+ FI_H, FI_I, FI_J, FI_K, FI_L, FI_M, FI_N, FI_O,
+ // P Q R S T U V W
+ FI_P, FI_Q, FI_R, FI_S, FI_T, FI_U, FI_V, FI_W,
+ // X Y Z [ \ ] ^ _
+ FI_X, FI_Y, FI_Z, FI_8, FI_PLUS, FI_9, FI_DIAE, FI_MINS,
+ // ` a b c d e f g
+ FI_ACUT, FI_A, FI_B, FI_C, FI_D, FI_E, FI_F, FI_G,
+ // h i j k l m n o
+ FI_H, FI_I, FI_J, FI_K, FI_L, FI_M, FI_N, FI_O,
+ // p q r s t u v w
+ FI_P, FI_Q, FI_R, FI_S, FI_T, FI_U, FI_V, FI_W,
+ // x y z { | } ~ DEL
+ FI_X, FI_Y, FI_Z, FI_7, FI_LABK, FI_0, FI_DIAE, KC_DEL
+};