1
0
Fork 0

Update Spanish keymap and sendstring LUT (#8364)

This commit is contained in:
Ryan 2020-03-13 11:00:28 +11:00 committed by GitHub
parent 799acb2802
commit 6734a39811
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 154 additions and 65 deletions

View file

@ -13,61 +13,150 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef KEYMAP_SPANISH_H
#define KEYMAP_SPANISH_H #pragma once
#include "keymap.h" #include "keymap.h"
// Normal characters // clang-format off
#define ES_OVRR KC_GRV
#define ES_APOS KC_MINS
#define ES_IEXL KC_EQL
#define ES_GRV KC_LBRC /*
#define ES_PLUS KC_RBRC *
*  º  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 ES_MORD KC_GRV // º
#define ES_1 KC_1 // 1
#define ES_2 KC_2 // 2
#define ES_3 KC_3 // 3
#define ES_4 KC_4 // 4
#define ES_5 KC_5 // 5
#define ES_6 KC_6 // 6
#define ES_7 KC_7 // 7
#define ES_8 KC_8 // 8
#define ES_9 KC_9 // 9
#define ES_0 KC_0 // 0
#define ES_QUOT KC_MINS // '
#define ES_IEXL KC_EQL // ¡
// Row 2
#define ES_Q KC_Q // Q
#define ES_W KC_W // W
#define ES_E KC_E // E
#define ES_R KC_R // R
#define ES_T KC_T // T
#define ES_Y KC_Y // Y
#define ES_U KC_U // U
#define ES_I KC_I // I
#define ES_O KC_O // O
#define ES_P KC_P // P
#define ES_GRV KC_LBRC // ` (dead)
#define ES_PLUS KC_RBRC // +
// Row 3
#define ES_A KC_A // A
#define ES_S KC_S // S
#define ES_D KC_D // D
#define ES_F KC_F // F
#define ES_G KC_G // G
#define ES_H KC_H // H
#define ES_J KC_J // J
#define ES_K KC_K // K
#define ES_L KC_L // L
#define ES_NTIL KC_SCLN // Ñ
#define ES_ACUT KC_QUOT // ´ (dead)
#define ES_CCED KC_NUHS // Ç
// Row 4
#define ES_LABK KC_NUBS // <
#define ES_Z KC_Z // Z
#define ES_X KC_X // X
#define ES_C KC_C // C
#define ES_V KC_V // V
#define ES_B KC_B // B
#define ES_N KC_N // N
#define ES_M KC_M // M
#define ES_COMM KC_COMM // ,
#define ES_DOT KC_DOT // .
#define ES_MINS KC_SLSH // -
#define ES_NTIL KC_SCLN /* Shifted symbols
#define ES_ACUT KC_QUOT *
#define ES_CCED KC_NUHS *  ª  !  " │ · │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¿ │       │
*
*                                     ^  *      
*     
*                                      ¨        
*
*      >                       ;  :  _           
*
*                                                     
*
*/
// Row 1
#define ES_FORD S(ES_MORD) // ª
#define ES_EXLM S(ES_1) // !
#define ES_DQUO S(ES_2) // "
#define ES_BULT S(ES_3) // ·
#define ES_DLR S(ES_4) // $
#define ES_PERC S(ES_5) // %
#define ES_AMPR S(ES_6) // &
#define ES_SLSH S(ES_7) // /
#define ES_LPRN S(ES_8) // (
#define ES_RPRN S(ES_9) // )
#define ES_EQL S(ES_0) // =
#define ES_QUES S(ES_QUOT) // ?
#define ES_IQUE S(ES_IEXL) // ¿
// Row 2
#define ES_CIRC S(ES_GRV) // ^ (dead)
#define ES_ASTR S(ES_PLUS) // *
// Row 3
#define ES_DIAE S(ES_GRV) // ¨ (dead)
// Row 4
#define ES_RABK S(ES_LABK) // >
#define ES_SCLN S(KC_COMM) // ;
#define ES_COLN S(KC_DOT) // :
#define ES_UNDS S(ES_MINS) // _
#define ES_LESS KC_NUBS /* AltGr symbols
#define ES_MINS KC_SLSH *
*  \  |  @  #  ~    ¬                          
*
*                                     [  ]      
*     
*                                      {  }     
*
*                                                
*
*                                                     
*
*/
// Row 1
#define ES_BSLS ALGR(ES_MORD) // (backslash)
#define ES_PIPE ALGR(ES_1) // |
#define ES_AT ALGR(ES_2) // @
#define ES_HASH ALGR(ES_3) // #
#define ES_TILD ALGR(ES_4) // ~
#define ES_EURO ALGR(ES_5) // €
#define ES_NOT ALGR(ES_6) // ¬
// Row 2
#define ES_LBRC ALGR(ES_GRV) // [
#define ES_RBRC ALGR(ES_PLUS) // ]
// Row 3
#define ES_LCBR ALGR(ES_ACUT) // {
#define ES_RCBR ALGR(ES_CCED) // }
// Shifted characters // DEPRECATED
#define ES_ASML LSFT(ES_OVRR) #define ES_OVRR ES_MORD
#define ES_QUOT LSFT(KC_2) #define ES_APOS ES_QUOT
#define ES_OVDT LSFT(KC_3) #define ES_LESS ES_LABK
#define ES_AMPR LSFT(KC_6) #define ES_ASML ES_FORD
#define ES_SLSH LSFT(KC_7) #define ES_OVDT ES_BULT
#define ES_LPRN LSFT(KC_8) #define ES_UMLT ES_DIAE
#define ES_RPRN LSFT(KC_9) #define ES_GRTR ES_RABK
#define ES_EQL LSFT(KC_0)
#define ES_QUES LSFT(ES_APOS)
#define ES_IQUE LSFT(ES_IEXL)
#define ES_CIRC LSFT(ES_GRV)
#define ES_ASTR LSFT(ES_PLUS)
#define ES_UMLT LSFT(ES_GRV)
#define ES_GRTR LSFT(ES_LESS)
#define ES_SCLN LSFT(KC_COMM)
#define ES_COLN LSFT(KC_DOT)
#define ES_UNDS LSFT(ES_MINS)
// Alt Gr-ed characters
#define ES_BSLS ALGR(ES_OVRR)
#define ES_PIPE ALGR(KC_1)
#define ES_AT ALGR(KC_2)
#define ES_HASH ALGR(KC_3)
#define ES_TILD ALGR(ES_NTIL)
#define ES_EURO ALGR(KC_5)
#define ES_NOT ALGR(KC_6)
#define ES_LBRC ALGR(ES_GRV)
#define ES_RBRC ALGR(ES_PLUS)
#define ES_LCBR ALGR(ES_ACUT)
#define ES_RCBR ALGR(ES_CCED)
#endif

View file

@ -40,7 +40,7 @@ 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_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 = { const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
@ -60,7 +60,7 @@ 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, 1, 1, 1, 1, 0), KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
}; };
const uint8_t ascii_to_keycode_lut[128] PROGMEM = { const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
@ -74,27 +74,27 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// ! " # $ % & ' // ! " # $ % & '
KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, ES_APOS, KC_SPC, ES_1, ES_2, ES_3, ES_4, ES_5, ES_6, ES_QUOT,
// ( ) * + , - . / // ( ) * + , - . /
KC_8, KC_9, ES_PLUS, ES_PLUS, KC_COMM, ES_MINS, KC_DOT, KC_7, ES_8, ES_9, ES_PLUS, ES_PLUS, ES_COMM, ES_MINS, ES_DOT, ES_7,
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, ES_0, ES_1, ES_2, ES_3, ES_4, ES_5, ES_6, ES_7,
// 8 9 : ; < = > ? // 8 9 : ; < = > ?
KC_8, KC_9, KC_DOT, KC_COMM, ES_LESS, KC_0, ES_LESS, ES_APOS, ES_8, ES_9, ES_DOT, ES_COMM, ES_LABK, ES_0, ES_LABK, ES_QUOT,
// @ A B C D E F G // @ A B C D E F G
KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, ES_2, ES_A, ES_B, ES_C, ES_D, ES_E, ES_F, ES_G,
// H I J K L M N O // H I J K L M N O
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, ES_H, ES_I, ES_J, ES_K, ES_L, ES_M, ES_N, ES_O,
// P Q R S T U V W // P Q R S T U V W
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, ES_P, ES_Q, ES_R, ES_S, ES_T, ES_U, ES_V, ES_W,
// X Y Z [ \ ] ^ _ // X Y Z [ \ ] ^ _
KC_X, KC_Y, KC_Z, ES_GRV, ES_OVRR, ES_PLUS, ES_GRV, ES_MINS, ES_X, ES_Y, ES_Z, ES_GRV, ES_MORD, ES_PLUS, ES_GRV, ES_MINS,
// ` a b c d e f g // ` a b c d e f g
ES_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, ES_GRV, ES_A, ES_B, ES_C, ES_D, ES_E, ES_F, ES_G,
// h i j k l m n o // h i j k l m n o
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, ES_H, ES_I, ES_J, ES_K, ES_L, ES_M, ES_N, ES_O,
// p q r s t u v w // p q r s t u v w
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, ES_P, ES_Q, ES_R, ES_S, ES_T, ES_U, ES_V, ES_W,
// x y z { | } ~ DEL // x y z { | } ~ DEL
KC_X, KC_Y, KC_Z, ES_ACUT, KC_1, ES_CCED, ES_NTIL, KC_DEL ES_X, ES_Y, ES_Z, ES_ACUT, ES_1, ES_CCED, ES_NTIL, KC_DEL
}; };