Se cambia el layout a un español latino.

This commit is contained in:
Alejandro Lembke Barrientos 2022-09-29 22:03:05 -06:00
parent 5c071be328
commit 3cbe010320
4 changed files with 199 additions and 258 deletions

View File

@ -17,25 +17,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "version.h"
#include <keymap_spanish_latin.h>
#include <stdbool.h>
#include <keymap_us_international.h>
enum {
TD_CTN,
TD_ENTER,
TD_SHIFT,
TD_ALT,
TD_TAB,
TD_COMM,
TD_DOT,
TD_EQL,
TD_L,
TD_NTIL,
TD_BRC,
TD_SBRC,
TD_PAR,
TD_GRV,
TD_BSLS
TD_ABK,
TD_MINS,
TD_SPC,
TD_EXL,
TD_QUES,
TD_PERC
};
bool isWindows = false; // Change to make default config Windows
@ -83,51 +87,48 @@ void dance_ctn_reset (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_grv_finished (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("`");
} else {
SEND_STRING("~");
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
// tap twice for change
[TD_CTN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_ctn_finished, dance_ctn_reset),
[TD_BRC] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_LBRC), LSFT(KC_RBRC)),
[TD_SBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
[TD_PAR] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_9), LSFT(KC_0)),
[TD_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_ENT, KC_MINS),
[TD_BRC] = ACTION_TAP_DANCE_DOUBLE(ES_LCBR, ES_RCBR),
[TD_SBRC] = ACTION_TAP_DANCE_DOUBLE(ES_LBRC, ES_RBRC),
[TD_PAR] = ACTION_TAP_DANCE_DOUBLE(ES_LPRN, ES_RPRN),
[TD_SHIFT] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
[TD_ALT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_LALT),
[TD_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, KC_ESC),
[TD_COMM] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_SCLN),
[TD_DOT] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, LSFT(KC_SCLN)),
[TD_EQL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, LSFT(KC_MINS)),
[TD_GRV] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_grv_finished, NULL),
[TD_BSLS] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_BSLS), KC_BSLS)
[TD_COMM] = ACTION_TAP_DANCE_DOUBLE(ES_COMM, ES_SCLN),
[TD_DOT] = ACTION_TAP_DANCE_DOUBLE(ES_DOT, ES_SCLN),
[TD_L] = ACTION_TAP_DANCE_DOUBLE(ES_L, ES_EQL),
[TD_NTIL] = ACTION_TAP_DANCE_DOUBLE(ES_NTIL, ES_SLSH),
[TD_GRV] = ACTION_TAP_DANCE_DOUBLE(ES_GRV, ES_TILD),
[TD_ABK] = ACTION_TAP_DANCE_DOUBLE(ES_LABK, ES_RABK),
[TD_MINS] = ACTION_TAP_DANCE_DOUBLE(ES_MINS, ES_UNDS),
[TD_SPC] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, ES_ACUT),
[TD_EXL] = ACTION_TAP_DANCE_DOUBLE(ES_EXLM, ES_IEXL),
[TD_QUES] = ACTION_TAP_DANCE_DOUBLE(ES_QUES, ES_IQUES),
[TD_PERC] = ACTION_TAP_DANCE_DOUBLE(ES_PERC, ES_CIRC),
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-------------------------------------------------------.
TD(TD_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
TD(TD_TAB), ES_Q, ES_W, ES_E, ES_R, ES_T, ES_Y, ES_U, ES_I, ES_O, ES_P, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+----------|
TD(TD_ALT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(TD_EQL), TD(TD_ENTER),
TD(TD_ALT), ES_A, ES_S, ES_D, ES_F, ES_G, ES_H, ES_J, ES_K, TD(TD_L), TD(TD_NTIL), KC_ENT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+----------|
TD(TD_CTN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(TD_COMM), TD(TD_DOT), KC_SLSH, TD(TD_SHIFT),
TD(TD_CTN), ES_Z, ES_X, ES_C, ES_V, ES_B, ES_N, ES_M, TD(TD_COMM), TD(TD_DOT), TD(TD_MINS), TD(TD_SHIFT),
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------|
TT(4), TT(2), KC_SPC, KC_SPC, TT(1), TT(3)
TT(4), TT(2), TD(TD_SPC), TD(TD_SPC), TT(1), TT(3)
//`--------------------------' `--------------------------'
),
[1] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
TD(TD_TAB), LSFT(KC_5), LSFT(KC_3), LSFT(KC_7), LSFT(KC_1), LSFT(KC_SLSH), KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_UP, KC_PPLS,
TD(TD_TAB), TD(TD_PERC), ES_AMPR, ES_PIPE, TD(TD_QUES), TD(TD_EXL), KC_KP_7, KC_KP_8, KC_KP_9, ES_MINS, KC_UP, ES_PLUS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
TD(TD_ALT), LSFT(KC_4), TD(TD_BSLS), TD(TD_BRC), TD(TD_PAR), TD(TD_SBRC), KC_KP_4, KC_KP_5, KC_KP_6, KC_LEFT, KC_DOWN, KC_RIGHT,
TD(TD_ALT), ES_DLR, TD(TD_ABK), TD(TD_BRC), TD(TD_PAR), TD(TD_SBRC), KC_KP_4, KC_KP_5, KC_KP_6, KC_LEFT, KC_DOWN, KC_RIGHT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
TD(TD_CTN), LSFT(KC_6), LSFT(KC_2), KC_QUOT, LSFT(KC_QUOT), TD(TD_GRV), KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, KC_PAST, TD(TD_SHIFT),
TD(TD_CTN), ES_HASH, ES_AT, ES_QUOT, ES_DQUO, TD(TD_GRV), KC_KP_1, KC_KP_2, KC_KP_3, ES_SLSH, ES_ASTR, TD(TD_SHIFT),
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, KC_TAB, KC_SPC, KC_SPC, TT(1), KC_KP_0
//`--------------------------' `--------------------------'
@ -147,11 +148,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[3] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
TD(TD_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_UP, KC_PPLS,
TD(TD_TAB), ES_Q, ES_W, ES_E, ES_R, ES_T, KC_KP_7, KC_KP_8, KC_KP_9, ES_MINS, KC_UP, ES_PLUS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
TD(TD_ALT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_KP_4, KC_KP_5, KC_KP_6, KC_LEFT, KC_DOWN, KC_RIGHT,
TD(TD_ALT), ES_A, ES_S, ES_D, ES_F, ES_G, KC_KP_4, KC_KP_5, KC_KP_6, KC_LEFT, KC_DOWN, KC_RIGHT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
TD(TD_CTN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, KC_PAST, TD(TD_SHIFT),
TD(TD_CTN), ES_Z, ES_X, ES_C, ES_V, ES_B, KC_KP_1, KC_KP_2, KC_KP_3, ES_SLSH, ES_ASTR, TD(TD_SHIFT),
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
TD(TD_CTN), TD(TD_SHIFT),KC_SPC, KC_SPC, TT(3), KC_KP_0
//`--------------------------' `--------------------------'

164
keymap_spanish_latin.h Normal file
View File

@ -0,0 +1,164 @@
/* Copyright 2015-2016 Alejandro Lembke Barrientos
*
* 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 ES_PIPE 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_IQUES 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_ACUT KC_LBRC // ´
#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_LCBR KC_QUOT // {
#define ES_RCBR KC_NUHS // }
// Row 4
#define ES_LABK KC_NUBS // < (not working, use send string instead)
#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 // -
/* Shifted symbols
*
* ° ! " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¡ │ │
*
* ¨ *
*
* [ ]
*
* > ; : _
*
*
*
*/
// Row 1
#define ES_GRAD S(ES_PIPE) // °
#define ES_EXLM S(ES_1) // !
#define ES_DQUO S(ES_2) // "
#define ES_HASH 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_IEXL S(ES_IQUES) // ¡
// Row 2
#define ES_DIAE S(ES_ACUT) // ¨
#define ES_ASTR S(ES_PLUS) // *
// Row 3
#define ES_LBRC S(ES_LCBR) // [
#define ES_RBRC S(ES_RCBR) // ]
// 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) // _
/* AltGr symbols
*
* ¬ ¡ £ ¢ § ª º \
*
* @ « ~
*
* ^ `
*
*
*
*
*
*/
// Row 1
#define ES_NOT ALGR(ES_PIPE) // ¬
#define ES_IEXL_2 ALGR(ES_1) // ¡
#define ES_DQUO_2 ALGR(ES_2) // “
#define ES_SYM_1 ALGR(ES_3) // £
#define ES_CENT ALGR(ES_4) // ¢
#define ES_INF ALGR(ES_5) // ∞
#define ES_SYM_3 ALGR(ES_6) // §
#define ES_SYM_4 ALGR(ES_7) // ¶
#define ES_BULT ALGR(ES_8) // •
#define ES_FORD ALGR(ES_9) // ª
#define ES_MORD ALGR(ES_0) // º
#define ES_BSLS ALGR(ES_QUOT) // (backslash)
#define ES_NOEQ ALGR(ES_IQUES) // ≠
// Row 2
#define ES_AT ALGR(ES_Q) // @
#define ES_SYM_5 ALGR(ES_ACUT) // «
#define ES_TILD ALGR(ES_PLUS) // ~
// Row 3
#define ES_CIRC ALGR(ES_LCBR) // ^
#define ES_GRV ALGR(ES_RCBR) // `
// Row 4
#define ES_MIEQ ALGR(ES_LABK) // ≤
#define ES_TRIDO ALGR(KC_DOT) // …

View File

@ -1,224 +0,0 @@
/* 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 US_DGRV KC_GRV // ` (dead)
#define US_1 KC_1 // 1
#define US_2 KC_2 // 2
#define US_3 KC_3 // 3
#define US_4 KC_4 // 4
#define US_5 KC_5 // 5
#define US_6 KC_6 // 6
#define US_7 KC_7 // 7
#define US_8 KC_8 // 8
#define US_9 KC_9 // 9
#define US_0 KC_0 // 0
#define US_MINS KC_MINS // -
#define US_EQL KC_EQL // =
// Row 2
#define US_Q KC_Q // Q
#define US_W KC_W // W
#define US_E KC_E // E
#define US_R KC_R // R
#define US_T KC_T // T
#define US_Y KC_Y // Y
#define US_U KC_U // U
#define US_I KC_I // I
#define US_O KC_O // O
#define US_P KC_P // P
#define US_LBRC KC_LBRC // [
#define US_RBRC KC_RBRC // ]
#define US_BSLS KC_BSLS // (backslash)
// Row 3
#define US_A KC_A // A
#define US_S KC_S // S
#define US_D KC_D // D
#define US_F KC_F // F
#define US_G KC_G // G
#define US_H KC_H // H
#define US_J KC_J // J
#define US_K KC_K // K
#define US_L KC_L // L
#define US_SCLN KC_SCLN // ;
#define US_ACUT KC_QUOT // ´ (dead)
// Row 4
#define US_Z KC_Z // Z
#define US_X KC_X // X
#define US_C KC_C // C
#define US_V KC_V // V
#define US_B KC_B // B
#define US_N KC_N // N
#define US_M KC_M // M
#define US_COMM KC_COMM // ,
#define US_DOT KC_DOT // .
#define US_SLSH KC_SLSH // /
/* Shifted symbols
*
* ~ ! @ # $ % ^ & * ( ) _ +
*
* { } |
*
* : ¨
*
* < > ?
*
*
*
*/
// Row 1
#define US_DTIL S(US_DGRV) // ~ (dead)
#define US_EXLM S(US_1) // !
#define US_AT S(US_2) // @
#define US_HASH S(US_3) // #
#define US_DLR S(US_4) // $
#define US_PERC S(US_5) // %
#define US_DCIR S(US_6) // ^ (dead)
#define US_AMPR S(US_7) // &
#define US_ASTR S(US_8) // *
#define US_LPRN S(US_9) // (
#define US_RPRN S(US_0) // )
#define US_UNDS S(US_MINS) // _
#define US_PLUS S(US_EQL) // +
// Row 2
#define US_LCBR S(US_LBRC) // {
#define US_RCBR S(US_RBRC) // }
#define US_PIPE S(US_BSLS) // |
// Row 3
#define US_COLN S(US_SCLN) // :
#define US_DIAE S(US_ACUT) // ¨ (dead)
// Row 4
#define US_LABK S(US_COMM) // <
#define US_RABK S(US_DOT) // >
#define US_QUES S(US_SLSH) // ?
/* AltGr symbols
*
* ` ¡ ² ³ ¤ ¼ ½ ¾ ¥ ×
*
* Ä Å É ® Þ Ü Ú Í Ó Ö « » ¬
*
* Á ß Ð Œ Ø '
*
* Æ © Ñ µ Ç ˙ ¿
*
*
*
*/
// Row 1
#define US_GRV ALGR(US_DGRV) // `
#define US_IEXL ALGR(US_1) // ¡
#define US_SUP2 ALGR(US_2) // ²
#define US_SUP3 ALGR(US_3) // ³
#define US_CURR ALGR(US_4) // ¤
#define US_EURO ALGR(US_5) // €
#define US_QRTR ALGR(US_6) // ¼
#define US_HALF ALGR(US_7) // ½
#define US_TQTR ALGR(US_8) // ¾
#define US_LSQU ALGR(US_9) //
#define US_RSQU ALGR(US_0) //
#define US_YEN ALGR(US_MINS) // ¥
#define US_MUL ALGR(US_EQL) // ×
// Row 2
#define US_ADIA ALGR(US_Q) // Ä
#define US_ARNG ALGR(US_W) // Å
#define US_EACU ALGR(US_E) // É
#define US_REGD ALGR(US_R) // ®
#define US_THRN ALGR(US_T) // Þ
#define US_UDIA ALGR(US_Y) // Ü
#define US_UACU ALGR(US_U) // Ú
#define US_IACU ALGR(US_I) // Í
#define US_OACU ALGR(US_O) // Ó
#define US_ODIA ALGR(US_P) // Ö
#define US_LDAQ ALGR(US_LBRC) // «
#define US_RDAQ ALGR(US_RBRC) // »
#define US_NOT ALGR(US_BSLS) // ¬
// Row 3
#define US_AACU ALGR(US_A) // Á
#define US_SS ALGR(US_S) // ß
#define US_ETH ALGR(US_D) // Ð
#define US_OE ALGR(US_K) // Œ
#define US_OSTR ALGR(US_L) // Ø
#define US_PILC ALGR(US_SCLN) // ¶
#define US_QUOT ALGR(US_ACUT) // '
// Row 4
#define US_AE ALGR(US_Z) // Æ
#define US_COPY ALGR(US_C) // ©
#define US_NTIL ALGR(US_N) // Ñ
#define US_MICR ALGR(US_M) // µ
#define US_CCED ALGR(US_COMM) // Ç
#define US_DOTA ALGR(US_DOT) // ˙ (dead)
#define US_IQUE ALGR(US_SLSH) // ¿
/* Shift+AltGr symbols
*
* ~ ¹ ˝ ¯ £ ¸ ^ ̛ ˛ ˘ ° ̣ ÷
*
* ¦
*
* § ° " │ │
*
* ¢ ˇ ̉
*
*
*
*/
// Row 1
#define US_TILD S(ALGR(US_DGRV)) // ~
#define US_SUP1 S(ALGR(US_1)) // ¹
#define US_DACU S(ALGR(US_2)) // ˝ (dead)
#define US_MACR S(ALGR(US_3)) // ¯ (dead)
#define US_PND S(ALGR(US_4)) // £
#define US_CEDL S(ALGR(US_5)) // ¸ (dead)
#define US_CIRC S(ALGR(US_6)) // ^
#define US_HORN S(ALGR(US_7)) // ̛ (dead)
#define US_OGON S(ALGR(US_8)) // ˛ (dead)
#define US_BREV S(ALGR(US_9)) // ˘ (dead)
#define US_RNGA S(ALGR(US_0)) // ° (dead)
#define US_DOTB S(ALGR(US_MINS)) // ̣ (dead)
#define US_DIV S(ALGR(US_EQL)) // ÷
// Row 2
#define US_LDQU S(ALGR(US_LBRC)) // “
#define US_RDQU S(ALGR(US_RBRC)) // ”
#define US_BRKP S(ALGR(US_BSLS)) // ¦
// Row 3
#define US_SECT S(ALGR(US_S)) // §
#define US_DEG S(ALGR(US_SCLN)) // °
#define US_DQUO S(ALGR(US_ACUT)) // "
// Row 4
#define US_CENT S(ALGR(US_C)) // ¢
#define US_CARN S(ALGR(US_DOT)) // ˇ (dead)
#define US_HOKA S(ALGR(US_SLSH)) // ̉ (dead)

View File

@ -1 +1 @@
4.0.0
5.0.0