1
0
Fork 0

Update Slovenian keymap and add sendstring LUT (#8350)

This commit is contained in:
Ryan 2020-03-16 07:40:54 +11:00 committed by GitHub
parent 4b1430fd09
commit 49a2fbea0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 248 additions and 84 deletions

View file

@ -1,5 +1,4 @@
/* Copyright 2018 Žan Pevec
*
* 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
@ -15,93 +14,158 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYMAP_SLOVENIAN
#define KEYMAP_SLOVENIAN
#pragma once
#include "keymap.h"
// Swapped Z and Y
#define SI_Z KC_Y
#define SI_Y KC_Z
// clang-format off
// Special characters
#define SI_CV KC_SCLN
#define SI_SV KC_LBRC
#define SI_ZV KC_BSLS
/*
*
*  ¸  1  2  3  4  5  6  7  8  9  0  '  +        
*
*       Q  W  E  R  T  Z  U  I  O  P  Š  Đ      
*     
*        A  S  D  F  G  H  J  K  L  Č  Ć  Ž     
*
*      <  Y  X  C  V  B  N  M  ,  .  -           
*
*                                                     
*
*/
// Row 1
#define SI_CEDL KC_GRV // ¸ (dead)
#define SI_1 KC_1 // 1
#define SI_2 KC_2 // 2
#define SI_3 KC_3 // 3
#define SI_4 KC_4 // 4
#define SI_5 KC_5 // 5
#define SI_6 KC_6 // 6
#define SI_7 KC_7 // 7
#define SI_8 KC_8 // 8
#define SI_9 KC_9 // 9
#define SI_0 KC_0 // 0
#define SI_QUOT KC_MINS // '
#define SI_PLUS KC_EQL // +
// Row 2
#define SI_Q KC_Q // Q
#define SI_W KC_W // W
#define SI_E KC_E // E
#define SI_R KC_R // R
#define SI_T KC_T // T
#define SI_Z KC_Y // Z
#define SI_U KC_U // U
#define SI_I KC_I // I
#define SI_O KC_O // O
#define SI_P KC_P // P
#define SI_SCAR KC_LBRC // Š
#define SI_DSTR KC_RBRC // Đ
// Row 3
#define SI_A KC_A // A
#define SI_S KC_S // S
#define SI_D KC_D // D
#define SI_F KC_F // F
#define SI_G KC_G // G
#define SI_H KC_H // H
#define SI_J KC_J // J
#define SI_K KC_K // K
#define SI_L KC_L // L
#define SI_CCAR KC_SCLN // Č
#define SI_CACU KC_QUOT // Ć
#define SI_ZCAR KC_NUHS // Ž
// Row 4
#define SI_LABK KC_NUBS // <
#define SI_Y KC_Z // Y
#define SI_X KC_X // X
#define SI_C KC_C // C
#define SI_V KC_V // V
#define SI_B KC_B // B
#define SI_N KC_N // N
#define SI_M KC_M // M
#define SI_COMM KC_COMM // ,
#define SI_DOT KC_DOT // .
#define SI_MINS KC_SLSH // -
#define SI_A KC_A
#define SI_B KC_B
#define SI_C KC_C
#define SI_D KC_D
#define SI_E KC_E
#define SI_F KC_F
#define SI_G KC_G
#define SI_H KC_H
#define SI_I KC_I
#define SI_J KC_J
#define SI_K KC_K
#define SI_L KC_L
#define SI_M KC_M
#define SI_N KC_N
#define SI_O KC_O
#define SI_P KC_P
#define SI_Q KC_Q
#define SI_R KC_R
#define SI_S KC_S
#define SI_T KC_T
#define SI_U KC_U
#define SI_V KC_V
#define SI_W KC_W
#define SI_X KC_X
/* Shifted symbols
*
*  ¨  !  " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │       │
*
*                                               
*     
*                                               
*
*      >                       ;  :  _           
*
*                                                     
*
*/
// Row 1
#define SI_DIAE S(SI_CEDL) // ¨ (dead)
#define SI_EXLM S(SI_1) // !
#define SI_DQUO S(SI_2) // "
#define SI_HASH S(SI_3) // #
#define SI_DLR S(SI_4) // $
#define SI_PERC S(SI_5) // %
#define SI_AMPR S(SI_6) // &
#define SI_SLSH S(SI_7) // /
#define SI_LPRN S(SI_8) // (
#define SI_RPRN S(SI_9) // )
#define SI_EQL S(SI_0) // =
#define SI_QUES S(SI_QUOT) // ?
#define SI_ASTR S(SI_PLUS) // *
// Row 4
#define SI_RABK S(SI_LABK) // >
#define SI_SCLN S(SI_COMM) // ;
#define SI_COLN S(SI_DOT) // :
#define SI_UNDS S(SI_MINS) // _
#define SI_0 KC_0
#define SI_1 KC_1
#define SI_2 KC_2
#define SI_3 KC_3
#define SI_4 KC_4
#define SI_5 KC_5
#define SI_6 KC_6
#define SI_7 KC_7
#define SI_8 KC_8
#define SI_9 KC_9
/* AltGr symbols
*
*     ~  ˇ  ^  ˘  °  ˛  `  ˙  ´  ˝              
*
*       \  |                         ÷  ×      
*     
*                 [  ]        ł  Ł     ß  ¤     
*
*                  @  {  }  §                    
*
*                                                     
*
*/
// Row 1
#define SI_TILD ALGR(SI_1) // ~
#define SI_CARN ALGR(SI_2) // ˇ (dead)
#define SI_CIRC ALGR(SI_3) // ^ (dead)
#define SI_BREV ALGR(SI_4) // ˘ (dead)
#define SI_DEG ALGR(SI_5) // ° (dead)
#define SI_OGON ALGR(SI_6) // ˛ (dead)
#define SI_GRV ALGR(SI_7) // `
#define SI_DOTA ALGR(SI_8) // ˙ (dead)
#define SI_ACCU ALGR(SI_9) // ´ (dead)
#define SI_DACU ALGR(SI_0) // ˝ (dead)
// Row 2
#define SI_BSLS ALGR(SI_Q) // (backslash)
#define SI_PIPE ALGR(SI_W) // |
#define SI_EURO ALGR(SI_E) // €
#define SI_DIV ALGR(SI_SCAR) // ÷
#define SI_MUL ALGR(SI_DSTR) // ×
// Row 3
#define SI_LBRC ALGR(SI_F) // [
#define SI_RBRC ALGR(SI_G) // ]
#define SI_LLST ALGR(SI_K) // ł
#define SI_CLST ALGR(SI_L) // Ł
#define SI_SS ALGR(SI_CACU) // ß
#define SI_CURR ALGR(SI_ZCAR) // ¤
// Row 4
#define SI_AT ALGR(SI_V) // @
#define SI_LCBR ALGR(SI_B) // {
#define SI_RCBR ALGR(SI_N) // }
#define SI_SECT ALGR(SI_M) // §
#define SI_DOT KC_DOT
#define SI_COMM KC_COMM
#define SI_PLUS KC_EQL // + and * and ~
#define SI_QOT KC_MINS // Single quote
#define SI_MINS KC_SLSH // - and _
// shifted characters
#define SI_EXLM LSFT(KC_1) // !
#define SI_DQOT LSFT(KC_2) // "
#define SI_HASH LSFT(KC_3) // #
#define SI_DLR LSFT(KC_4) // $
#define SI_PERC LSFT(KC_5) // %
#define SI_AMPR LSFT(KC_6) // &
#define SI_SLSH LSFT(KC_7) // /
#define SI_LPRN LSFT(KC_8) // (
#define SI_RPRN LSFT(KC_9) // )
#define SI_EQL LSFT(KC_0) // =
#define SI_QST LSFT(SI_QOT) // ?
#define SI_ASTR LSFT(SI_PLUS) // *
#define SI_COLN LSFT(KC_DOT) // :
#define SI_SCLN LSFT(KC_COMM) // ;
#define SI_UNDS LSFT(SI_MINS) // _
// Alt Gr-ed characters
#define SI_CIRC ALGR(KC_3) // ^
#define SI_DEG ALGR(KC_5) // °
#define SI_GRV ALGR(KC_7) // `
#define SI_ACCU ALGR(KC_9) // ´
#define SI_LCBR ALGR(KC_B) // {
#define SI_RCBR ALGR(KC_N) // }
#define SI_LBRC ALGR(KC_F) // [
#define SI_RBRC ALGR(KC_G) // ]
#define SI_BSLS ALGR(KC_Q) // backslash
#define SI_AT ALGR(KC_V) // @
#define SI_EURO ALGR(KC_E) // €
#define SI_TILD ALGR(KC_1) // ~
#define SI_PIPE ALGR(KC_W) // |
#endif
// DEPRECATED
#define SI_QOT SI_QUOT
#define SI_SV SI_SCAR
#define SI_CV SI_CCAR
#define SI_ZV SI_ZCAR
#define SI_DQOT SI_DQUO
#define SI_QST SI_QUES

View file

@ -0,0 +1,100 @@
/* Copyright 2019
*
* 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 Slovenian layouts
#pragma once
#include "keymap_slovenian.h"
#include "quantum.h"
// clang-format off
const uint8_t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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, SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_QUOT,
// ( ) * + , - . /
SI_8, SI_9, SI_PLUS, SI_PLUS, SI_COMM, SI_MINS, SI_DOT, SI_7,
// 0 1 2 3 4 5 6 7
SI_0, SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7,
// 8 9 : ; < = > ?
SI_8, SI_9, SI_DOT, SI_COMM, SI_LABK, SI_0, SI_LABK, SI_QUOT,
// @ A B C D E F G
SI_V, SI_A, SI_B, SI_C, SI_D, SI_E, SI_F, SI_G,
// H I J K L M N O
SI_H, SI_I, SI_J, SI_K, SI_L, SI_M, SI_N, SI_O,
// P Q R S T U V W
SI_P, SI_Q, SI_R, SI_S, SI_T, SI_U, SI_V, SI_W,
// X Y Z [ \ ] ^ _
SI_X, SI_Y, SI_Z, SI_F, SI_Q, SI_G, SI_3, SI_MINS,
// ` a b c d e f g
SI_7, SI_A, SI_B, SI_C, SI_D, SI_E, SI_F, SI_G,
// h i j k l m n o
SI_H, SI_I, SI_J, SI_K, SI_L, SI_M, SI_N, SI_O,
// p q r s t u v w
SI_P, SI_Q, SI_R, SI_S, SI_T, SI_U, SI_V, SI_W,
// x y z { | } ~ DEL
SI_X, SI_Y, SI_Z, SI_B, SI_W, SI_N, SI_1, KC_DEL
};