-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlanguage_mapping.ino
47 lines (38 loc) · 1.05 KB
/
language_mapping.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <Keyboard.h>
// This script will dump a python dictionary which contains
// keymap scancodes to characters.
// I didn't escape before ' and \ (since that's keymap dependant, so do that before, depending on the keymap, some more cleanup will be nessecary (like fixing ' that were deleted by DEL keycode, etc...
// Program your BeetleBadUSB with this, select the keyboard layout you want to use, focus on a text editor and plug in the stick.
void setup(){
Keyboard.begin();
delay(5000);
Keyboard.print("keymap = {\n");
delay(30);
for ( int i=32; i <= 190; i++ )
{
Keyboard.print(" ");
delay(30);
Keyboard.print("'");
delay(30);
Keyboard.print(i);
delay(30);
Keyboard.print("'");
delay(30);
Keyboard.print(":");
delay(30);
Keyboard.print("'");
delay(30);
Keyboard.write(i);
delay(30);
Keyboard.print("'");
delay(30);
Keyboard.print(",");
delay(30);
Keyboard.print("\n");
delay(30);
}
Keyboard.print("}");
delay(30);
Keyboard.end();
}
void loop(){}