1
0
Fork 0

Add Turkish keymap aliases and sendstring LUT (#7676)

* Add Turkish keymap aliases and sendstring LUT

* Split into F and Q layouts
This commit is contained in:
Ryan 2020-02-21 18:21:38 +11:00 committed by GitHub
parent 66d7fc34b2
commit 562482c234
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 551 additions and 0 deletions

View file

@ -0,0 +1,197 @@
/* 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/>.
*/
#pragma once
#include "keymap.h"
// clang-format off
/*
*
*  +  1  2  3  4  5  6  7  8  9  0  /  -        
*
*       F  G  Ğ  I  O  D  R  N  H  P  Q  W      
*     
*        U  İ  E  A  Ü  T  K  M  L  Y  Ş  X     
*
*      <  J  Ö  V  C  Ç  Z  S  B  .  ,           
*
*                                                     
*
*/
// Row 1
#define TR_PLUS KC_GRV // +
#define TR_1 KC_1 // 1
#define TR_2 KC_2 // 2
#define TR_3 KC_3 // 3
#define TR_4 KC_4 // 4
#define TR_5 KC_5 // 5
#define TR_6 KC_6 // 6
#define TR_7 KC_7 // 7
#define TR_8 KC_8 // 8
#define TR_9 KC_9 // 9
#define TR_0 KC_0 // 0
#define TR_SLSH KC_MINS // /
#define TR_MINS KC_EQL // -
// Row 2
#define TR_F KC_Q // F
#define TR_G KC_W // G
#define TR_GBRV KC_E // Ğ
#define TR_I KC_R // I
#define TR_O KC_T // O
#define TR_D KC_Y // D
#define TR_R KC_U // R
#define TR_N KC_I // N
#define TR_H KC_O // H
#define TR_P KC_P // P
#define TR_Q KC_LBRC // Q
#define TR_W KC_RBRC // W
// Row 3
#define TR_U KC_A // U
#define TR_IDOT KC_S // İ
#define TR_E KC_D // E
#define TR_A KC_F // A
#define TR_UDIA KC_G // Ü
#define TR_T KC_H // T
#define TR_K KC_J // K
#define TR_M KC_K // M
#define TR_L KC_L // L
#define TR_Y KC_SCLN // Y
#define TR_SCED KC_QUOT // Ş
#define TR_X KC_NUHS // X
// Row 4
#define TR_LABK KC_NUBS // <
#define TR_J KC_Z // J
#define TR_ODIA KC_X // Ö
#define TR_V KC_C // V
#define TR_C KC_V // C
#define TR_CCED KC_B // Ç
#define TR_Z KC_N // Z
#define TR_S KC_M // S
#define TR_B KC_COMM // B
#define TR_DOT KC_DOT // .
#define TR_COMM KC_SLSH // ,
/* Shifted symbols
*
*  *  !  " │ ^ │ $ │ % │ & │ ' │ ( │ ) │ = │ ?  _        
*
*                                               
*     
*                                               
*
*      >                          :  ;           
*
*                                                     
*
*/
// Row 1
#define TR_ASTR S(TR_PLUS) // *
#define TR_EXLM S(TR_1) // !
#define TR_DQUO S(TR_2) // "
#define TR_CIRC S(TR_3) // ^ (dead)
#define TR_DLR S(TR_4) // $
#define TR_PERC S(TR_5) // %
#define TR_AMPR S(TR_6) // &
#define TR_QUOT S(TR_7) // '
#define TR_LPRN S(TR_8) // (
#define TR_RPRN S(TR_9) // )
#define TR_EQL S(TR_0) // =
#define TR_QUES S(TR_ASTR) // ?
#define TR_UNDS S(TR_MINS) // _
// Row 4
#define TR_RABK S(TR_LABK) // >
#define TR_COLN S(TR_DOT) // :
#define TR_SCLN S(TR_COMM) // ;
/* AltGr symbols
*
*  ¬  ¹  ²  #  ¼  ½  ¾  {  [  ]  }  \  |        
*
*       @             ¥        Ø  £  ¨  ~      
*     
*        Æ  ß                     ´     `     
*
*         «  »  ¢           µ  ×  ÷  -           
*
*                                                     
*
*/
// Row 1
#define TR_NOT ALGR(TR_PLUS) // ¬
#define TR_SUP1 ALGR(TR_1) // ¹
#define TR_SUP2 ALGR(TR_2) // ²
#define TR_HASH ALGR(TR_3) // #
#define TR_QRTR ALGR(TR_4) // ¼
#define TR_HALF ALGR(TR_5) // ½
#define TR_TQTR ALGR(TR_6) // ¾
#define TR_LCBR ALGR(TR_7) // {
#define TR_LBRC ALGR(TR_8) // [
#define TR_RBRC ALGR(TR_9) // ]
#define TR_RCBR ALGR(TR_0) // }
#define TR_BSLS ALGR(TR_SLSH) // (backslash)
#define TR_PIPE ALGR(TR_MINS) // |
// Row 2
#define TR_AT ALGR(TR_F) // @
#define TR_PILC ALGR(TR_I) // ¶
#define TR_YEN ALGR(TR_D) // ¥
#define TR_OSTR ALGR(TR_H) // Ø
#define TR_PND ALGR(TR_P) // £
#define TR_DIAE ALGR(TR_Q) // ¨ (dead)
#define TR_TILD ALGR(TR_W) // ~ (dead)
// Row 3
#define TR_AE ALGR(TR_U) // Æ
#define TR_SS ALGR(TR_IDOT) // ß
#define TR_EURO ALGR(TR_E) // €
#define TR_LIRA ALGR(TR_T) // ₺
#define TR_ACUT ALGR(TR_Y) // ´ (dead)
#define TR_GRV ALGR(TR_X) // ` (dead)
// Row 4
#define TR_LDAQ ALGR(TR_J) // «
#define TR_RDAQ ALGR(TR_ODIA) // »
#define TR_CENT ALGR(TR_V) // ¢
#define TR_MICR ALGR(TR_S) // µ
#define TR_MUL ALGR(TR_B) // ×
#define TR_DIV ALGR(TR_DOT) // ÷
#define TR_SHYP ALGR(TR_COMM) // (soft hyphen)
/* Shift+AltGr symbols
*
*           ³  ¤                    ¿           
*
*                ®                              
*     
*           §     ª                             
*
*      ¦        ©           º                    
*
*                                                     
*
*/
// Row 1
#define TR_SUP3 S(ALGR(TR_3)) // ³
#define TR_CURR S(ALGR(TR_4)) // ¤
#define TR_IQUE S(ALGR(TR_SLSH)) // ¿
// Row 2
#define TR_REGD S(ALGR(TR_I) // ®
// Row 3
#define TR_SECT S(ALGR(TR_IDOT)) // §
#define TR_FORD S(ALGR(TR_A)) // ª
// Row 4
#define TR_BRKP S(ALGR(TR_LABK)) // ¦
#define TR_COPY S(ALGR(TR_V)) // ©
#define TR_MORD S(ALGR(TR_S)) // º

View file

@ -0,0 +1,156 @@
/* 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/>.
*/
#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 TR_DQUO KC_GRV // "
#define TR_1 KC_1 // 1
#define TR_2 KC_2 // 2
#define TR_3 KC_3 // 3
#define TR_4 KC_4 // 4
#define TR_5 KC_5 // 5
#define TR_6 KC_6 // 6
#define TR_7 KC_7 // 7
#define TR_8 KC_8 // 8
#define TR_9 KC_9 // 9
#define TR_0 KC_0 // 0
#define TR_ASTR KC_MINS // *
#define TR_MINS KC_EQL // -
// Row 2
#define TR_Q KC_Q // Q
#define TR_W KC_W // W
#define TR_E KC_E // E
#define TR_R KC_R // R
#define TR_T KC_T // T
#define TR_Y KC_Y // Y
#define TR_U KC_U // U
#define TR_I KC_I // I
#define TR_O KC_O // O
#define TR_P KC_P // P
#define TR_GBRV KC_LBRC // Ğ
#define TR_UDIA KC_RBRC // Ü
// Row 3
#define TR_A KC_A // A
#define TR_S KC_S // S
#define TR_D KC_D // D
#define TR_F KC_F // F
#define TR_G KC_G // G
#define TR_H KC_H // H
#define TR_J KC_J // J
#define TR_K KC_K // K
#define TR_L KC_L // L
#define TR_SCED KC_SCLN // Ş
#define TR_IDOT KC_QUOT // İ
#define TR_COMM KC_NUHS // ,
// Row 4
#define TR_LABK KC_NUBS // <
#define TR_Z KC_Z // Z
#define TR_X KC_X // X
#define TR_C KC_C // C
#define TR_V KC_V // V
#define TR_B KC_B // B
#define TR_N KC_N // N
#define TR_M KC_M // M
#define TR_ODIA KC_COMM // Ö
#define TR_CCED KC_DOT // Ç
#define TR_DOT KC_SLSH // .
/* Shifted symbols
*
*  é  !  '  ^  +  %  &  /  (  )  =  ?  _        
*
*                                               
*     
*                                         ;     
*
*      >                             :           
*
*                                                     
*
*/
// Row 1
#define TR_EACU S(TR_DQUO) // é
#define TR_EXLM S(TR_1) // !
#define TR_QUOT S(TR_2) // '
#define TR_CIRC S(TR_3) // ^ (dead)
#define TR_PLUS S(TR_4) // +
#define TR_PERC S(TR_5) // %
#define TR_AMPR S(TR_6) // &
#define TR_SLSH S(TR_7) // /
#define TR_LPRN S(TR_8) // (
#define TR_RPRN S(TR_9) // )
#define TR_EQL S(TR_0) // =
#define TR_QUES S(TR_ASTR) // ?
#define TR_UNDS S(TR_MINS) // _
// Row 3
#define TR_SCLN S(TR_COMM) // ;
// Row 4
#define TR_RABK S(TR_LABK) // >
#define TR_COLN S(TR_DOT) // :
/* AltGr symbols
*
*        £  #  $  ½     {  [  ]  }  \  |        
*
*       @                           ¨  ~      
*     
*        Æ  ß                       ´     `     
*
*                                                
*
*                                                     
*
*/
// Row 1
#define TR_PND ALGR(TR_2) // £
#define TR_HASH ALGR(TR_3) // #
#define TR_DLR ALGR(TR_4) // $
#define TR_HALF ALGR(TR_5) // ½
#define TR_LCBR ALGR(TR_7) // {
#define TR_LBRC ALGR(TR_8) // [
#define TR_RBRC ALGR(TR_9) // ]
#define TR_RCBR ALGR(TR_0) // }
#define TR_BSLS ALGR(TR_ASTR) // (backslash)
#define TR_PIPE ALGR(TR_MINS) // |
// Row 2
#define TR_AT ALGR(TR_Q) // @
#define TR_EURO ALGR(TR_E) // €
#define TR_LIRA ALGR(TR_T) // ₺
#define TR_DIAE ALGR(TR_GBRV) // ¨ (dead)
#define TR_TILD ALGR(TR_UDIA) // ~ (dead)
// Row 3
#define TR_AE ALGR(TR_A) // Æ
#define TR_SS ALGR(TR_S) // ß
#define TR_ACUT ALGR(TR_SCED) // ´ (dead)
#define TR_GRV ALGR(TR_COMM) // ` (dead)

View file

@ -0,0 +1,99 @@
/* 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 Turkish F layouts
#pragma once
#include "keymap_turkish_f.h"
// clang-format off
const bool ascii_to_shift_lut[128] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 0, 1, 1, 1, 1,
1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 0, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 0, 0, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
const bool ascii_to_altgr_lut[128] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
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, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7,
// ( ) * + , - . /
TR_8, TR_9, TR_PLUS, TR_PLUS, TR_COMM, TR_MINS, TR_DOT, TR_SLSH,
// 0 1 2 3 4 5 6 7
TR_0, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7,
// 8 9 : ; < = > ?
TR_8, TR_9, TR_DOT, TR_COMM, TR_LABK, TR_0, TR_LABK, TR_SLSH,
// @ A B C D E F G
TR_F, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
// H I J K L M N O
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
// P Q R S T U V W
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
// X Y Z [ \ ] ^ _
TR_X, TR_Y, TR_Z, TR_8, TR_SLSH, TR_9, TR_3, TR_MINS,
// ` a b c d e f g
TR_X, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
// h i j k l m n o
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
// p q r s t u v w
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
// x y z { | } ~ DEL
TR_X, TR_Y, TR_Z, TR_7, TR_MINS, TR_0, TR_W, KC_DEL
};

View file

@ -0,0 +1,99 @@
/* 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 Turkish Q layouts
#pragma once
#include "keymap_turkish_q.h"
// clang-format off
const bool ascii_to_shift_lut[128] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 1, 1, 1,
1, 1, 0, 1, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 0, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 0, 0, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
const bool ascii_to_altgr_lut[128] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
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, TR_1, TR_DQUO, TR_3, TR_4, TR_5, TR_6, TR_2,
// ( ) * + , - . /
TR_8, TR_9, TR_ASTR, TR_4, TR_COMM, TR_MINS, TR_DOT, TR_7,
// 0 1 2 3 4 5 6 7
TR_0, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7,
// 8 9 : ; < = > ?
TR_8, TR_9, TR_DOT, TR_COMM, TR_LABK, TR_0, TR_LABK, TR_ASTR,
// @ A B C D E F G
TR_Q, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
// H I J K L M N O
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
// P Q R S T U V W
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
// X Y Z [ \ ] ^ _
TR_X, TR_Y, TR_Z, TR_8, TR_ASTR, TR_9, TR_3, TR_MINS,
// ` a b c d e f g
TR_COMM, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
// h i j k l m n o
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
// p q r s t u v w
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
// x y z { | } ~ DEL
TR_X, TR_Y, TR_Z, TR_7, TR_MINS, TR_0, TR_UDIA, KC_DEL
};