From f066eeb65bd28b866d3e4109cf27f056b4fcedd6 Mon Sep 17 00:00:00 2001 From: Edgar Bonet Date: Sat, 2 Apr 2022 22:06:48 +0200 Subject: [PATCH] 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. --- src/Keyboard_de_DE.h | 45 +++++++++++++++++++++++++++++++++++++++++++ src/Keyboard_es_ES.h | 45 +++++++++++++++++++++++++++++++++++++++++++ src/Keyboard_fr_FR.h | 46 ++++++++++++++++++++++++++++++++++++++++++++ src/Keyboard_it_IT.h | 44 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 180 insertions(+) create mode 100644 src/Keyboard_de_DE.h create mode 100644 src/Keyboard_es_ES.h create mode 100644 src/Keyboard_fr_FR.h create mode 100644 src/Keyboard_it_IT.h diff --git a/src/Keyboard_de_DE.h b/src/Keyboard_de_DE.h new file mode 100644 index 0000000..f1e92b2 --- /dev/null +++ b/src/Keyboard_de_DE.h @@ -0,0 +1,45 @@ +/* + Keyboard_de_DE.h + + Copyright (c) 2022, Edgar Bonet + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef KEYBOARD_DE_DE_h +#define KEYBOARD_DE_DE_h + +#include "HID.h" + +#if !defined(_USING_HID) + +#warning "Using legacy HID core (non pluggable)" + +#else + +//================================================================================ +//================================================================================ +// Keyboard + +// de_DE keys +#define KEY_CIRCUMFLEX (136+0x35) +#define KEY_ESZETT (136+0x2d) +#define KEY_ACUTE (136+0x2e) +#define KEY_U_UMLAUT (136+0x2f) +#define KEY_O_UMLAUT (136+0x33) +#define KEY_A_UMLAUT (136+0x34) + +#endif +#endif diff --git a/src/Keyboard_es_ES.h b/src/Keyboard_es_ES.h new file mode 100644 index 0000000..1d808ed --- /dev/null +++ b/src/Keyboard_es_ES.h @@ -0,0 +1,45 @@ +/* + Keyboard_es_ES.h + + Copyright (c) 2022, Edgar Bonet + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef KEYBOARD_ES_ES_h +#define KEYBOARD_ES_ES_h + +#include "HID.h" + +#if !defined(_USING_HID) + +#warning "Using legacy HID core (non pluggable)" + +#else + +//================================================================================ +//================================================================================ +// Keyboard + +// es_ES keys +#define KEY_MASCULINE_ORDINAL (136+0x35) +#define KEY_INVERTED_EXCLAMATION (136+0x2e) +#define KEY_GRAVE (136+0x2f) +#define KEY_N_TILDE (136+0x33) +#define KEY_ACUTE (136+0x34) +#define KEY_C_CEDILLA (136+0x31) + +#endif +#endif diff --git a/src/Keyboard_fr_FR.h b/src/Keyboard_fr_FR.h new file mode 100644 index 0000000..faef422 --- /dev/null +++ b/src/Keyboard_fr_FR.h @@ -0,0 +1,46 @@ +/* + Keyboard_fr_FR.h + + Copyright (c) 2022, Edgar Bonet + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef KEYBOARD_FR_FR_h +#define KEYBOARD_FR_FR_h + +#include "HID.h" + +#if !defined(_USING_HID) + +#warning "Using legacy HID core (non pluggable)" + +#else + +//================================================================================ +//================================================================================ +// Keyboard + +// fr_FR keys +#define KEY_SUPERSCRIPT_TWO (136+0x35) +#define KEY_E_ACUTE (136+0x1f) +#define KEY_E_GRAVE (136+0x24) +#define KEY_C_CEDILLA (136+0x26) +#define KEY_A_GRAVE (136+0x27) +#define KEY_CIRCUMFLEX (136+0x2f) +#define KEY_U_GRAVE (136+0x34) + +#endif +#endif diff --git a/src/Keyboard_it_IT.h b/src/Keyboard_it_IT.h new file mode 100644 index 0000000..7d5e354 --- /dev/null +++ b/src/Keyboard_it_IT.h @@ -0,0 +1,44 @@ +/* + Keyboard_it_IT.h + + Copyright (c) 2022, Edgar Bonet + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef KEYBOARD_IT_IT_h +#define KEYBOARD_IT_IT_h + +#include "HID.h" + +#if !defined(_USING_HID) + +#warning "Using legacy HID core (non pluggable)" + +#else + +//================================================================================ +//================================================================================ +// Keyboard + +// it_IT keys +#define KEY_I_GRAVE (136+0x2e) +#define KEY_E_GRAVE (136+0x2f) +#define KEY_O_GRAVE (136+0x33) +#define KEY_A_GRAVE (136+0x34) +#define KEY_U_GRAVE (136+0x31) + +#endif +#endif

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