Skip to content

Commit 80c6fba

Browse files
filterpaperzvecr
andauthored
[Keyboard] Clean up contra & move to data-driven (qmk#19973)
Co-authored-by: Joel Challis <[email protected]>
1 parent f639089 commit 80c6fba

File tree

7 files changed

+135
-73
lines changed

7 files changed

+135
-73
lines changed

keyboards/contra/config.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

keyboards/contra/contra.c

Lines changed: 0 additions & 1 deletion
This file was deleted.

keyboards/contra/contra.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

keyboards/contra/info.json

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,135 @@
33
"manufacturer": "Cartel",
44
"url": "",
55
"maintainer": "qmk",
6+
"features": {
7+
"bootmagic": true,
8+
"extrakey": true,
9+
"mousekey": true,
10+
"nkro": true
11+
},
612
"usb": {
713
"vid": "0x4354",
814
"pid": "0x0001",
915
"device_version": "0.0.1"
1016
},
1117
"processor": "atmega32u4",
1218
"bootloader": "caterina",
19+
"diode_direction": "COL2ROW",
20+
"matrix_pins": {
21+
"cols": ["F4", "F5", "B5", "B4", "E6", "D7", "C6", "D4", "D0", "D1", "D2", "D3"],
22+
"rows": ["F6", "B3", "B2", "B6"]
23+
},
1324
"community_layouts": ["planck_mit", "ortho_4x12"],
1425
"layouts": {
1526
"LAYOUT_ortho_4x12": {
16-
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"&dArr;", "x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"label":"&uArr;", "x":7, "y":3}, {"label":"&larr;", "x":8, "y":3}, {"label":"&darr;", "x":9, "y":3}, {"label":"&uarr;", "x":10, "y":3}, {"label":"&rarr;", "x":11, "y":3}]
27+
"layout": [
28+
{"label":"Tab", "matrix": [0, 0], "x":0, "y":0},
29+
{"label":"Q", "matrix": [0, 1], "x":1, "y":0},
30+
{"label":"W", "matrix": [0, 2], "x":2, "y":0},
31+
{"label":"E", "matrix": [0, 3], "x":3, "y":0},
32+
{"label":"R", "matrix": [0, 4], "x":4, "y":0},
33+
{"label":"T", "matrix": [0, 5], "x":5, "y":0},
34+
{"label":"Y", "matrix": [0, 6], "x":6, "y":0},
35+
{"label":"U", "matrix": [0, 7], "x":7, "y":0},
36+
{"label":"I", "matrix": [0, 8], "x":8, "y":0},
37+
{"label":"O", "matrix": [0, 9], "x":9, "y":0},
38+
{"label":"P", "matrix": [0, 10], "x":10, "y":0},
39+
{"label":"BackSpace", "matrix": [0, 11], "x":11, "y":0},
40+
41+
{"label":"Esc", "matrix": [1, 0], "x":0, "y":1},
42+
{"label":"A", "matrix": [1, 1], "x":1, "y":1},
43+
{"label":"S", "matrix": [1, 2], "x":2, "y":1},
44+
{"label":"D", "matrix": [1, 3], "x":3, "y":1},
45+
{"label":"F", "matrix": [1, 4], "x":4, "y":1},
46+
{"label":"G", "matrix": [1, 5], "x":5, "y":1},
47+
{"label":"H", "matrix": [1, 6], "x":6, "y":1},
48+
{"label":"J", "matrix": [1, 7], "x":7, "y":1},
49+
{"label":"K", "matrix": [1, 8], "x":8, "y":1},
50+
{"label":"L", "matrix": [1, 9], "x":9, "y":1},
51+
{"label":";", "matrix": [1, 10], "x":10, "y":1},
52+
{"label":"'", "matrix": [1, 11], "x":11, "y":1},
53+
54+
{"label":"Shift", "matrix": [2, 0], "x":0, "y":2},
55+
{"label":"Z", "matrix": [2, 1], "x":1, "y":2},
56+
{"label":"X", "matrix": [2, 2], "x":2, "y":2},
57+
{"label":"C", "matrix": [2, 3], "x":3, "y":2},
58+
{"label":"V", "matrix": [2, 4], "x":4, "y":2},
59+
{"label":"B", "matrix": [2, 5], "x":5, "y":2},
60+
{"label":"N", "matrix": [2, 6], "x":6, "y":2},
61+
{"label":"M", "matrix": [2, 7], "x":7, "y":2},
62+
{"label":",", "matrix": [2, 8], "x":8, "y":2},
63+
{"label":".", "matrix": [2, 9], "x":9, "y":2},
64+
{"label":"/", "matrix": [2, 10], "x":10, "y":2},
65+
{"label":"Return", "matrix": [2, 11], "x":11, "y":2},
66+
67+
{"matrix": [3, 0], "x":0, "y":3},
68+
{"label":"Ctrl", "matrix": [3, 1], "x":1, "y":3},
69+
{"label":"Alt", "matrix": [3, 2], "x":2, "y":3},
70+
{"label":"Super", "matrix": [3, 3], "x":3, "y":3},
71+
{"label":"&dArr;", "matrix": [3, 4], "x":4, "y":3},
72+
{"matrix": [3, 5], "x":5, "y":3},
73+
{"matrix": [3, 6], "x":6, "y":3},
74+
{"label":"&uArr;", "matrix": [3, 7], "x":7, "y":3},
75+
{"label":"&larr;", "matrix": [3, 8], "x":8, "y":3},
76+
{"label":"&darr;", "matrix": [3, 9], "x":9, "y":3},
77+
{"label":"&uarr;", "matrix": [3, 10], "x":10, "y":3},
78+
{"label":"&rarr;", "matrix": [3, 11], "x":11, "y":3}
79+
]
1780
},
1881

1982
"LAYOUT_planck_mit": {
20-
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"&dArr;", "x":4, "y":3}, {"x":5, "y":3, "w":2}, {"label":"&uArr;", "x":7, "y":3}, {"label":"&larr;", "x":8, "y":3}, {"label":"&darr;", "x":9, "y":3}, {"label":"&uarr;", "x":10, "y":3}, {"label":"&rarr;", "x":11, "y":3}]
83+
"layout": [
84+
{"label":"Tab", "matrix": [0, 0], "x":0, "y":0},
85+
{"label":"Q", "matrix": [0, 1], "x":1, "y":0},
86+
{"label":"W", "matrix": [0, 2], "x":2, "y":0},
87+
{"label":"E", "matrix": [0, 3], "x":3, "y":0},
88+
{"label":"R", "matrix": [0, 4], "x":4, "y":0},
89+
{"label":"T", "matrix": [0, 5], "x":5, "y":0},
90+
{"label":"Y", "matrix": [0, 6], "x":6, "y":0},
91+
{"label":"U", "matrix": [0, 7], "x":7, "y":0},
92+
{"label":"I", "matrix": [0, 8], "x":8, "y":0},
93+
{"label":"O", "matrix": [0, 9], "x":9, "y":0},
94+
{"label":"P", "matrix": [0, 10], "x":10, "y":0},
95+
{"label":"BackSpace", "matrix": [0, 11], "x":11, "y":0},
96+
97+
{"label":"Esc", "matrix": [1, 0], "x":0, "y":1},
98+
{"label":"A", "matrix": [1, 1], "x":1, "y":1},
99+
{"label":"S", "matrix": [1, 2], "x":2, "y":1},
100+
{"label":"D", "matrix": [1, 3], "x":3, "y":1},
101+
{"label":"F", "matrix": [1, 4], "x":4, "y":1},
102+
{"label":"G", "matrix": [1, 5], "x":5, "y":1},
103+
{"label":"H", "matrix": [1, 6], "x":6, "y":1},
104+
{"label":"J", "matrix": [1, 7], "x":7, "y":1},
105+
{"label":"K", "matrix": [1, 8], "x":8, "y":1},
106+
{"label":"L", "matrix": [1, 9], "x":9, "y":1},
107+
{"label":";", "matrix": [1, 10], "x":10, "y":1},
108+
{"label":"'", "matrix": [1, 11], "x":11, "y":1},
109+
110+
{"label":"Shift", "matrix": [2, 0], "x":0, "y":2},
111+
{"label":"Z", "matrix": [2, 1], "x":1, "y":2},
112+
{"label":"X", "matrix": [2, 2], "x":2, "y":2},
113+
{"label":"C", "matrix": [2, 3], "x":3, "y":2},
114+
{"label":"V", "matrix": [2, 4], "x":4, "y":2},
115+
{"label":"B", "matrix": [2, 5], "x":5, "y":2},
116+
{"label":"N", "matrix": [2, 6], "x":6, "y":2},
117+
{"label":"M", "matrix": [2, 7], "x":7, "y":2},
118+
{"label":",", "matrix": [2, 8], "x":8, "y":2},
119+
{"label":".", "matrix": [2, 9], "x":9, "y":2},
120+
{"label":"/", "matrix": [2, 10], "x":10, "y":2},
121+
{"label":"Return", "matrix": [2, 11], "x":11, "y":2},
122+
123+
{"matrix": [3, 0], "x":0, "y":3},
124+
{"label":"Ctrl", "matrix": [3, 1], "x":1, "y":3},
125+
{"label":"Alt", "matrix": [3, 2], "x":2, "y":3},
126+
{"label":"Super", "matrix": [3, 3], "x":3, "y":3},
127+
{"label":"&dArr;", "matrix": [3, 4], "x":4, "y":3},
128+
{"matrix": [3, 5], "x":5, "y":3},
129+
{"label":"&uArr;", "matrix": [3, 7], "x":7, "y":3},
130+
{"label":"&larr;", "matrix": [3, 8], "x":8, "y":3},
131+
{"label":"&darr;", "matrix": [3, 9], "x":9, "y":3},
132+
{"label":"&uarr;", "matrix": [3, 10], "x":10, "y":3},
133+
{"label":"&rarr;", "matrix": [3, 11], "x":11, "y":3}
134+
]
21135
}
22136
}
23137
}

