Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b793c5c

Browse files
authored
Add support for Danish language (#60)
1 parent fbf472f commit b793c5c

File tree

3 files changed

+183
-0
lines changed

3 files changed

+183
-0
lines changed

‎src/Keyboard.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ extern const uint8_t KeyboardLayout_es_ES[];
117117
extern const uint8_t KeyboardLayout_fr_FR[];
118118
extern const uint8_t KeyboardLayout_it_IT[];
119119
extern const uint8_t KeyboardLayout_sv_SE[];
120+
extern const uint8_t KeyboardLayout_da_DK[];
120121

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

‎src/KeyboardLayout_da_DK.cpp‎

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
* Danish keyboard layout.
3+
*/
4+
5+
#include "KeyboardLayout.h"
6+
7+
extern const uint8_t KeyboardLayout_da_DK[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+
0x1e|SHIFT, // !
44+
0x1f|SHIFT, // "
45+
0x20|SHIFT, // #
46+
0x21|ALT_GR, // $
47+
0x22|SHIFT, // %
48+
0x23|SHIFT, // &
49+
0x31, // '
50+
0x25|SHIFT, // (
51+
0x26|SHIFT, // )
52+
0x31|SHIFT, // *
53+
0x2d, // +
54+
0x36, // ,
55+
0x38, // -
56+
0x37, // .
57+
0x24|SHIFT, // /
58+
0x27, // 0
59+
0x1e, // 1
60+
0x1f, // 2
61+
0x20, // 3
62+
0x21, // 4
63+
0x22, // 5
64+
0x23, // 6
65+
0x24, // 7
66+
0x25, // 8
67+
0x26, // 9
68+
0x37|SHIFT, // :
69+
0x36|SHIFT, // ;
70+
0x32, // <
71+
0x27|SHIFT, // =
72+
0x32|SHIFT, // >
73+
0x2d|SHIFT, // ?
74+
0x1f|ALT_GR, // @
75+
0x04|SHIFT, // A
76+
0x05|SHIFT, // B
77+
0x06|SHIFT, // C
78+
0x07|SHIFT, // D
79+
0x08|SHIFT, // E
80+
0x09|SHIFT, // F
81+
0x0a|SHIFT, // G
82+
0x0b|SHIFT, // H
83+
0x0c|SHIFT, // I
84+
0x0d|SHIFT, // J
85+
0x0e|SHIFT, // K
86+
0x0f|SHIFT, // L
87+
0x10|SHIFT, // M
88+
0x11|SHIFT, // N
89+
0x12|SHIFT, // O
90+
0x13|SHIFT, // P
91+
0x14|SHIFT, // Q
92+
0x15|SHIFT, // R
93+
0x16|SHIFT, // S
94+
0x17|SHIFT, // T
95+
0x18|SHIFT, // U
96+
0x19|SHIFT, // V
97+
0x1a|SHIFT, // W
98+
0x1b|SHIFT, // X
99+
0x1c|SHIFT, // Y
100+
0x1d|SHIFT, // Z
101+
0x25|ALT_GR, // [
102+
0x32|ALT_GR, // bslash
103+
0x26|ALT_GR, // ]
104+
0x00, // ^ not supported (requires dead key + space)
105+
0x38|SHIFT, // _
106+
0x00, // ` not supported (requires dead key + space)
107+
0x04, // a
108+
0x05, // b
109+
0x06, // c
110+
0x07, // d
111+
0x08, // e
112+
0x09, // f
113+
0x0a, // g
114+
0x0b, // h
115+
0x0c, // i
116+
0x0d, // j
117+
0x0e, // k
118+
0x0f, // l
119+
0x10, // m
120+
0x11, // n
121+
0x12, // o
122+
0x13, // p
123+
0x14, // q
124+
0x15, // r
125+
0x16, // s
126+
0x17, // t
127+
0x18, // u
128+
0x19, // v
129+
0x1a, // w
130+
0x1b, // x
131+
0x1c, // y
132+
0x1d, // z
133+
0x24|ALT_GR, // {
134+
0x2e|ALT_GR, // |
135+
0x27|ALT_GR, // }
136+
0x00, // ~ not supported (requires dead key + space)
137+
0x00 // DEL
138+
};

‎src/Keyboard_da_DK.h‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
Keyboard_da_DK.h
3+
4+
Copyright (c) 2021, Peter John
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_DA_DK_h
22+
#define KEYBOARD_DA_DK_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+
// DA_DK keys
37+
#define KEY_A_RING (136+0x2f)
38+
#define KEY_SLASHED_O (136+0x34)
39+
#define KEY_ASH (136+0x33)
40+
#define KEY_UMLAUT (136+0x30)
41+
#define KEY_ACUTE_ACC (136+0x2e)
42+
43+
#endif
44+
#endif

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /