Skip to content

Commit f066eeb

Browse files
committed
Add definitions for extra keys in national layouts
The new files Keyboard_{de_DE,es_ES,fr_FR,it_IT}.h add macro definitions for keys that could not be otherwise easily accessed with the library, such as "e with grave accent" in the French and Italian layouts. Only keys that produce either a non-ASCII character or a dead accent when used unmodified are listed. For instance, the "pound sign" is not listed in the Italian layout because, without the Shift modifier, that key prints a "3". The macros are named after the character produced by the unmodified key. For example, they key for the inverted exclamation and question marks in the Spanish layout is named `KEY_INVERTED_EXCLAMATION'. This mimics what has already been done for the Danish and Swedish layouts.
1 parent b40a9b1 commit f066eeb

File tree

4 files changed

+180
-0
lines changed

4 files changed

+180
-0
lines changed

src/Keyboard_de_DE.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
Keyboard_de_DE.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_DE_DE_h
22+
#define KEYBOARD_DE_DE_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+
// de_DE keys
37+
#define KEY_CIRCUMFLEX (136+0x35)
38+
#define KEY_ESZETT (136+0x2d)
39+
#define KEY_ACUTE (136+0x2e)
40+
#define KEY_U_UMLAUT (136+0x2f)
41+
#define KEY_O_UMLAUT (136+0x33)
42+
#define KEY_A_UMLAUT (136+0x34)
43+
44+
#endif
45+
#endif

src/Keyboard_es_ES.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
Keyboard_es_ES.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_ES_ES_h
22+
#define KEYBOARD_ES_ES_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_ES keys
37+
#define KEY_MASCULINE_ORDINAL (136+0x35)
38+
#define KEY_INVERTED_EXCLAMATION (136+0x2e)
39+
#define KEY_GRAVE (136+0x2f)
40+
#define KEY_N_TILDE (136+0x33)
41+
#define KEY_ACUTE (136+0x34)
42+
#define KEY_C_CEDILLA (136+0x31)
43+
44+
#endif
45+
#endif

src/Keyboard_fr_FR.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
Keyboard_fr_FR.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_FR_FR_h
22+
#define KEYBOARD_FR_FR_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+
// fr_FR keys
37+
#define KEY_SUPERSCRIPT_TWO (136+0x35)
38+
#define KEY_E_ACUTE (136+0x1f)
39+
#define KEY_E_GRAVE (136+0x24)
40+
#define KEY_C_CEDILLA (136+0x26)
41+
#define KEY_A_GRAVE (136+0x27)
42+
#define KEY_CIRCUMFLEX (136+0x2f)
43+
#define KEY_U_GRAVE (136+0x34)
44+
45+
#endif
46+
#endif

src/Keyboard_it_IT.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
Keyboard_it_IT.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_IT_IT_h
22+
#define KEYBOARD_IT_IT_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+
// it_IT keys
37+
#define KEY_I_GRAVE (136+0x2e)
38+
#define KEY_E_GRAVE (136+0x2f)
39+
#define KEY_O_GRAVE (136+0x33)
40+
#define KEY_A_GRAVE (136+0x34)
41+
#define KEY_U_GRAVE (136+0x31)
42+
43+
#endif
44+
#endif

0 commit comments

Comments
 (0)