Skip to content

Commit c7c3d0b

Browse files
Add Latin American Spanish keyboard layout (#115)
Co-authored-by: Edgar Bonet <linux@edgar-bonet.org>
1 parent 8d86130 commit c7c3d0b

3 files changed

Lines changed: 182 additions & 0 deletions

File tree

‎src/Keyboard.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
extern const uint8_t KeyboardLayout_de_DE[];
115115
extern const uint8_t KeyboardLayout_en_US[];
116116
extern const uint8_t KeyboardLayout_es_ES[];
117+
extern const uint8_t KeyboardLayout_es_LATAM[];
117118
extern const uint8_t KeyboardLayout_fr_FR[];
118119
extern const uint8_t KeyboardLayout_it_IT[];
119120
extern const uint8_t KeyboardLayout_pt_BR[];

‎src/KeyboardLayout_es_LATAM.cpp‎

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/*
2+
* Latin American Spanish keyboard layout.
3+
* -WrenchPC 2026
4+
*/
5+
6+
#include "KeyboardLayout.h"
7+
8+
extern const uint8_t KeyboardLayout_es_LATAM[128] PROGMEM =
9+
{
10+
0x00, // NUL
11+
0x00, // SOH
12+
0x00, // STX
13+
0x00, // ETX
14+
0x00, // EOT
15+
0x00, // ENQ
16+
0x00, // ACK
17+
0x00, // BEL
18+
0x2a, // BS Backspace
19+
0x2b, // TAB Tab
20+
0x28, // LF Enter
21+
0x00, // VT
22+
0x00, // FF
23+
0x00, // CR
24+
0x00, // SO
25+
0x00, // SI
26+
0x00, // DEL
27+
0x00, // DC1
28+
0x00, // DC2
29+
0x00, // DC3
30+
0x00, // DC4
31+
0x00, // NAK
32+
0x00, // SYN
33+
0x00, // ETB
34+
0x00, // CAN
35+
0x00, // EM
36+
0x00, // SUB
37+
0x00, // ESC
38+
0x00, // FS
39+
0x00, // GS
40+
0x00, // RS
41+
0x00, // US
42+
43+
0x2c, // ' '
44+
0x1e|SHIFT, // !
45+
0x1f|SHIFT, // "
46+
0x20|SHIFT, // #
47+
0x21|SHIFT, // $
48+
0x22|SHIFT, // %
49+
0x23|SHIFT, // &
50+
0x2d, // '
51+
0x25|SHIFT, // (
52+
0x26|SHIFT, // )
53+
0x30|SHIFT, // *
54+
0x30, // +
55+
0x36, // ,
56+
0x38, // -
57+
0x37, // .
58+
0x24|SHIFT, // /
59+
0x27, // 0
60+
0x1e, // 1
61+
0x1f, // 2
62+
0x20, // 3
63+
0x21, // 4
64+
0x22, // 5
65+
0x23, // 6
66+
0x24, // 7
67+
0x25, // 8
68+
0x26, // 9
69+
0x37|SHIFT, // :
70+
0x36|SHIFT, // ;
71+
0x32, // <
72+
0x27|SHIFT, // =
73+
0x32|SHIFT, // >
74+
0x2d|SHIFT, // ?
75+
0x14|ALT_GR, // @
76+
0x04|SHIFT, // A
77+
0x05|SHIFT, // B
78+
0x06|SHIFT, // C
79+
0x07|SHIFT, // D
80+
0x08|SHIFT, // E
81+
0x09|SHIFT, // F
82+
0x0a|SHIFT, // G
83+
0x0b|SHIFT, // H
84+
0x0c|SHIFT, // I
85+
0x0d|SHIFT, // J
86+
0x0e|SHIFT, // K
87+
0x0f|SHIFT, // L
88+
0x10|SHIFT, // M
89+
0x11|SHIFT, // N
90+
0x12|SHIFT, // O
91+
0x13|SHIFT, // P
92+
0x14|SHIFT, // Q
93+
0x15|SHIFT, // R
94+
0x16|SHIFT, // S
95+
0x17|SHIFT, // T
96+
0x18|SHIFT, // U
97+
0x19|SHIFT, // V
98+
0x1a|SHIFT, // W
99+
0x1b|SHIFT, // X
100+
0x1c|SHIFT, // Y
101+
0x1d|SHIFT, // Z
102+
0x34|SHIFT, // [
103+
0x2d|ALT_GR, // bslash
104+
0x31|SHIFT, // ]
105+
0x00, // ^ not supported (requires dead key + space)
106+
0x38|SHIFT, // _
107+
0x00, // ` not supported (requires dead key + space)
108+
0x04, // a
109+
0x05, // b
110+
0x06, // c
111+
0x07, // d
112+
0x08, // e
113+
0x09, // f
114+
0x0a, // g
115+
0x0b, // h
116+
0x0c, // i
117+
0x0d, // j
118+
0x0e, // k
119+
0x0f, // l
120+
0x10, // m
121+
0x11, // n
122+
0x12, // o
123+
0x13, // p
124+
0x14, // q
125+
0x15, // r
126+
0x16, // s
127+
0x17, // t
128+
0x18, // u
129+
0x19, // v
130+
0x1a, // w
131+
0x1b, // x
132+
0x1c, // y
133+
0x1d, // z
134+
0x34, // {
135+
0x35, // |
136+
0x31, // }
137+
0x30|ALT_GR, // ~
138+
0x00 // DEL
139+
};

‎src/Keyboard_es_LATAM.h‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
Keyboard_es_LATAM.h -- Latin American Spanish keyboard
3+
4+
Copyright (c) 2026, WrenchPC
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*/
20+
21+
#ifndef KEYBOARD_ES_LATAM_h
22+
#define KEYBOARD_ES_LATAM_h
23+
24+
#include "HID.h"
25+
26+
#if !defined(_USING_HID)
27+
28+
#warning "Using legacy HID core (non pluggable)"
29+
30+
#else
31+
32+
//================================================================================
33+
//================================================================================
34+
// Keyboard
35+
36+
// es_LATAM keys
37+
#define KEY_INVERTED_QUESTION (136+0x2e) // ¿
38+
#define KEY_ACUTE (136+0x2f) // dead acute accent
39+
#define KEY_N_TILDE (136+0x33) // Ñ
40+
41+
#endif
42+
#endif

0 commit comments

Comments
 (0)