Skip to content

Commit a5a81be

Browse files
author
Spacehuhn
committed
Added Numpad Keys
1 parent 0914c29 commit a5a81be

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ save-commands.json
3838
*.bin
3939
*.zip
4040
.DS_Store
41+
42+
*.hex
43+
44+
*.uf2

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
+ [Standard Keys](#standard-keys)
2626
+ [Modifier Keys](#modifier-keys)
2727
+ [Other Keys](#other-keys)
28+
+ [Numpad Keys](#numpad-keys)
2829
+ [Examples](#examples)
2930
* [CLI Commands](#cli-commands)
3031
+ [General](#general)
@@ -361,6 +362,17 @@ It's compatible to Ducky Script, which was developed by the wonderful people at
361362
| `PRINTSCREEN` |
362363
| `SCROLLLOCK` |
363364

365+
### Numpad Keys
366+
367+
| Key |
368+
| --- |
369+
| `NUM_0` - `NUM_9` |
370+
| `NUM_ASTERIX` |
371+
| `NUM_ENTER` |
372+
| `NUM_MINUS` |
373+
| `NUM_DOT` |
374+
| `NUM_PLUS` |
375+
364376
### Examples
365377

366378
```

atmega_duck/duckparser.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,23 @@ namespace duckparser {
7373
else if (compare(str, len, "PRINTSCREEN", CASE_SENSETIVE)) keyboard::pressKey(KEY_SYSRQ);
7474
else if (compare(str, len, "SCROLLLOCK", CASE_SENSETIVE)) keyboard::pressKey(KEY_SCROLLLOCK);
7575

76+
// NUMPAD KEYS
77+
else if (compare(str, len, "NUM_0", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP0);
78+
else if (compare(str, len, "NUM_1", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP1);
79+
else if (compare(str, len, "NUM_2", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP2);
80+
else if (compare(str, len, "NUM_3", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP3);
81+
else if (compare(str, len, "NUM_4", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP4);
82+
else if (compare(str, len, "NUM_5", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP5);
83+
else if (compare(str, len, "NUM_6", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP6);
84+
else if (compare(str, len, "NUM_7", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP7);
85+
else if (compare(str, len, "NUM_8", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP8);
86+
else if (compare(str, len, "NUM_9", CASE_SENSETIVE)) keyboard::pressKey(KEY_KP9);
87+
else if (compare(str, len, "NUM_ASTERIX", CASE_SENSETIVE)) keyboard::pressKey(KEY_KPASTERISK);
88+
else if (compare(str, len, "NUM_ENTER", CASE_SENSETIVE)) keyboard::pressKey(KEY_KPENTER);
89+
else if (compare(str, len, "NUM_MINUS", CASE_SENSETIVE)) keyboard::pressKey(KEY_KPMINUS);
90+
else if (compare(str, len, "NUM_DOT", CASE_SENSETIVE)) keyboard::pressKey(KEY_KPDOT);
91+
else if (compare(str, len, "NUM_PLUS", CASE_SENSETIVE)) keyboard::pressKey(KEY_KPPLUS);
92+
7693
// Modifiers
7794
else if (compare(str, len, "CTRL", CASE_SENSETIVE) || compare(str, len, "CONTROL", CASE_SENSETIVE)) keyboard::pressModifier(KEY_MOD_LCTRL);
7895
else if (compare(str, len, "SHIFT", CASE_SENSETIVE)) keyboard::pressModifier(KEY_MOD_LSHIFT);

web/index.html

+28
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,34 @@ <h3>Other Keys</h3>
268268
</tr>
269269
</tbody>
270270
</table>
271+
<h3>Numpad Keys</h3>
272+
<table>
273+
<thead>
274+
<tr>
275+
<th>Key</th>
276+
</tr>
277+
</thead>
278+
<tbody>
279+
<tr>
280+
<td><code>NUM_0</code> - <code>NUM_9</code></td>
281+
</tr>
282+
<tr>
283+
<td><code>NUM_ASTERIX</code></td>
284+
</tr>
285+
<tr>
286+
<td><code>NUM_ENTER</code></td>
287+
</tr>
288+
<tr>
289+
<td><code>NUM_MINUS</code></td>
290+
</tr>
291+
<tr>
292+
<td><code>NUM_DOT</code></td>
293+
</tr>
294+
<tr>
295+
<td><code>NUM_PLUS</code></td>
296+
</tr>
297+
</tbody>
298+
</table>
271299
</section>
272300
</main>
273301
<footer>

0 commit comments

Comments
 (0)