├── .codespellrc
├── .github
├── dependabot.yml
└── workflows
│ ├── check-arduino.yml
│ ├── compile-examples.yml
│ ├── report-size-deltas.yml
│ ├── spell-check.yml
│ └── sync-labels.yml
├── LICENSE
├── README.adoc
├── examples
└── Serial
│ └── Serial.ino
├── keywords.txt
├── library.properties
└── src
├── Keyboard.cpp
├── Keyboard.h
├── KeyboardLayout.h
├── KeyboardLayout_da_DK.cpp
├── KeyboardLayout_de_DE.cpp
├── KeyboardLayout_en_US.cpp
├── KeyboardLayout_es_ES.cpp
├── KeyboardLayout_fr_FR.cpp
├── KeyboardLayout_hu_HU.cpp
├── KeyboardLayout_it_IT.cpp
├── KeyboardLayout_pt_BR.cpp
├── KeyboardLayout_pt_PT.cpp
├── KeyboardLayout_sv_SE.cpp
├── Keyboard_da_DK.h
├── Keyboard_de_DE.h
├── Keyboard_es_ES.h
├── Keyboard_fr_FR.h
├── Keyboard_hu_HU.h
├── Keyboard_it_IT.h
├── Keyboard_pt_BR.h
├── Keyboard_pt_PT.h
└── Keyboard_sv_SE.h
/.codespellrc:
--------------------------------------------------------------------------------
1 | # See: https://github.com/codespell-project/codespell#using-a-config-file
2 | [codespell]
3 | # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4 | ignore-words-list = ,
5 | check-filenames =
6 | check-hidden =
7 | skip = ./.git
8 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file
2 | version: 2
3 |
4 | updates:
5 | # Configure check for outdated GitHub Actions actions in workflows.
6 | # See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
7 | - package-ecosystem: github-actions
8 | directory: / # Check the repository's workflows under /.github/workflows/
9 | schedule:
10 | interval: daily
11 | labels:
12 | - "topic: infrastructure"
13 |
--------------------------------------------------------------------------------
/.github/workflows/check-arduino.yml:
--------------------------------------------------------------------------------
1 | name: Check Arduino
2 |
3 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4 | on:
5 | push:
6 | pull_request:
7 | schedule:
8 | # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint.
9 | - cron: "0 8 * * TUE"
10 | workflow_dispatch:
11 | repository_dispatch:
12 |
13 | jobs:
14 | lint:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Checkout repository
19 | uses: actions/checkout@v4
20 |
21 | - name: Arduino Lint
22 | uses: arduino/arduino-lint-action@v2
23 | with:
24 | compliance: specification
25 | library-manager: update
26 | # Always use this setting for official repositories. Remove for 3rd party projects.
27 | official: true
28 | project-type: library
29 |
--------------------------------------------------------------------------------
/.github/workflows/compile-examples.yml:
--------------------------------------------------------------------------------
1 | name: Compile Examples
2 |
3 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4 | on:
5 | push:
6 | paths:
7 | - ".github/workflows/compile-examples.yml"
8 | - "examples/**"
9 | - "src/**"
10 | pull_request:
11 | paths:
12 | - ".github/workflows/compile-examples.yml"
13 | - "examples/**"
14 | - "src/**"
15 | schedule:
16 | # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17 | - cron: "0 8 * * TUE"
18 | workflow_dispatch:
19 | repository_dispatch:
20 |
21 | jobs:
22 | build:
23 | name: ${{ matrix.board.fqbn }}
24 | runs-on: ubuntu-latest
25 |
26 | env:
27 | SKETCHES_REPORTS_PATH: sketches-reports
28 |
29 | strategy:
30 | fail-fast: false
31 |
32 | matrix:
33 | board:
34 | - fqbn: arduino:avr:leonardo
35 | platforms: |
36 | - name: arduino:avr
37 | artifact-name-suffix: arduino-avr-leonardo
38 | - fqbn: arduino:sam:arduino_due_x_dbg
39 | platforms: |
40 | - name: arduino:sam
41 | artifact-name-suffix: arduino-sam-arduino_due_x_dbg
42 | - fqbn: arduino:samd:mkrzero
43 | platforms: |
44 | - name: arduino:samd
45 | artifact-name-suffix: arduino-samd-mkrzero
46 |
47 | steps:
48 | - name: Checkout repository
49 | uses: actions/checkout@v4
50 |
51 | - name: Compile examples
52 | uses: arduino/compile-sketches@v1
53 | with:
54 | github-token: ${{ secrets.GITHUB_TOKEN }}
55 | fqbn: ${{ matrix.board.fqbn }}
56 | platforms: ${{ matrix.board.platforms }}
57 | libraries: |
58 | # Install the library from the local path.
59 | - source-path: ./
60 | # Additional library dependencies can be listed here.
61 | # See: https://github.com/arduino/compile-sketches#libraries
62 | sketch-paths: |
63 | - examples
64 | enable-deltas-report: true
65 | sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
66 |
67 | - name: Save sketches report as workflow artifact
68 | uses: actions/upload-artifact@v4
69 | with:
70 | if-no-files-found: error
71 | path: ${{ env.SKETCHES_REPORTS_PATH }}
72 | name: sketches-report-${{ matrix.board.artifact-name-suffix }}
73 |
--------------------------------------------------------------------------------
/.github/workflows/report-size-deltas.yml:
--------------------------------------------------------------------------------
1 | name: Report Size Deltas
2 |
3 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4 | on:
5 | push:
6 | paths:
7 | - ".github/workflows/report-size-deltas.yml"
8 | schedule:
9 | # Run at the minimum interval allowed by GitHub Actions.
10 | # Note: GitHub Actions periodically has outages which result in workflow failures.
11 | # In this event, the workflows will start passing again once the service recovers.
12 | - cron: "*/5 * * * *"
13 | workflow_dispatch:
14 | repository_dispatch:
15 |
16 | jobs:
17 | report:
18 | runs-on: ubuntu-latest
19 | steps:
20 | - name: Comment size deltas reports to PRs
21 | uses: arduino/report-size-deltas@v1
22 | with:
23 | # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
24 | sketches-reports-source: ^sketches-report-.+
25 |
--------------------------------------------------------------------------------
/.github/workflows/spell-check.yml:
--------------------------------------------------------------------------------
1 | name: Spell Check
2 |
3 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4 | on:
5 | push:
6 | pull_request:
7 | schedule:
8 | # Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9 | - cron: "0 8 * * TUE"
10 | workflow_dispatch:
11 | repository_dispatch:
12 |
13 | jobs:
14 | spellcheck:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Checkout repository
19 | uses: actions/checkout@v4
20 |
21 | - name: Spell check
22 | uses: codespell-project/actions-codespell@master
23 |
--------------------------------------------------------------------------------
/.github/workflows/sync-labels.yml:
--------------------------------------------------------------------------------
1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels.md
2 | name: Sync Labels
3 |
4 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5 | on:
6 | push:
7 | paths:
8 | - ".github/workflows/sync-labels.ya?ml"
9 | - ".github/label-configuration-files/*.ya?ml"
10 | pull_request:
11 | paths:
12 | - ".github/workflows/sync-labels.ya?ml"
13 | - ".github/label-configuration-files/*.ya?ml"
14 | schedule:
15 | # Run daily at 8 AM UTC to sync with changes to shared label configurations.
16 | - cron: "0 8 * * *"
17 | workflow_dispatch:
18 | repository_dispatch:
19 |
20 | env:
21 | CONFIGURATIONS_FOLDER: .github/label-configuration-files
22 | CONFIGURATIONS_ARTIFACT: label-configuration-files
23 |
24 | jobs:
25 | check:
26 | runs-on: ubuntu-latest
27 |
28 | steps:
29 | - name: Checkout repository
30 | uses: actions/checkout@v4
31 |
32 | - name: Download JSON schema for labels configuration file
33 | id: download-schema
34 | uses: carlosperate/download-file-action@v2
35 | with:
36 | file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json
37 | location: ${{ runner.temp }}/label-configuration-schema
38 |
39 | - name: Install JSON schema validator
40 | run: |
41 | sudo npm install \
42 | --global \
43 | ajv-cli \
44 | ajv-formats
45 |
46 | - name: Validate local labels configuration
47 | run: |
48 | # See: https://github.com/ajv-validator/ajv-cli#readme
49 | ajv validate \
50 | --all-errors \
51 | -c ajv-formats \
52 | -s "${{ steps.download-schema.outputs.file-path }}" \
53 | -d "${{ env.CONFIGURATIONS_FOLDER }}/*.{yml,yaml}"
54 |
55 | download:
56 | needs: check
57 | runs-on: ubuntu-latest
58 |
59 | strategy:
60 | matrix:
61 | filename:
62 | # Filenames of the shared configurations to apply to the repository in addition to the local configuration.
63 | # https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/sync-labels
64 | - universal.yml
65 |
66 | steps:
67 | - name: Download
68 | uses: carlosperate/download-file-action@v2
69 | with:
70 | file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
71 |
72 | - name: Pass configuration files to next job via workflow artifact
73 | uses: actions/upload-artifact@v4
74 | with:
75 | path: |
76 | *.yaml
77 | *.yml
78 | if-no-files-found: error
79 | name: ${{ env.CONFIGURATIONS_ARTIFACT }}
80 |
81 | sync:
82 | needs: download
83 | runs-on: ubuntu-latest
84 |
85 | steps:
86 | - name: Set environment variables
87 | run: |
88 | # See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
89 | echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV"
90 |
91 | - name: Determine whether to dry run
92 | id: dry-run
93 | if: >
94 | github.event_name == 'pull_request' ||
95 | (
96 | (
97 | github.event_name == 'push' ||
98 | github.event_name == 'workflow_dispatch'
99 | ) &&
100 | github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
101 | )
102 | run: |
103 | # Use of this flag in the github-label-sync command will cause it to only check the validity of the
104 | # configuration.
105 | echo "::set-output name=flag::--dry-run"
106 |
107 | - name: Checkout repository
108 | uses: actions/checkout@v4
109 |
110 | - name: Download configuration files artifact
111 | uses: actions/download-artifact@v4
112 | with:
113 | name: ${{ env.CONFIGURATIONS_ARTIFACT }}
114 | path: ${{ env.CONFIGURATIONS_FOLDER }}
115 |
116 | - name: Remove unneeded artifact
117 | uses: geekyeggo/delete-artifact@v5
118 | with:
119 | name: ${{ env.CONFIGURATIONS_ARTIFACT }}
120 |
121 | - name: Merge label configuration files
122 | run: |
123 | # Merge all configuration files
124 | shopt -s extglob
125 | cat "${{ env.CONFIGURATIONS_FOLDER }}"/*.@(yml|yaml) > "${{ env.MERGED_CONFIGURATION_PATH }}"
126 |
127 | - name: Install github-label-sync
128 | run: sudo npm install --global github-label-sync
129 |
130 | - name: Sync labels
131 | env:
132 | GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133 | run: |
134 | # See: https://github.com/Financial-Times/github-label-sync
135 | github-label-sync \
136 | --labels "${{ env.MERGED_CONFIGURATION_PATH }}" \
137 | ${{ steps.dry-run.outputs.flag }} \
138 | ${{ github.repository }}
139 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/README.adoc:
--------------------------------------------------------------------------------
1 | :repository-owner: arduino-libraries
2 | :repository-name: Keyboard
3 |
4 | = {repository-name} Library for Arduino =
5 |
6 | image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml/badge.svg["Check Arduino status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml"]
7 | image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml/badge.svg["Compile Examples status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml"]
8 | image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml"]
9 |
10 | This library allows an Arduino board with USB capabilities to act as a keyboard.
11 |
12 | For more information about this library please visit us at
13 | https://docs.arduino.cc/language-reference/en/functions/usb/Keyboard/
14 |
15 | == License ==
16 |
17 | Copyright (c) Arduino LLC. All right reserved.
18 |
19 | This library is free software; you can redistribute it and/or
20 | modify it under the terms of the GNU Lesser General Public
21 | License as published by the Free Software Foundation; either
22 | version 2.1 of the License, or (at your option) any later version.
23 |
24 | This library is distributed in the hope that it will be useful,
25 | but WITHOUT ANY WARRANTY; without even the implied warranty of
26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 | Lesser General Public License for more details.
28 |
29 | You should have received a copy of the GNU Lesser General Public
30 | License along with this library; if not, write to the Free Software
31 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 |
--------------------------------------------------------------------------------
/examples/Serial/Serial.ino:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard test
3 |
4 | For the Arduino Leonardo, Micro or Due
5 |
6 | Reads a byte from the serial port, sends a keystroke back.
7 | The sent keystroke is one higher than what's received, e.g. if you send a,
8 | you get b, send A you get B, and so forth.
9 |
10 | The circuit:
11 | - none
12 |
13 | created 21 Oct 2011
14 | modified 27 Mar 2012
15 | by Tom Igoe
16 |
17 | This example code is in the public domain.
18 |
19 | https://www.arduino.cc/en/Tutorial/BuiltInExamples/KeyboardSerial
20 | */
21 |
22 | #include "Keyboard.h"
23 |
24 | void setup() {
25 | // open the serial port:
26 | Serial.begin(9600);
27 | // initialize control over the keyboard:
28 | Keyboard.begin();
29 | }
30 |
31 | void loop() {
32 | // check for incoming serial data:
33 | if (Serial.available() > 0) {
34 | // read incoming serial data:
35 | char inChar = Serial.read();
36 | // Type the next ASCII value from what you received:
37 | Keyboard.write(inChar + 1);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map For Keyboard
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | Keyboard KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 |
15 | begin KEYWORD2
16 | write KEYWORD2
17 | press KEYWORD2
18 | release KEYWORD2
19 | releaseAll KEYWORD2
20 |
21 | #######################################
22 | # Constants (LITERAL1)
23 | #######################################
24 |
25 |
--------------------------------------------------------------------------------
/library.properties:
--------------------------------------------------------------------------------
1 | name=Keyboard
2 | version=1.0.6
3 | author=Arduino
4 | maintainer=Arduino
5 | sentence=Allows an Arduino board with USB capabilities to act as a Keyboard.
6 | paragraph=This library plugs on the HID library. It can be used with or without other HID-based libraries (Mouse, Gamepad etc)
7 | category=Device Control
8 | url=https://www.arduino.cc/reference/en/language/functions/usb/keyboard/
9 | architectures=avr, samd, sam, renesas_uno
10 |
--------------------------------------------------------------------------------
/src/Keyboard.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard.cpp
3 |
4 | Copyright (c) 2015, Arduino LLC
5 | Original code (pre-library): Copyright (c) 2011, Peter Barrett
6 |
7 | This library is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU Lesser General Public
9 | License as published by the Free Software Foundation; either
10 | version 2.1 of the License, or (at your option) any later version.
11 |
12 | This library is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | Lesser General Public License for more details.
16 |
17 | You should have received a copy of the GNU Lesser General Public
18 | License along with this library; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #include "Keyboard.h"
23 | #include "KeyboardLayout.h"
24 |
25 | #if defined(_USING_HID)
26 |
27 | //================================================================================
28 | //================================================================================
29 | // Keyboard
30 |
31 | static const uint8_t _hidReportDescriptor[] PROGMEM = {
32 |
33 | // Keyboard
34 | 0x05, 0x01, // USAGE_PAGE (Generic Desktop) // 47
35 | 0x09, 0x06, // USAGE (Keyboard)
36 | 0xa1, 0x01, // COLLECTION (Application)
37 | 0x85, 0x02, // REPORT_ID (2)
38 | 0x05, 0x07, // USAGE_PAGE (Keyboard)
39 |
40 | 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
41 | 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
42 | 0x15, 0x00, // LOGICAL_MINIMUM (0)
43 | 0x25, 0x01, // LOGICAL_MAXIMUM (1)
44 | 0x75, 0x01, // REPORT_SIZE (1)
45 |
46 | 0x95, 0x08, // REPORT_COUNT (8)
47 | 0x81, 0x02, // INPUT (Data,Var,Abs)
48 | 0x95, 0x01, // REPORT_COUNT (1)
49 | 0x75, 0x08, // REPORT_SIZE (8)
50 | 0x81, 0x03, // INPUT (Cnst,Var,Abs)
51 |
52 | 0x95, 0x06, // REPORT_COUNT (6)
53 | 0x75, 0x08, // REPORT_SIZE (8)
54 | 0x15, 0x00, // LOGICAL_MINIMUM (0)
55 | 0x25, 0x73, // LOGICAL_MAXIMUM (115)
56 | 0x05, 0x07, // USAGE_PAGE (Keyboard)
57 |
58 | 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
59 | 0x29, 0x73, // USAGE_MAXIMUM (Keyboard Application)
60 | 0x81, 0x00, // INPUT (Data,Ary,Abs)
61 | 0xc0, // END_COLLECTION
62 | };
63 |
64 | Keyboard_::Keyboard_(void)
65 | {
66 | static HIDSubDescriptor node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
67 | HID().AppendDescriptor(&node);
68 | _asciimap = KeyboardLayout_en_US;
69 | }
70 |
71 | void Keyboard_::begin(const uint8_t *layout)
72 | {
73 | _asciimap = layout;
74 | }
75 |
76 | void Keyboard_::end(void)
77 | {
78 | }
79 |
80 | void Keyboard_::sendReport(KeyReport* keys)
81 | {
82 | HID().SendReport(2,keys,sizeof(KeyReport));
83 | }
84 |
85 | uint8_t USBPutChar(uint8_t c);
86 |
87 | // press() adds the specified key (printing, non-printing, or modifier)
88 | // to the persistent key report and sends the report. Because of the way
89 | // USB HID works, the host acts like the key remains pressed until we
90 | // call release(), releaseAll(), or otherwise clear the report and resend.
91 | size_t Keyboard_::press(uint8_t k)
92 | {
93 | uint8_t i;
94 | if (k >= 136) { // it's a non-printing key (not a modifier)
95 | k = k - 136;
96 | } else if (k >= 128) { // it's a modifier key
97 | _keyReport.modifiers |= (1<<(k-128));
98 | k = 0;
99 | } else { // it's a printing key
100 | k = pgm_read_byte(_asciimap + k);
101 | if (!k) {
102 | setWriteError();
103 | return 0;
104 | }
105 | if ((k & ALT_GR) == ALT_GR) {
106 | _keyReport.modifiers |= 0x40; // AltGr = right Alt
107 | k &= 0x3F;
108 | } else if ((k & SHIFT) == SHIFT) {
109 | _keyReport.modifiers |= 0x02; // the left shift modifier
110 | k &= 0x7F;
111 | }
112 | if (k == ISO_REPLACEMENT) {
113 | k = ISO_KEY;
114 | }
115 | }
116 |
117 | // Add k to the key report only if it's not already present
118 | // and if there is an empty slot.
119 | if (_keyReport.keys[0] != k && _keyReport.keys[1] != k &&
120 | _keyReport.keys[2] != k && _keyReport.keys[3] != k &&
121 | _keyReport.keys[4] != k && _keyReport.keys[5] != k) {
122 |
123 | for (i=0; i<6; i++) {
124 | if (_keyReport.keys[i] == 0x00) {
125 | _keyReport.keys[i] = k;
126 | break;
127 | }
128 | }
129 | if (i == 6) {
130 | setWriteError();
131 | return 0;
132 | }
133 | }
134 | sendReport(&_keyReport);
135 | return 1;
136 | }
137 |
138 | // release() takes the specified key out of the persistent key report and
139 | // sends the report. This tells the OS the key is no longer pressed and that
140 | // it shouldn't be repeated any more.
141 | size_t Keyboard_::release(uint8_t k)
142 | {
143 | uint8_t i;
144 | if (k >= 136) { // it's a non-printing key (not a modifier)
145 | k = k - 136;
146 | } else if (k >= 128) { // it's a modifier key
147 | _keyReport.modifiers &= ~(1<<(k-128));
148 | k = 0;
149 | } else { // it's a printing key
150 | k = pgm_read_byte(_asciimap + k);
151 | if (!k) {
152 | return 0;
153 | }
154 | if ((k & ALT_GR) == ALT_GR) {
155 | _keyReport.modifiers &= ~(0x40); // AltGr = right Alt
156 | k &= 0x3F;
157 | } else if ((k & SHIFT) == SHIFT) {
158 | _keyReport.modifiers &= ~(0x02); // the left shift modifier
159 | k &= 0x7F;
160 | }
161 | if (k == ISO_REPLACEMENT) {
162 | k = ISO_KEY;
163 | }
164 | }
165 |
166 | // Test the key report to see if k is present. Clear it if it exists.
167 | // Check all positions in case the key is present more than once (which it shouldn't be)
168 | for (i=0; i<6; i++) {
169 | if (0 != k && _keyReport.keys[i] == k) {
170 | _keyReport.keys[i] = 0x00;
171 | }
172 | }
173 |
174 | sendReport(&_keyReport);
175 | return 1;
176 | }
177 |
178 | void Keyboard_::releaseAll(void)
179 | {
180 | _keyReport.keys[0] = 0;
181 | _keyReport.keys[1] = 0;
182 | _keyReport.keys[2] = 0;
183 | _keyReport.keys[3] = 0;
184 | _keyReport.keys[4] = 0;
185 | _keyReport.keys[5] = 0;
186 | _keyReport.modifiers = 0;
187 | sendReport(&_keyReport);
188 | }
189 |
190 | size_t Keyboard_::write(uint8_t c)
191 | {
192 | uint8_t p = press(c); // Keydown
193 | release(c); // Keyup
194 | return p; // just return the result of press() since release() almost always returns 1
195 | }
196 |
197 | size_t Keyboard_::write(const uint8_t *buffer, size_t size) {
198 | size_t n = 0;
199 | while (size--) {
200 | if (*buffer != '\r') {
201 | if (write(*buffer)) {
202 | n++;
203 | } else {
204 | break;
205 | }
206 | }
207 | buffer++;
208 | }
209 | return n;
210 | }
211 |
212 | Keyboard_ Keyboard;
213 |
214 | #endif
215 |
--------------------------------------------------------------------------------
/src/Keyboard.h:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard.h
3 |
4 | Copyright (c) 2015, Arduino LLC
5 | Original code (pre-library): Copyright (c) 2011, Peter Barrett
6 |
7 | This library is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU Lesser General Public
9 | License as published by the Free Software Foundation; either
10 | version 2.1 of the License, or (at your option) any later version.
11 |
12 | This library is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | Lesser General Public License for more details.
16 |
17 | You should have received a copy of the GNU Lesser General Public
18 | License along with this library; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef KEYBOARD_h
23 | #define KEYBOARD_h
24 |
25 | #include "HID.h"
26 |
27 | #if !defined(_USING_HID)
28 |
29 | #warning "Using legacy HID core (non pluggable)"
30 |
31 | #else
32 |
33 | //================================================================================
34 | //================================================================================
35 | // Keyboard
36 |
37 | // Modifiers
38 | #define KEY_LEFT_CTRL 0x80
39 | #define KEY_LEFT_SHIFT 0x81
40 | #define KEY_LEFT_ALT 0x82
41 | #define KEY_LEFT_GUI 0x83
42 | #define KEY_RIGHT_CTRL 0x84
43 | #define KEY_RIGHT_SHIFT 0x85
44 | #define KEY_RIGHT_ALT 0x86
45 | #define KEY_RIGHT_GUI 0x87
46 |
47 | // Misc keys
48 | #define KEY_UP_ARROW 0xDA
49 | #define KEY_DOWN_ARROW 0xD9
50 | #define KEY_LEFT_ARROW 0xD8
51 | #define KEY_RIGHT_ARROW 0xD7
52 | #define KEY_BACKSPACE 0xB2
53 | #define KEY_TAB 0xB3
54 | #define KEY_RETURN 0xB0
55 | #define KEY_MENU 0xED // "Keyboard Application" in USB standard
56 | #define KEY_ESC 0xB1
57 | #define KEY_INSERT 0xD1
58 | #define KEY_DELETE 0xD4
59 | #define KEY_PAGE_UP 0xD3
60 | #define KEY_PAGE_DOWN 0xD6
61 | #define KEY_HOME 0xD2
62 | #define KEY_END 0xD5
63 | #define KEY_CAPS_LOCK 0xC1
64 | #define KEY_PRINT_SCREEN 0xCE // Print Screen / SysRq
65 | #define KEY_SCROLL_LOCK 0xCF
66 | #define KEY_PAUSE 0xD0 // Pause / Break
67 |
68 | // Numeric keypad
69 | #define KEY_NUM_LOCK 0xDB
70 | #define KEY_KP_SLASH 0xDC
71 | #define KEY_KP_ASTERISK 0xDD
72 | #define KEY_KP_MINUS 0xDE
73 | #define KEY_KP_PLUS 0xDF
74 | #define KEY_KP_ENTER 0xE0
75 | #define KEY_KP_1 0xE1
76 | #define KEY_KP_2 0xE2
77 | #define KEY_KP_3 0xE3
78 | #define KEY_KP_4 0xE4
79 | #define KEY_KP_5 0xE5
80 | #define KEY_KP_6 0xE6
81 | #define KEY_KP_7 0xE7
82 | #define KEY_KP_8 0xE8
83 | #define KEY_KP_9 0xE9
84 | #define KEY_KP_0 0xEA
85 | #define KEY_KP_DOT 0xEB
86 |
87 | // Function keys
88 | #define KEY_F1 0xC2
89 | #define KEY_F2 0xC3
90 | #define KEY_F3 0xC4
91 | #define KEY_F4 0xC5
92 | #define KEY_F5 0xC6
93 | #define KEY_F6 0xC7
94 | #define KEY_F7 0xC8
95 | #define KEY_F8 0xC9
96 | #define KEY_F9 0xCA
97 | #define KEY_F10 0xCB
98 | #define KEY_F11 0xCC
99 | #define KEY_F12 0xCD
100 | #define KEY_F13 0xF0
101 | #define KEY_F14 0xF1
102 | #define KEY_F15 0xF2
103 | #define KEY_F16 0xF3
104 | #define KEY_F17 0xF4
105 | #define KEY_F18 0xF5
106 | #define KEY_F19 0xF6
107 | #define KEY_F20 0xF7
108 | #define KEY_F21 0xF8
109 | #define KEY_F22 0xF9
110 | #define KEY_F23 0xFA
111 | #define KEY_F24 0xFB
112 |
113 | // Supported keyboard layouts
114 | extern const uint8_t KeyboardLayout_de_DE[];
115 | extern const uint8_t KeyboardLayout_en_US[];
116 | extern const uint8_t KeyboardLayout_es_ES[];
117 | extern const uint8_t KeyboardLayout_fr_FR[];
118 | extern const uint8_t KeyboardLayout_it_IT[];
119 | extern const uint8_t KeyboardLayout_pt_BR[];
120 | extern const uint8_t KeyboardLayout_pt_PT[];
121 | extern const uint8_t KeyboardLayout_sv_SE[];
122 | extern const uint8_t KeyboardLayout_da_DK[];
123 | extern const uint8_t KeyboardLayout_hu_HU[];
124 |
125 | // Low level key report: up to 6 keys and shift, ctrl etc at once
126 | typedef struct
127 | {
128 | uint8_t modifiers;
129 | uint8_t reserved;
130 | uint8_t keys[6];
131 | } KeyReport;
132 |
133 | class Keyboard_ : public Print
134 | {
135 | private:
136 | KeyReport _keyReport;
137 | const uint8_t *_asciimap;
138 | void sendReport(KeyReport* keys);
139 | public:
140 | Keyboard_(void);
141 | void begin(const uint8_t *layout = KeyboardLayout_en_US);
142 | void end(void);
143 | size_t write(uint8_t k);
144 | size_t write(const uint8_t *buffer, size_t size);
145 | size_t press(uint8_t k);
146 | size_t release(uint8_t k);
147 | void releaseAll(void);
148 | };
149 | extern Keyboard_ Keyboard;
150 |
151 | #endif
152 | #endif
153 |
--------------------------------------------------------------------------------
/src/KeyboardLayout.h:
--------------------------------------------------------------------------------
1 | /*
2 | KeyboardLayout.h
3 |
4 | This file is not part of the public API. It is meant to be included
5 | only in Keyboard.cpp and the keyboard layout files. Layout files map
6 | ASCII character codes to keyboard scan codes (technically, to USB HID
7 | Usage codes), possibly altered by the SHIFT or ALT_GR modifiers.
8 | Non-ACSII characters (anything outside the 7-bit range NUL..DEL) are
9 | not supported.
10 |
11 | == Creating your own layout ==
12 |
13 | In order to create your own layout file, copy an existing layout that
14 | is similar to yours, then modify it to use the correct keys. The
15 | layout is an array in ASCII order. Each entry contains a scan code,
16 | possibly modified by "|SHIFT" or "|ALT_GR", as in this excerpt from
17 | the Italian layout:
18 |
19 | 0x35, // bslash
20 | 0x30|ALT_GR, // ]
21 | 0x2e|SHIFT, // ^
22 |
23 | Do not change the control characters (those before scan code 0x2c,
24 | corresponding to space). Do not attempt to grow the table past DEL. Do
25 | not use both SHIFT and ALT_GR on the same character: this is not
26 | supported. Unsupported characters should have 0x00 as scan code.
27 |
28 | For a keyboard with an ISO physical layout, use the scan codes below:
29 |
30 | +---+---+---+---+---+---+---+---+---+---+---+---+---+-------+
31 | |35 |1e |1f |20 |21 |22 |23 |24 |25 |26 |27 |2d |2e |BackSp |
32 | +---+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-----+
33 | | Tab |14 |1a |08 |15 |17 |1c |18 |0c |12 |13 |2f |30 | Ret |
34 | +-----++--++--++--++--++--++--++--++--++--++--++--++--++ |
35 | |CapsL |04 |16 |07 |09 |0a |0b |0d |0e |0f |33 |34 |31 | |
36 | +----+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---+----+
37 | |Shi.|32 |1d |1b |06 |19 |05 |11 |10 |36 |37 |38 | Shift |
38 | +----+---++--+-+-+---+---+---+---+---+--++---+---++----+----+
39 | |Ctrl|Win |Alt | |AlGr|Win |Menu|Ctrl|
40 | +----+----+----+------------------------+----+----+----+----+
41 |
42 | The ANSI layout is identical except that key 0x31 is above (rather
43 | than next to) Return, and there is not key 0x32.
44 |
45 | Give a unique name to the layout array, then declare it in Keyboard.h
46 | with a line of the form:
47 |
48 | extern const uint8_t KeyboardLayout_xx_YY[];
49 |
50 | == Encoding details ==
51 |
52 | All scan codes are less than 0x80, which makes bit 7 available to
53 | signal that a modifier (Shift or AltGr) is needed to generate the
54 | character. With only one exception, keys that are used with modifiers
55 | have scan codes that are less than 0x40. This makes bit 6 available
56 | to signal whether the modifier is Shift or AltGr. The exception is
57 | 0x64, the key next next to Left Shift on the ISO layout (and absent
58 | from the ANSI layout). We handle it by replacing its value by 0x32 in
59 | the layout arrays.
60 | */
61 |
62 | #include
63 |
64 | #define SHIFT 0x80
65 | #define ALT_GR 0xc0
66 | #define ISO_KEY 0x64
67 | #define ISO_REPLACEMENT 0x32
68 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_da_DK.cpp:
--------------------------------------------------------------------------------
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 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_de_DE.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * German keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_de_DE[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 | 0x31, // #
46 | 0x21|SHIFT, // $
47 | 0x22|SHIFT, // %
48 | 0x23|SHIFT, // &
49 | 0x31|SHIFT, // '
50 | 0x25|SHIFT, // (
51 | 0x26|SHIFT, // )
52 | 0x30|SHIFT, // *
53 | 0x30, // +
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 | 0x14|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 | 0x1d|SHIFT, // Y
100 | 0x1c|SHIFT, // Z
101 | 0x25|ALT_GR, // [
102 | 0x2d|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 | 0x1d, // y
132 | 0x1c, // z
133 | 0x24|ALT_GR, // {
134 | 0x32|ALT_GR, // |
135 | 0x27|ALT_GR, // }
136 | 0x30|ALT_GR, // ~
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_en_US.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Standard US keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_en_US[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 | 0x34|SHIFT, // "
45 | 0x20|SHIFT, // #
46 | 0x21|SHIFT, // $
47 | 0x22|SHIFT, // %
48 | 0x24|SHIFT, // &
49 | 0x34, // '
50 | 0x26|SHIFT, // (
51 | 0x27|SHIFT, // )
52 | 0x25|SHIFT, // *
53 | 0x2e|SHIFT, // +
54 | 0x36, // ,
55 | 0x2d, // -
56 | 0x37, // .
57 | 0x38, // /
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 | 0x33|SHIFT, // :
69 | 0x33, // ;
70 | 0x36|SHIFT, // <
71 | 0x2e, // =
72 | 0x37|SHIFT, // >
73 | 0x38|SHIFT, // ?
74 | 0x1f|SHIFT, // @
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 | 0x2f, // [
102 | 0x31, // bslash
103 | 0x30, // ]
104 | 0x23|SHIFT, // ^
105 | 0x2d|SHIFT, // _
106 | 0x35, // `
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 | 0x2f|SHIFT, // {
134 | 0x31|SHIFT, // |
135 | 0x30|SHIFT, // }
136 | 0x35|SHIFT, // ~
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_es_ES.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Spanish keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_es_ES[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|ALT_GR, // #
46 | 0x21|SHIFT, // $
47 | 0x22|SHIFT, // %
48 | 0x23|SHIFT, // &
49 | 0x2d, // '
50 | 0x25|SHIFT, // (
51 | 0x26|SHIFT, // )
52 | 0x30|SHIFT, // *
53 | 0x30, // +
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 | 0x2f|ALT_GR, // [
102 | 0x35|ALT_GR, // bslash
103 | 0x30|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 | 0x34|ALT_GR, // {
134 | 0x1e|ALT_GR, // |
135 | 0x31|ALT_GR, // }
136 | 0x00, // ~ not supported (requires dead key + space)
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_fr_FR.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Traditional (not AFNOR) French keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_fr_FR[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 | 0x38, // !
44 | 0x20, // "
45 | 0x20|ALT_GR, // #
46 | 0x30, // $
47 | 0x34|SHIFT, // %
48 | 0x1E, // &
49 | 0x21, // '
50 | 0x22, // (
51 | 0x2d, // )
52 | 0x31, // *
53 | 0x2e|SHIFT, // +
54 | 0x10, // ,
55 | 0x23, // -
56 | 0x36|SHIFT, // .
57 | 0x37|SHIFT, // /
58 | 0x27|SHIFT, // 0
59 | 0x1e|SHIFT, // 1
60 | 0x1f|SHIFT, // 2
61 | 0x20|SHIFT, // 3
62 | 0x21|SHIFT, // 4
63 | 0x22|SHIFT, // 5
64 | 0x23|SHIFT, // 6
65 | 0x24|SHIFT, // 7
66 | 0x25|SHIFT, // 8
67 | 0x26|SHIFT, // 9
68 | 0x37, // :
69 | 0x36, // ;
70 | 0x32, // <
71 | 0x2e, // =
72 | 0x32|SHIFT, // >
73 | 0x10|SHIFT, // ?
74 | 0x27|ALT_GR, // @
75 | 0x14|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 | 0x33|SHIFT, // M
88 | 0x11|SHIFT, // N
89 | 0x12|SHIFT, // O
90 | 0x13|SHIFT, // P
91 | 0x04|SHIFT, // Q
92 | 0x15|SHIFT, // R
93 | 0x16|SHIFT, // S
94 | 0x17|SHIFT, // T
95 | 0x18|SHIFT, // U
96 | 0x19|SHIFT, // V
97 | 0x1d|SHIFT, // W
98 | 0x1b|SHIFT, // X
99 | 0x1c|SHIFT, // Y
100 | 0x1a|SHIFT, // Z
101 | 0x22|ALT_GR, // [
102 | 0x25|ALT_GR, // bslash
103 | 0x2d|ALT_GR, // ]
104 | 0x26|ALT_GR, // ^
105 | 0x25, // _
106 | 0x24|ALT_GR, // `
107 | 0x14, // 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 | 0x33, // m
120 | 0x11, // n
121 | 0x12, // o
122 | 0x13, // p
123 | 0x04, // q
124 | 0x15, // r
125 | 0x16, // s
126 | 0x17, // t
127 | 0x18, // u
128 | 0x19, // v
129 | 0x1d, // w
130 | 0x1b, // x
131 | 0x1c, // y
132 | 0x1a, // z
133 | 0x21|ALT_GR, // {
134 | 0x23|ALT_GR, // |
135 | 0x2e|ALT_GR, // }
136 | 0x1f|ALT_GR, // ~
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_hu_HU.cpp:
--------------------------------------------------------------------------------
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 | };
145 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_it_IT.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Italian keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_it_IT[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 | 0x34|ALT_GR, // #
46 | 0x21|SHIFT, // $
47 | 0x22|SHIFT, // %
48 | 0x23|SHIFT, // &
49 | 0x2d, // '
50 | 0x25|SHIFT, // (
51 | 0x26|SHIFT, // )
52 | 0x30|SHIFT, // *
53 | 0x30, // +
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 | 0x33|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 | 0x2f|ALT_GR, // [
102 | 0x35, // bslash
103 | 0x30|ALT_GR, // ]
104 | 0x2e|SHIFT, // ^
105 | 0x38|SHIFT, // _
106 | 0x00, // ` not in this layout
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 | 0x00, // { not supported (requires AltGr+Shift)
134 | 0x35|SHIFT, // |
135 | 0x00, // } not supported (requires AltGr+Shift)
136 | 0x00, // ~ not in this layout
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_pt_BR.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Brazilian Portuguese keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_pt_BR[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 | 0x35|SHIFT, // "
45 | 0x20|SHIFT, // #
46 | 0x21|SHIFT, // $
47 | 0x22|SHIFT, // %
48 | 0x24|SHIFT, // &
49 | 0x35, // '
50 | 0x26|SHIFT, // (
51 | 0x27|SHIFT, // )
52 | 0x25|SHIFT, // *
53 | 0x2E|SHIFT, // +
54 | 0x36, // ,
55 | 0x2D, // -
56 | 0x37, // .
57 | 0x14|ALT_GR, // /
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 | 0x38|SHIFT, // :
69 | 0x38, // ;
70 | 0x36|SHIFT, // <
71 | 0x2e, // =
72 | 0x37|SHIFT, // >
73 | 0x1a|ALT_GR, // ?
74 | 0x1f|SHIFT, // @
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 | 0x30, // [
102 | 0x32, // bslash
103 | 0x31, // ]
104 | 0x00, // ^ not supported (requires dead key + space)
105 | 0x2d|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 | 0x30|SHIFT, // {
134 | 0x32|SHIFT, // |
135 | 0x31|SHIFT, // }
136 | 0x00, // ~ not supported (requires dead key + space)
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_pt_PT.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Portuguese keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_pt_PT[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|SHIFT, // $
47 | 0x22|SHIFT, // %
48 | 0x23|SHIFT, // &
49 | 0x2d, // '
50 | 0x25|SHIFT, // (
51 | 0x26|SHIFT, // )
52 | 0x2f|SHIFT, // *
53 | 0x2f, // +
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 | 0x35, // 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 | 0x35|SHIFT, // |
135 | 0x27|ALT_GR, // }
136 | 0x00, // ~ not supported (requires dead key + space)
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/KeyboardLayout_sv_SE.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Swedish keyboard layout.
3 | */
4 |
5 | #include "KeyboardLayout.h"
6 |
7 | extern const uint8_t KeyboardLayout_sv_SE[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 | 0x2d|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 | 0x32|ALT_GR, // |
135 | 0x27|ALT_GR, // }
136 | 0x00, // ~ not supported (requires dead key + space)
137 | 0x00 // DEL
138 | };
139 |
--------------------------------------------------------------------------------
/src/Keyboard_da_DK.h:
--------------------------------------------------------------------------------
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
45 |
--------------------------------------------------------------------------------
/src/Keyboard_de_DE.h:
--------------------------------------------------------------------------------
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
46 |
--------------------------------------------------------------------------------
/src/Keyboard_es_ES.h:
--------------------------------------------------------------------------------
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
46 |
--------------------------------------------------------------------------------
/src/Keyboard_fr_FR.h:
--------------------------------------------------------------------------------
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
47 |
--------------------------------------------------------------------------------
/src/Keyboard_hu_HU.h:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard_hu_HU.h
3 |
4 | Copyright (c) 2023, Barab(0x34)si Rich(0x34)rd
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_ACUTE (136+0x2e)
38 | #define KEY_O_UMLAUT (136+0x27)
39 | #define KEY_O_DOUBLE_ACUTE (136+0x2f)
40 |
41 | #define KEY_U_ACUTE (136+0x30)
42 | #define KEY_U_UMLAUT (136+0x2d)
43 | #define KEY_U_DOUBLE_ACUTE (136+0x31)
44 |
45 | #define KEY_A_ACUTE (136+0x34)
46 |
47 | #define KEY_E_ACUTE (136+0x33)
48 |
49 | #define KEY_I_ACUTE (136+0x32)
50 |
51 | #endif
52 | #endif
53 |
--------------------------------------------------------------------------------
/src/Keyboard_it_IT.h:
--------------------------------------------------------------------------------
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
45 |
--------------------------------------------------------------------------------
/src/Keyboard_pt_BR.h:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard_pt_BR.h
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) any later version.
8 |
9 | This library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public
15 | License along with this library; if not, write to the Free Software
16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef KEYBOARD_PT_BR_h
20 | #define KEYBOARD_PT_BR_h
21 |
22 | #include "HID.h"
23 |
24 | #if !defined(_USING_HID)
25 |
26 | #warning "Using legacy HID core (non pluggable)"
27 |
28 | #else
29 |
30 | //================================================================================
31 | //================================================================================
32 | // Keyboard
33 |
34 | // pt_BR keys
35 | #define KEY_ACUTE (136+0x2f)
36 | #define KEY_C_CEDILLA (136+0x33)
37 | #define KEY_TILDE (136+0x34)
38 |
39 | #endif
40 | #endif
41 |
--------------------------------------------------------------------------------
/src/Keyboard_pt_PT.h:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard_pt_PT.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_PT_PT_h
22 | #define KEYBOARD_PT_PT_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 | // pt_PT keys
37 | #define KEY_LEFT_GUILLEMET (136+0x2e)
38 | #define KEY_ACUTE (136+0x30)
39 | #define KEY_C_CEDILLA (136+0x33)
40 | #define KEY_MASCULINE_ORDINAL (136+0x34)
41 | #define KEY_TILDE (136+0x31)
42 |
43 | #endif
44 | #endif
45 |
--------------------------------------------------------------------------------
/src/Keyboard_sv_SE.h:
--------------------------------------------------------------------------------
1 | /*
2 | Keyboard_sv_SE.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_SV_SE_h
22 | #define KEYBOARD_SV_SE_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 | // SV_SE keys
37 | #define KEY_A_RING (136+0x2f)
38 | #define KEY_A_UMLAUT (136+0x34)
39 | #define KEY_O_UMLAUT (136+0x33)
40 | #define KEY_UMLAUT (136+0x30)
41 | #define KEY_ACUTE_ACC (136+0x2e)
42 |
43 | #endif
44 | #endif
45 |
--------------------------------------------------------------------------------