forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preset_generator.sh
69 lines (69 loc) · 1.85 KB
/
preset_generator.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#/bin/bash
# {
# "version": 1,
# "keyboard": {
# "keys": [{
# "id": 0,
# "legend": "Tab",
# "state": {
# "x": 0,
# "y": 0,
# "r": 0,
# "rx": 0,
# "ry": 0,
# "w": 1,
# "h": 1,
# "x2": 0,
# "y2": 0,
# "w2": 0,
# "h2": 0,
# "a": 7
# },
# "row": 0,
# "col": 0,
# "keycodes": [{
# "id": "KC_TAB",
# "fields": []
# }]
# }],
# "controller": 1,
# "bounds": {
# "min": {
# "x": 0,
# "y": 0
# },
# "max": {
# "x": 12,
# "y": 4
# }
# },
# "rows": 4,
# "cols": 12,
# "pins": {
# "row": ["D0", "D5", "B5", "B6"],
# "col": ["F1", "F0", "B0", "C7", "F4", "F5", "F6", "F7", "D4", "D6", "B4", "D7"],
# "num": null,
# "caps": null,
# "scroll": null,
# "compose": null,
# "kana": null,
# "led": "B7",
# "rgb": null
# },
# "macros": {},
# "quantum": "void matrix_init_user(void) {\n}\n\nvoid matrix_scan_user(void) {\n}\n\nbool process_record_user(uint16_t keycode, keyrecord_t *record) {\n\treturn true;\n}",
# "settings": {
# "diodeDirection": 0,
# "name": "Planck Default",
# "bootloaderSize": 2,
# "rgbNum": 0,
# "backlightLevels": 3
# }
# }
# }
keyboard=$1
subproject=$2
keymap=$(gcc -fpreprocessed -dD -E keyboards/$keyboard/default/keymap.c)
printf '{
"version": 1,
"keyboard": {