keyboards/contra/keymaps/default/config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright QMK Community
2+
// SPDX-License-Identifier: GPL-2.0+
3+
14
#pragma once
25

36

keyboards/contra/readme.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
CONTRA
2-
======
1+
# Contra
32

4-
![CONTRA](https://cartel.ltd/wp-content/uploads/2018/01/img_3209.jpg)
3+
Contra is a low cost 40% keyboard.
54

6-
A 40% keyboard by [CARTEL](https://cartel.ltd/)
7-
8-
Keyboard Maintainer: The QMK Community
9-
Hardware Supported: CONTRA
10-
Hardware Availability: [CARTEL](https://cartel.ltd/projects/contra/)
5+
* Keyboard Maintainer: The QMK Community
6+
* Hardware Supported: [Contra](https://github.com/ai03-2725/Contra)
7+
* Hardware Availability: PCB sold by various vendors
118

129
Make example for this keyboard (after setting up your build environment):
1310

14-
make contra:dana
11+
make contra:default
12+
13+
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
14+
15+
## Bootloader
16+
17+
Enter the bootloader in 3 ways:
1518

16-
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
19+
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is configured.
20+
* **Physical reset button**: Briefly press the reset button soldered on the PCB.
21+
* **Bootmagic reset**: Hold down the top left key and plug in the controller.

keyboards/contra/rules.mk

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1 @@
1-
# Build Options
2-
# change yes to no to disable
3-
#
4-
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
5-
MOUSEKEY_ENABLE = yes # Mouse keys
6-
EXTRAKEY_ENABLE = yes # Audio control and System control
7-
CONSOLE_ENABLE = no # Console for debug
8-
COMMAND_ENABLE = no # Commands for debug and configuration
9-
NKRO_ENABLE = yes # Enable N-Key Rollover
10-
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11-
AUDIO_ENABLE = no # Audio output
12-
13-
LAYOUTS_HAS_RGB = no
14-
15-
# Disable unsupported hardware
16-
RGBLIGHT_SUPPORTED = no
17-
AUDIO_SUPPORTED = no
18-
BACKLIGHT_SUPPORTED = no
1+
# This file intentionally left blank

0 commit comments

Comments
 (0)