Skip to content

Commit 6124b16

Browse files
committed
Hungarian layout added
1 parent 48adc6c commit 6124b16

File tree

3 files changed

+197
-0
lines changed

3 files changed

+197
-0
lines changed

src/Keyboard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ extern const uint8_t KeyboardLayout_it_IT[];
119119
extern const uint8_t KeyboardLayout_pt_PT[];
120120
extern const uint8_t KeyboardLayout_sv_SE[];
121121
extern const uint8_t KeyboardLayout_da_DK[];
122+
extern const uint8_t KeyboardLayout_hu_HU[];
122123

123124
// Low level key report: up to 6 keys and shift, ctrl etc at once
124125
typedef struct

src/KeyboardLayout_hu_HU.cpp

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

src/Keyboard_hu_HU.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
Keyboard_hu_HU.h
3+
4+
Copyright (c) 2022, Edgar Bonet
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_HU_HU_h
22+
#define KEYBOARD_HU_HU_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+
// hu_HU keys
37+
#define KEY_O_SLASH 0x2e
38+
#define KEY_O_TWO_DOTS 0x27
39+
#define KEY_O_DOUBLE_SLASH 0x2f
40+
41+
#define KEY_U_SLASH 0x30
42+
#define KEY_U_TWO_DOTS 0x2d
43+
#define KEY_U_DOUBLE_SLASH 0x31
44+
45+
#define KEY_A_SLASH 0x34
46+
47+
#define KEY_E_SLASH 0x33
48+
49+
#define KEY_I_SLASH 0x32
50+
51+
#endif
52+
#endif

0 commit comments

Comments
 (0)