Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8cb5288

Browse files
authored
Merge pull request #881 from edgar-bonet/kbd-release
Sync Keyboard documentation with latest release
2 parents 94e0971 + d50b693 commit 8cb5288

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

‎Language/Functions/USB/Keyboard/keyboardBegin.adoc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ When used with a Leonardo or Due board, `Keyboard.begin()` starts emulating a ke
3333
=== Keyboard layouts
3434
Currently, the library supports the following national keyboard layouts:
3535

36+
* `KeyboardLayout_da_DK`: Denmark
3637
* `KeyboardLayout_de_DE`: Germany
3738
* `KeyboardLayout_en_US`: USA
3839
* `KeyboardLayout_es_ES`: Spain
3940
* `KeyboardLayout_fr_FR`: France
4041
* `KeyboardLayout_it_IT`: Italy
42+
* `KeyboardLayout_sv_SE`: Sweden
4143

4244

4345
[float]

‎Language/Functions/USB/Keyboard/keyboardModifiers.adoc‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ These are all the keys that do not match a printable ASCII character and are not
6262
|KEY_CAPS_LOCK |0xC1 |193
6363
|KEY_BACKSPACE |0xB2 |178
6464
|KEY_RETURN |0xB0 |176
65+
|KEY_MENU |0xED |237
6566
|===
6667

6768
[float]
@@ -82,6 +83,31 @@ These are all the keys that do not match a printable ASCII character and are not
8283
|KEY_RIGHT_ARROW |0xD7 |215
8384
|===
8485

86+
[float]
87+
==== Numeric keypad
88+
89+
|===
90+
|Key |Hexadecimal value |Decimal value
91+
92+
|KEY_NUM_LOCK |0xDB |219
93+
|KEY_KP_SLASH |0xDC |220
94+
|KEY_KP_ASTERISK |0xDD |221
95+
|KEY_KP_MINUS |0xDE |222
96+
|KEY_KP_PLUS |0xDF |223
97+
|KEY_KP_ENTER |0xE0 |224
98+
|KEY_KP_1 |0xE1 |225
99+
|KEY_KP_2 |0xE2 |226
100+
|KEY_KP_3 |0xE3 |227
101+
|KEY_KP_4 |0xE4 |228
102+
|KEY_KP_5 |0xE5 |229
103+
|KEY_KP_6 |0xE6 |230
104+
|KEY_KP_7 |0xE7 |231
105+
|KEY_KP_8 |0xE8 |232
106+
|KEY_KP_9 |0xE9 |233
107+
|KEY_KP_0 |0xEA |234
108+
|KEY_KP_DOT |0xEB |235
109+
|===
110+
85111
[float]
86112
==== Escape and function keys
87113
The library can simulate function keys up to F24.
@@ -116,5 +142,37 @@ The library can simulate function keys up to F24.
116142
|KEY_F24 |0xFB |251
117143
|===
118144

145+
[float]
146+
==== Function control keys
147+
These are three keys that sit above the navigation cluster.
148+
149+
|===
150+
|Key |Hexadecimal value |Decimal value |Notes
151+
152+
|KEY_PRINT_SCREEN |0xCE |206 |Print Screen or PrtSc / SysRq
153+
|KEY_SCROLL_LOCK |0xCF |207 |
154+
|KEY_PAUSE |0xD0 |208 |Pause / Break
155+
|===
156+
157+
[float]
158+
==== International keyboard layouts
159+
160+
Some national layouts define extra keys. For example, the Swedish and Danish layouts define `KEY_A_RING` as `0xB7`, which is the key to the right of "P", labeled "Å" on those layouts and "{"/"[" on the US layout. In order to use those definitions, one has to include the proper Keyboard_*.h file. For example:
161+
162+
[source,arduino]
163+
----
164+
#include <Keyboard.h>
165+
#include <Keyboard_sv_SE.h> // extra key definitions from Swedish layout
166+
167+
void setup() {
168+
Keyboard.begin(KeyboardLayout_sv_SE); // use the Swedish layout
169+
Keyboard.write(KEY_A_RING);
170+
}
171+
172+
void loop() {} // do-nothing loop
173+
----
174+
175+
For the list of layout-specific key definitions, see the respective Keyboard_*.h file within the library sources.
176+
119177
--
120178
// OVERVIEW SECTION ENDS

0 commit comments

Comments
(0)

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