1
0
Fork 0

Add Lithuanian keymap and sendstring LUT (#8562)

* Add Lithuanian keymap and sendstring LUT

* Add Lithuanian AZERTY
This commit is contained in:
Ryan 2020-04-01 14:00:34 +11:00 committed by GitHub
parent 712ded1f2f
commit 17af712b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 502 additions and 0 deletions

View file

@ -0,0 +1,156 @@
/* 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
/*
*
*  `  !  -  /  ;  :  ,  .  =  (  )  ?  X        
*
*       Ą  Ž  E  R  T  Y  U  I  O  P  Į  W      
*     
*        A  S  D  Š  G  H  J  K  L  Ų  Ė  Q     
*
*      <  Z  Ū  C  V  B  N  M  Č  F  Ę           
*
*                                                     
*
*/
// Row 1
#define LT_GRV KC_GRV // `
#define LT_EXLM KC_1 // !
#define LT_MINS KC_2 // -
#define LT_SLSH KC_3 // /
#define LT_SCLN KC_4 // ;
#define LT_COLN KC_5 // :
#define LT_COMM KC_6 // ,
#define LT_DOT KC_7 // .
#define LT_EQL KC_8 // =
#define LT_LPRN KC_9 // (
#define LT_RPRN KC_0 // )
#define LT_QUES KC_MINS // ?
#define LT_X KC_EQL // X
// Row 2
#define LT_AOGO KC_Q // Ą
#define LT_ZCAR KC_W // Ž
#define LT_E KC_E // E
#define LT_R KC_R // R
#define LT_T KC_T // T
#define LT_Y KC_Y // Y
#define LT_U KC_U // U
#define LT_I KC_I // I
#define LT_O KC_O // O
#define LT_P KC_P // P
#define LT_IOGO KC_LBRC // Į
#define LT_W KC_RBRC // W
// Row 3
#define LT_A KC_A // A
#define LT_S KC_S // S
#define LT_D KC_D // D
#define LT_SCAR KC_F // Š
#define LT_G KC_G // G
#define LT_H KC_H // H
#define LT_J KC_J // J
#define LT_K KC_K // K
#define LT_L KC_L // L
#define LT_UOGO KC_SCLN // Ų
#define LT_EDOT KC_QUOT // Ė
#define LT_Q KC_NUHS // Q
// Row 4
#define LT_LABK KC_NUBS // <
#define LT_Z KC_Z // Z
#define LT_UMAC KC_X // Ū
#define LT_C KC_C // C
#define LT_V KC_V // V
#define LT_B KC_B // B
#define LT_N KC_N // N
#define LT_M KC_M // M
#define LT_CCAR KC_COMM // Č
#define LT_F KC_DOT // F
#define LT_EOGO KC_SLSH // Ę
/* Shifted symbols
*
*  ~  1  2  3  4  5  6  7  8  9  0  +           
*
*                                               
*     
*                                               
*
*      >                                         
*
*                                                     
*
*/
// Row 1
#define LT_TILD S(LT_GRV) // ~
#define LT_1 S(LT_EXLM) // 1
#define LT_2 S(LT_MINS) // 2
#define LT_3 S(LT_SLSH) // 3
#define LT_4 S(LT_SCLN) // 4
#define LT_5 S(LT_COLN) // 5
#define LT_6 S(LT_COMM) // 6
#define LT_7 S(LT_DOT) // 7
#define LT_8 S(LT_EQL) // 8
#define LT_9 S(LT_LPRN) // 9
#define LT_0 S(LT_RPRN) // 0
#define LT_PLUS S(LT_QUES) // +
// Row 4
#define LT_RABK S(LT_LABK) // >
/* AltGr symbols
*
*  ´  @  _  #  $  §  ^  &  *  [  ]  '  %        
*
*                                    {  }      
*     
*                                      " │ | │    │
*
*                                 \           
*
*                                                     
*
*/
// Row 1
#define LT_ACUT ALGR(LT_GRV) // ´
#define LT_AT ALGR(LT_EXLM) // @
#define LT_UNDS ALGR(LT_MINS) // _
#define LT_HASH ALGR(LT_SLSH) // #
#define LT_DLR ALGR(LT_SCLN) // $
#define LT_SECT ALGR(LT_COLN) // §
#define LT_CIRC ALGR(LT_COMM) // ^
#define LT_AMPR ALGR(LT_DOT) // &
#define LT_ASTR ALGR(LT_EQL) // *
#define LT_LBRC ALGR(LT_LRPN) // [
#define LT_RBRC ALGR(LT_RPRN) // ]
#define LT_QUOT ALGR(LT_QUES) // '
#define LT_PERC ALGR(LT_X) // %
// Row 2
#define LT_EURO ALGR(LT_E) // €
#define LT_LCBR ALGR(LT_IOGO) // {
#define LT_RCBR ALGR(LT_W) // }
// Row 3
#define LT_DQUO ALGR(LT_EDOT) // "
#define LT_PIPE ALGR(LT_Q) // |
// Row 4
#define LT_NDSH ALGR(LT_LABK) //
#define LT_DLQU ALGR(LT_CCAR) // „
#define LT_LDQU ALGR(LT_F) // “
#define LT_BSLS ALGR(LT_EOGO) // (backslash)

View file

@ -0,0 +1,166 @@
/* 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
/*
*
*  `  Ą  Č  Ę  Ė  Į  Š  Ų  Ū  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 LT_GRV KC_GRV // `
#define LT_AOGO KC_1 // Ą
#define LT_CCAR KC_2 // Č
#define LT_EOGO KC_3 // Ę
#define LT_EDOT KC_4 // Ė
#define LT_IOGO KC_5 // Į
#define LT_SCAR KC_6 // Š
#define LT_UOGO KC_7 // Ų
#define LT_UMAC KC_8 // Ū
#define LT_9 KC_9 // 9
#define LT_0 KC_0 // 0
#define LT_MINS KC_MINS // -
#define LT_ZCAR KC_EQL // Ž
// Row 2
#define LT_Q KC_Q // Q
#define LT_W KC_W // W
#define LT_E KC_E // E
#define LT_R KC_R // R
#define LT_T KC_T // T
#define LT_Y KC_Y // Y
#define LT_U KC_U // U
#define LT_I KC_I // I
#define LT_O KC_O // O
#define LT_P KC_P // P
#define LT_LBRC KC_LBRC // [
#define LT_RBRC KC_RBRC // ]
// Row 3
#define LT_A KC_A // A
#define LT_S KC_S // S
#define LT_D KC_D // D
#define LT_F KC_F // F
#define LT_G KC_G // G
#define LT_H KC_H // H
#define LT_J KC_J // J
#define LT_K KC_K // K
#define LT_L KC_L // L
#define LT_SCLN KC_SCLN // ;
#define LT_QUOT KC_QUOT // '
#define LT_BSLS KC_NUHS // (backslash)
// Row 4
#define LT_Z KC_Z // Z
#define LT_X KC_X // X
#define LT_C KC_C // C
#define LT_V KC_V // V
#define LT_B KC_B // B
#define LT_N KC_N // N
#define LT_M KC_M // M
#define LT_COMM KC_COMM // ,
#define LT_DOT KC_DOT // .
#define LT_SLSH KC_SLSH // /
/* Shifted symbols
*
*  ~                          (  )  _           
*
*                                     {  }      
*     
*                                   :  " │ | │    │
*
*                               <  >  ?           
*
*                                                     
*
*/
// Row 1
#define LT_TILD S(LT_GRV) // ~
#define LT_LPRN S(LT_9) // (
#define LT_RPRN S(LT_0) // )
#define LT_UNDS S(LT_MINS) // *
// Row 2
#define LT_LCBR S(LT_LBRC) // {
#define LT_RCBR S(LT_RBRC) // }
// Row 3
#define LT_COLN S(LT_SCLN) // ;
#define LT_DQUO S(LT_QUOT) // "
#define LT_PIPE S(LT_BSLS) // |
// Row 4
#define LT_LABK S(LT_COMM) // <
#define LT_RABK S(LT_DOT) // >
#define LT_QUES S(LT_SLSH) // ?
/* AltGr symbols
*
*     1  2  3  4  5  6  7  8           =        
*
*                                              
*     
*                                               
*
*                                                 
*
*                                                     
*
*/
// Row 1
#define LT_1 ALGR(LT_AOGO) // 1
#define LT_2 ALGR(LT_CCAR) // 2
#define LT_3 ALGR(LT_EOGO) // 3
#define LT_4 ALGR(LT_EDOT) // 4
#define LT_5 ALGR(LT_IOGO) // 5
#define LT_6 ALGR(LT_SCAR) // 6
#define LT_7 ALGR(LT_UOGO) // 7
#define LT_8 ALGR(LT_UMAC) // 8
#define LT_EQL ALGR(LT_PLUS) // =
// Row 2
#define LT_EURO ALGR(LT_E) // €
/* Shift+AltGr symbols
*
*     !  @  #  $  %  ^  &  *           +        
*
*                                               
*     
*                                               
*
*                                                 
*
*                                                     
*
*/
// Row 1
#define LT_EXLM S(ALGR(LT_AOGO)) // !
#define LT_AT S(ALGR(LT_CCAR)) // @
#define LT_HASH S(ALGR(LT_EOGO)) // #
#define LT_DLR S(ALGR(LT_EDOT)) // $
#define LT_PERC S(ALGR(LT_IOGO)) // %
#define LT_CIRC S(ALGR(LT_SCAR)) // ^
#define LT_AMPR S(ALGR(LT_UOGO)) // &
#define LT_ASTR S(ALGR(LT_UMAC)) // *
#define LT_PLUS S(ALGR(LT_PLUS)) // +

View file

@ -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 Lithuanian ĄŽERTY layouts
#pragma once
#include "keymap_lithuanian_azerty.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, 0, 0, 0, 0, 0, 0, 0),
KCLUT_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MEM = {
// 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, LT_EXLM, LT_EDOT, LT_SLSH, LT_SCLN, LT_X, LT_DOT, LT_QUES,
// ( ) * + , - . /
LT_LRPN, LT_RPRN, LT_EQL, LT_QUES, LT_COMM, LT_MINS, LT_DOT, LT_SLSH,
// 0 1 2 3 4 5 6 7
LT_RPRN, LT_EXLM, LT_MINS, LT_SLSH, LT_SLCN, LT_COLN, LT_COMM, LT_DOT,
// 8 9 : ; < = > ?
LT_EQL, LT_LPRN, LT_COLN, LT_SCLN, LT_LABK, LT_EQL, LT_LABK, LT_QUES,
// @ A B C D E F G
LT_EXLM, LT_A, LT_B, LT_C, LT_D, LT_E, LT_F, LT_G,
// H I J K L M N O
LT_H, LT_I, LT_J, LT_K, LT_L, LT_M, LT_N, LT_O,
// P Q R S T U V W
LT_P, LT_Q, LT_R, LT_S, LT_T, LT_U, LT_V, LT_W,
// X Y Z [ \ ] ^ _
LT_X, LT_Y, LT_Z, LT_LPRN, LT_EOGO, LT_RPRN, LT_COMM, LT_MINS,
// ` a b c d e f g
LT_GRV, LT_A, LT_B, LT_C, LT_D, LT_E, LT_F, LT_G,
// h i j k l m n o
LT_H, LT_I, LT_J, LT_K, LT_L, LT_M, LT_N, LT_O,
// p q r s t u v w
LT_P, LT_Q, LT_R, LT_S, LT_T, LT_U, LT_V, LT_W,
// x y z { | } ~ DEL
LT_X, LT_Y, LT_Z, LT_IOGO, LT_Q, LT_W, LT_GRV, KC_DEL
};

View file

@ -0,0 +1,80 @@
/* 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 Lithuanian QWERTY layouts
#pragma once
#include "keymap_lithuanian_qwerty.h"
#include "quantum.h"
// clang-format off
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, 1, 0, 1, 1, 1, 1, 0),
KCLUT_ENTRY(0, 0, 1, 1, 0, 0, 0, 0),
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
KCLUT_ENTRY(1, 0, 0, 0, 0, 1, 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, 0, 0, 0, 1, 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)
};
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, LT_1, LT_QUOT, LT_3, LT_4, LT_5, LT_7, LT_QUOT,
// ( ) * + , - . /
LT_9, LT_0, LT_8, LT_ZCAR, LT_COMM, LT_MINS, LT_DOT, LT_SLSH,
// 0 1 2 3 4 5 6 7
LT_0, LT_AOGO, LT_CCAR, LT_EOGO, LT_EDOT, LT_IOGO, LT_SCAR, LT_UOGO,
// 8 9 : ; < = > ?
LT_UMAC, LT_9, LT_SCLN, LT_SCLN, LT_COMM, LT_PLUS, LT_DOT, LT_SLSH,
// @ A B C D E F G
LT_CCAR, LT_A, LT_B, LT_C, LT_D, LT_E, LT_F, LT_G,
// H I J K L M N O
LT_H, LT_I, LT_J, LT_K, LT_L, LT_M, LT_N, LT_O,
// P Q R S T U V W
LT_P, LT_Q, LT_R, LT_S, LT_T, LT_U, LT_V, LT_W,
// X Y Z [ \ ] ^ _
LT_X, LT_Y, LT_Z, LT_LBRC, LT_BSLS, LT_RBRC, LT_SCAR, LT_MINS,
// ` a b c d e f g
LT_GRV, LT_A, LT_B, LT_C, LT_D, LT_E, LT_F, LT_G,
// h i j k l m n o
LT_H, LT_I, LT_J, LT_K, LT_L, LT_M, LT_N, LT_O,
// p q r s t u v w
LT_P, LT_Q, LT_R, LT_S, LT_T, LT_U, LT_V, LT_W,
// x y z { | } ~ DEL
LT_X, LT_Y, LT_Z, LT_LBRC, LT_BSLS, LT_RBRC, LT_GRV, KC_DEL
};