summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quantum/keymap_extras/keymap_icelandic.h153
-rw-r--r--quantum/keymap_extras/sendstring_icelandic.h100
2 files changed, 253 insertions, 0 deletions
diff --git a/quantum/keymap_extras/keymap_icelandic.h b/quantum/keymap_extras/keymap_icelandic.h
new file mode 100644
index 0000000000..2ccb4b543c
--- /dev/null
+++ b/quantum/keymap_extras/keymap_icelandic.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 IS_RNGA KC_GRV // ° (dead)
+#define IS_1 KC_1 // 1
+#define IS_2 KC_2 // 2
+#define IS_3 KC_3 // 3
+#define IS_4 KC_4 // 4
+#define IS_5 KC_5 // 5
+#define IS_6 KC_6 // 6
+#define IS_7 KC_7 // 7
+#define IS_8 KC_8 // 8
+#define IS_9 KC_9 // 9
+#define IS_0 KC_0 // 0
+#define IS_ODIA KC_MINS // Ö
+#define IS_MINS KC_EQL // -
+// Row 2
+#define IS_Q KC_Q // Q
+#define IS_W KC_W // W
+#define IS_E KC_E // E
+#define IS_R KC_R // R
+#define IS_T KC_T // T
+#define IS_Y KC_Y // Y
+#define IS_U KC_U // U
+#define IS_I KC_I // I
+#define IS_O KC_O // O
+#define IS_P KC_P // P
+#define IS_ETH KC_LBRC // Ð
+#define IS_QUOT KC_RBRC // '
+// Row 3
+#define IS_A KC_A // A
+#define IS_S KC_S // S
+#define IS_D KC_D // D
+#define IS_F KC_F // F
+#define IS_G KC_G // G
+#define IS_H KC_H // H
+#define IS_J KC_J // J
+#define IS_K KC_K // K
+#define IS_L KC_L // L
+#define IS_AE KC_SCLN // Æ
+#define IS_ACUT KC_QUOT // ´ (dead)
+#define IS_PLUS KC_NUHS // +
+// Row 4
+#define IS_LABK KC_NUBS // <
+#define IS_Z KC_Z // Z
+#define IS_X KC_X // X
+#define IS_C KC_C // C
+#define IS_V KC_V // V
+#define IS_B KC_B // B
+#define IS_N KC_N // N
+#define IS_M KC_M // M
+#define IS_COMM KC_COMM // ,
+#define IS_DOT KC_DOT // .
+#define IS_THRN KC_SLSH // Þ
+
+/* Shifted symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ¨ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │   │ _ │       │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │ ? │     │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
+ * │      │   │   │   │   │   │   │   │   │   │   │   │ * │    │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │    │ > │   │   │   │   │   │   │   │ ; │ : │   │          │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │    │    │    │                        │    │    │    │    │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+// Row 1
+#define IS_DIAE S(IS_RNGA) // ¨ (dead)
+#define IS_EXLM S(IS_1) // !
+#define IS_DQUO S(IS_2) // "
+#define IS_HASH S(IS_3) // #
+#define IS_DLR S(IS_4) // $
+#define IS_PERC S(IS_5) // %
+#define IS_AMPR S(IS_6) // &
+#define IS_SLSH S(IS_7) // /
+#define IS_LPRN S(IS_8) // (
+#define IS_RPRN S(IS_9) // )
+#define IS_EQL S(IS_0) // =
+#define IS_UNDS S(IS_MINS) // _
+// Row 2
+#define IS_QUES S(IS_QUOT) // ?
+// Row 3
+#define IS_ASTR S(IS_PLUS) // *
+// Row 4
+#define IS_RABK S(IS_LABK) // >
+#define IS_SCLN S(IS_COMM) // ;
+#define IS_COLN S(IS_DOT) // :
+
+/* AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ° │   │   │   │   │   │   │ { │ [ │ ] │ } │ \ │   │       │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │     │ @ │   │ € │   │   │   │   │   │   │   │   │ ~ │     │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │
+ * │      │   │   │   │   │   │   │   │   │   │   │ ^ │ ` │    │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
+ * │    │ | │   │   │   │   │   │   │ µ │   │   │   │          │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │    │    │    │                        │    │    │    │    │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+// Row 1
+#define IS_DEG ALGR(IS_RNGA) // °
+#define IS_LCBR ALGR(IS_7) // {
+#define IS_LBRC ALGR(IS_8) // [
+#define IS_RBRC ALGR(IS_9) // ]
+#define IS_RCBR ALGR(IS_0) // }
+#define IS_BSLS ALGR(IS_ODIA) // (backslash)
+// Row 2
+#define IS_AT ALGR(IS_Q) // @
+#define IS_EURO ALGR(IS_E) // €
+#define IS_TILD ALGR(IS_QUOT) // ~
+// Row 3
+#define IS_CIRC ALGR(IS_ACUT) // ^ (dead)
+#define IS_GRV ALGR(IS_PLUS) // ` (dead)
+// Row 4
+#define IS_PIPE ALGR(IS_LABK) // |
+#define IS_MICR ALGR(IS_M) // µ
diff --git a/quantum/keymap_extras/sendstring_icelandic.h b/quantum/keymap_extras/sendstring_icelandic.h
new file mode 100644
index 0000000000..867eb8743c
--- /dev/null
+++ b/quantum/keymap_extras/sendstring_icelandic.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 Icelandic layouts
+
+#pragma once
+
+#include "keymap_icelandic.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, 1, 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, 0, 1),
+ 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)
+};
+
+const uint8_t ascii_to_altgr_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, 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(1, 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, 1, 1, 1, 1, 0),
+ KCLUT_ENTRY(1, 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, 1, 1, 1, 1, 0)
+};
+
+const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
+ // NUL SOH STX ETX EOT ENQ ACK BEL
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ // BS TAB LF VT FF CR SO SI
+ KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ // DLE DC1 DC2 DC3 DC4 NAK SYN ETB
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ // CAN EM SUB ESC FS GS RS US
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+
+ // ! " # $ % & '
+ KC_SPC, IS_1, IS_2, IS_3, IS_4, IS_5, IS_6, IS_QUOT,
+ // ( ) * + , - . /
+ IS_8, IS_9, IS_PLUS, IS_PLUS, IS_COMM, IS_MINS, IS_DOT, IS_7,
+ // 0 1 2 3 4 5 6 7
+ IS_0, IS_1, IS_2, IS_3, IS_4, IS_5, IS_6, IS_7,
+ // 8 9 : ; < = > ?
+ IS_8, IS_9, IS_DOT, IS_COMM, IS_LABK, IS_0, IS_LABK, IS_QUOT,
+ // @ A B C D E F G
+ IS_Q, IS_A, IS_B, IS_C, IS_D, IS_E, IS_F, IS_G,
+ // H I J K L M N O
+ IS_H, IS_I, IS_J, IS_K, IS_L, IS_M, IS_N, IS_O,
+ // P Q R S T U V W
+ IS_P, IS_Q, IS_R, IS_S, IS_T, IS_U, IS_V, IS_W,
+ // X Y Z [ \ ] ^ _
+ IS_X, IS_Y, IS_Z, IS_8, IS_ODIA, IS_9, IS_ACUT, IS_MINS,
+ // ` a b c d e f g
+ IS_PLUS, IS_A, IS_B, IS_C, IS_D, IS_E, IS_F, IS_G,
+ // h i j k l m n o
+ IS_H, IS_I, IS_J, IS_K, IS_L, IS_M, IS_N, IS_O,
+ // p q r s t u v w
+ IS_P, IS_Q, IS_R, IS_S, IS_T, IS_U, IS_V, IS_W,
+ // x y z { | } ~ DEL
+ IS_X, IS_Y, IS_Z, IS_7, IS_LABK, IS_0, IS_QUOT, KC_DEL
+};