You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply changes suggested by @per1234 on pull-request review:
- fix typo
- use common conventions for key names and key combinations
- reduce unnecessary verbosity.
Co-authored-by: per1234 <accounts@perglass.com>
Copy file name to clipboardExpand all lines: Language/Functions/USB/Keyboard/keyboardModifiers.adoc
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -20,37 +20,37 @@ When given a printable ASCII character as an argument, the functions `Keyboard.w
20
20
Keyboard.write('a'); // press and release the 'A' key
21
21
Keyboard.write('A'); // press Shift and 'A', then release both
22
22
----
23
-
A typical keyboard, however, has many keys that do not match a printable ASCII character. In order to simulate those keys, the library provides a set of macros that can be passed as arguments to `Keyboard.write()`, `Keyboard.press()` and `Keyboard.release()`. For example, the key combination Shift-F2 can be generated by:
23
+
A typical keyboard, however, has many keys that do not match a printable ASCII character. In order to simulate those keys, the library provides a set of macros that can be passed as arguments to `Keyboard.write()`, `Keyboard.press()` and `Keyboard.release()`. For example, the key combination Shift+F2 can be generated by:
24
24
[source,arduino]
25
25
----
26
26
Keyboard.press(KEY_LEFT_SHIFT); // press and hold Shift
27
27
Keyboard.press(KEY_F2); // press and hold F2
28
28
Keyboard.releaseAll(); // release both
29
29
----
30
-
Note that, in order to press multiple keys simultaneously, one has to use link:../keyboardpress[`Keyboard.press()`] rather than link:../keyboardwrite[`Keyboard.write()`], as the latter just “hits” the keys (it presses and immediate releases them).
30
+
Note that, in order to press multiple keys simultaneously, one has to use link:../keyboardpress[`Keyboard.press()`] rather than link:../keyboardwrite[`Keyboard.write()`], as the latter just “hits” the keys (it presses and immediately releases them).
31
31
[%hardbreaks]
32
32
The available macros are listed below:
33
33
34
34
[float]
35
35
=== Keyboard modifiers
36
-
These are eight keys within the alphanumeric cluster of the keyboard that are meant to modify the normal action of another key when the two are pressed in combination. Whereas Shift and AltGr are used to access extra characters, the others are mostly used for keyboard shortcuts.
36
+
These keys are meant to modify the normal action of another key when the two are pressed in combination.
37
37
38
38
|===
39
39
|Key |Hexadecimal value |Decimal value |Notes
40
40
41
41
|KEY_LEFT_CTRL |0x80 |128 |
42
42
|KEY_LEFT_SHIFT |0x81 |129 |
43
-
|KEY_LEFT_ALT |0x82 |130 |option (⌥) on Mac
44
-
|KEY_LEFT_GUI |0x83 |131 |OS logo, command (⌘) on Mac
43
+
|KEY_LEFT_ALT |0x82 |130 |Option (⌥) on Mac
44
+
|KEY_LEFT_GUI |0x83 |131 |OS logo, Command (⌘) on Mac
45
45
|KEY_RIGHT_CTRL |0x84 |132 |
46
46
|KEY_RIGHT_SHIFT |0x85 |133 |
47
-
|KEY_RIGHT_ALT |0x86 |134 |also AltGr, option (⌥) on Mac
48
-
|KEY_RIGHT_GUI |0x87 |135 |OS logo, command (⌘) on Mac
47
+
|KEY_RIGHT_ALT |0x86 |134 |also AltGr, Option (⌥) on Mac
48
+
|KEY_RIGHT_GUI |0x87 |135 |OS logo, Command (⌘) on Mac
49
49
|===
50
50
51
51
[float]
52
52
=== Special keys
53
-
These are all the keys that do not match a printable ASCII character and are not modifiers, including all keys outside the alphanumeric cluster.
53
+
These are all the keys that do not match a printable ASCII character and are not modifiers.
54
54
55
55
[float]
56
56
==== Within the alphanumeric cluster
@@ -84,7 +84,7 @@ These are all the keys that do not match a printable ASCII character and are not
84
84
85
85
[float]
86
86
==== Escape and function keys
87
-
The library can simulate function keys up to F24, even though few keyboards have the F13… F24 keys.
0 commit comments