aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-06-10 22:18:17 -0400
committerGitHub <noreply@github.com>2017-06-10 22:18:17 -0400
commitc22a400603bfafedefa04c430214965cd191663b (patch)
tree8f5b644b88ba59fa121bba1068f0a360dabf2f44 /keyboards
parentb721779241d91ef46279fcaae447aa8eacb75422 (diff)
parentb1e01e9d1ffcc6ca0803f30c09d3eebe6a90186b (diff)
downloadqmk_firmware-c22a400603bfafedefa04c430214965cd191663b.tar.gz
qmk_firmware-c22a400603bfafedefa04c430214965cd191663b.zip
Merge pull request #1384 from geofflane/keyboard_s65x
Support Sentraq S65-X
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/s65_x/Makefile3
-rw-r--r--keyboards/s65_x/config.h55
-rw-r--r--keyboards/s65_x/keymaps/default/keymap.c222
-rw-r--r--keyboards/s65_x/keymaps/default/readme.md27
-rw-r--r--keyboards/s65_x/readme.md82
-rw-r--r--keyboards/s65_x/rules.mk67
-rw-r--r--keyboards/s65_x/s65_x.c30
-rw-r--r--keyboards/s65_x/s65_x.h25
8 files changed, 511 insertions, 0 deletions
diff --git a/keyboards/s65_x/Makefile b/keyboards/s65_x/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/s65_x/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/s65_x/config.h b/keyboards/s65_x/config.h
new file mode 100644
index 000000000..0af9f6dd1
--- /dev/null
+++ b/keyboards/s65_x/config.h
@@ -0,0 +1,55 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define PRODUCT S65-X-RGB
8#define DESCRIPTION q.m.k. keyboard firmware for S60-X RGB
9#define VENDOR_ID 0xFEED
10#define PRODUCT_ID 0x6060
11#define DEVICE_VER 0x0001
12#define MANUFACTURER Sentraq
13
14/* key matrix size */
15#define MATRIX_ROWS 5
16#define MATRIX_COLS 18
17
18/* key matrix pins */
19#define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 }
20#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 }
21#define UNUSED_PINS
22
23/* number of backlight levels */
24#define BACKLIGHT_PIN B7
25#define BACKLIGHT_LEVELS 3
26
27#define RGB_DI_PIN D3
28#define RGBLIGHT_ANIMATIONS
29#define RGBLED_NUM 20
30#define RGBLIGHT_HUE_STEP 8
31#define RGBLIGHT_SAT_STEP 8
32#define RGBLIGHT_VAL_STEP 8
33
34/* COL2ROW or ROW2COL */
35#define DIODE_DIRECTION COL2ROW
36
37/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
38#define DEBOUNCING_DELAY 5
39
40/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
41#define LOCKING_SUPPORT_ENABLE
42
43/* Locking resynchronize hack */
44#define LOCKING_RESYNC_ENABLE
45
46/* key combination for command */
47#define IS_COMMAND() ( \
48 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
49)
50
51
52/* prevent stuck modifiers */
53#define PREVENT_STUCK_MODIFIERS
54
55#endif
diff --git a/keyboards/s65_x/keymaps/default/keymap.c b/keyboards/s65_x/keymaps/default/keymap.c
new file mode 100644
index 000000000..c0737c11b
--- /dev/null
+++ b/keyboards/s65_x/keymaps/default/keymap.c
@@ -0,0 +1,222 @@
1#include "s65_x.h"
2#include "action_layer.h"
3
4#define _BL 0
5#define _AL 1
6#define _FL 2
7#define _UL 3
8
9const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
10 /* 0: Main layer, swapped alt and GUI for Mac
11 * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
12 * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
13 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
14 * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│END │
15 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
16 * │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│
17 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
18 * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
19 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
20 * │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
21 * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
22 */
23
24 /* 0: ANSI qwerty */
25 [_BL] = ANSI_KEYMAP(
26 F(3), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
27 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
28 F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
29 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
30 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
31
32
33 /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys
34 * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
35 * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │
36 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
37 * │ │ │ Up │ │ │ │ │ │ │ │ │ │ │ │█████│ │
38 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
39 * │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ │
40 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
41 * │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ │
42 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
43 * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │
44 * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
45 */
46
47 [_AL] = ANSI_KEYMAP(
48 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
49 KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
50 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
51 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
52 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
53
54 /* 2: Fn layer
55 * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
56 * │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │
57 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
58 * │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ │
59 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
60 * │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │█████│ │
61 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
62 * │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│Vol+ │█████│ │
63 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
64 * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │Mute │Vol- │Play │ │
65 * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
66 */
67
68 [_FL] = ANSI_KEYMAP(
69 KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \
70 KC_TRNS, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \
71 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, \
72 KC_TRNS, KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, \
73 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY, KC_TRNS),
74
75 /* 3: Locking layer for controlling the underglow
76 * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
77 * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │
78 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
79 * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│ │
80 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
81 * │ │ On │Mode │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ │
82 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
83 * │ │▒▒▒▒▒│ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │█████│ │
84 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
85 * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │
86 * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
87 */
88
89 [_UL] = ANSI_KEYMAP(
90 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
91 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
92 KC_TRNS, F(4), F(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
93 KC_TRNS, KC_TRNS, F(6), F(7), F(8), F(9), F(10), F(11), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
94 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
95};
96
97enum function_id {
98 RGBLED_TOGGLE,
99 RGBLED_STEP_MODE,
100 RGBLED_INCREASE_HUE,
101 RGBLED_DECREASE_HUE,
102 RGBLED_INCREASE_SAT,
103 RGBLED_DECREASE_SAT,
104 RGBLED_INCREASE_VAL,
105 RGBLED_DECREASE_VAL,
106 SHIFT_ESC,
107};
108
109const uint16_t PROGMEM fn_actions[] = {
110 [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay
111 [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay
112 [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer
113 [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay
114 [4] = ACTION_FUNCTION(RGBLED_TOGGLE), // Turn on/off underglow
115 [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
116 [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
117 [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
118 [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
119 [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
120 [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
121 [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
122 [12] = ACTION_FUNCTION(SHIFT_ESC),
123};
124
125void matrix_scan_user(void) {
126
127 /* uint32_t layer = layer_state; */
128 /* if (layer & (1<<1)) { */
129 /* gh60_wasd_leds_on(); */
130 /* } else { */
131 /* gh60_wasd_leds_off(); */
132 /* } */
133 /* */
134 /* if (layer & (1<<2)) { */
135 /* gh60_esc_led_on(); */
136 /* } else { */
137 /* gh60_esc_led_off(); */
138 /* } */
139};
140
141const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
142 // MACRODOWN only works in this function
143 switch(id) {
144 case 0:
145 if (record->event.pressed) {
146 register_code(KC_RSFT);
147 } else {
148 unregister_code(KC_RSFT);
149 }
150 break;
151 }
152 return MACRO_NONE;
153};
154
155#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
156void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
157 switch (id) {
158 case RGBLED_TOGGLE:
159 //led operations
160 if (record->event.pressed) {
161 rgblight_toggle();
162 }
163 break;
164 case RGBLED_INCREASE_HUE:
165 if (record->event.pressed) {
166 rgblight_increase_hue();
167 }
168 break;
169 case RGBLED_DECREASE_HUE:
170 if (record->event.pressed) {
171 rgblight_decrease_hue();
172 }
173 break;
174 case RGBLED_INCREASE_SAT:
175 if (record->event.pressed) {
176 rgblight_increase_sat();
177 }
178 break;
179 case RGBLED_DECREASE_SAT:
180 if (record->event.pressed) {
181 rgblight_decrease_sat();
182 }
183 break;
184 case RGBLED_INCREASE_VAL:
185 if (record->event.pressed) {
186 rgblight_increase_val();
187 }
188 break;
189 case RGBLED_DECREASE_VAL:
190 if (record->event.pressed) {
191 rgblight_decrease_val();
192 }
193 break;
194 case RGBLED_STEP_MODE:
195 if (record->event.pressed) {
196 rgblight_step();
197 }
198 break;
199 static uint8_t shift_esc_shift_mask;
200 // Shift + ESC = ~
201 case SHIFT_ESC:
202 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
203 if (record->event.pressed) {
204 if (shift_esc_shift_mask) {
205 add_key(KC_GRV);
206 send_keyboard_report();
207 } else {
208 add_key(KC_ESC);
209 send_keyboard_report();
210 }
211 } else {
212 if (shift_esc_shift_mask) {
213 del_key(KC_GRV);
214 send_keyboard_report();
215 } else {
216 del_key(KC_ESC);
217 send_keyboard_report();
218 }
219 }
220 break;
221 }
222};
diff --git a/keyboards/s65_x/keymaps/default/readme.md b/keyboards/s65_x/keymaps/default/readme.md
new file mode 100644
index 000000000..c180ffdf9
--- /dev/null
+++ b/keyboards/s65_x/keymaps/default/readme.md
@@ -0,0 +1,27 @@
1### 1 ANSI
2A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys.
3
4#### 1.0 Default layer
5 ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
6 │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
7 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
8 │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│END │
9 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
10 │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│
11 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
12 │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
13 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
14 │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
15 └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
16#### 1.1 Fn layer
17 ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
18 │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │
19 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
20 │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ │
21 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
22 │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │█████│ │
23 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
24 │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│Vol+ │█████│ │
25 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
26 │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │Mute │Vol- │Play │ │
27 └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/s65_x/readme.md b/keyboards/s65_x/readme.md
new file mode 100644
index 000000000..e086a2056
--- /dev/null
+++ b/keyboards/s65_x/readme.md
@@ -0,0 +1,82 @@
1S65-x keyboard firmware
2======================
3DIY 65% keyboard from Sentraq.
4
5## S65X Resources
6- [Sentraq page](https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914)
7
8## Flashing your keyboard
9The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows).
10
11[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S65-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk.
12
13**Programming the firmware (Windows)**
14
151. download and install FLIP (http://www.atmel.com/tools/FLIP.aspx)
162. connect the keyboard, press the program button on the underside of the board (S1) and wait until it enumerates (you'll hear the "disconnect" and "connect" sound)
173. go to device manager, find the atmega32u4 chip and click "update driver"
184. choose location manually: folder named "usb" inside the installation directory of FLIP
195. once the driver is installed, run flip
206. Device -> Select: choose ATMega32U4
217. Settings -> Communication -> USB, FLIP should show the signature at this point (58 1E 95 87)
228. File -> Load HEX file: choose the hex firmware: <firmware>.hex
239. click "Run"
2410. after programming is done, disconnect the device from USB and connect again.
25
26
27**Programming the firmware (Linux/Mac)**
28
291. Download and install/compile/unpack dfu-programmer from http://dfu-programmer.sourceforge.net/.
302. Issue the following commands in the command prompt after connecting the device and pressing the programming button (S1). You may need root permissions or udev rules to do that.
31 1. `sudo dfu-programmer atmega32u4 erase`
32 2. `sudo dfu-programmer atmega32u4 flash <firmware>.hex`
33 3. `sudo dfu-programmer atmega32u4 start`
343. The keyboard should start working. If it doesn't, reconnect the cable.
35
36## Building the firmware
37
38To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
39
40 $ make default
41
42For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started).
43
44## Keymaps
45
46Currently only an ANSI keymap is provided, hopefully others will contribute theirs.
47
48### 0 Initial explanations
49The █████ blocks on the layouts hides the switch positions that do not exist physically on the PCB. If you feel like hacking the keyboard and adding new keys, those are the positions that can be used. You'll have to modify the [keymap_common.h](keymap_common.h) file for that.
50
51The ▒▒▒▒▒ blocks hides switch positions not used on this particular layout, but they do exist on the PCB.
52
53There is no LED support on the PCB at the moment, but I'll let the code for that untouched.
54
55
56### 1 [Standard - ANSI (default layout)](keymaps/default/keymap.c)
57
58#### 1.0 Default layer
59 ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
60 │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
61 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
62 │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│END │
63 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
64 │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│
65 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
66 │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
67 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
68 │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
69 └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
70#### 1.1 Fn layer
71 ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
72 │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │
73 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
74 │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ │
75 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
76 │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │█████│ │
77 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
78 │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│Vol+ │█████│ │
79 ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
80 │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │Mute │Vol- │Play │ │
81 └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
82
diff --git a/keyboards/s65_x/rules.mk b/keyboards/s65_x/rules.mk
new file mode 100644
index 000000000..9d8b559af
--- /dev/null
+++ b/keyboards/s65_x/rules.mk
@@ -0,0 +1,67 @@
1
2
3# MCU name
4#MCU = at90usb1287
5MCU = atmega32u4
6
7# Processor frequency.
8# This will define a symbol, F_CPU, in all source code files equal to the
9# processor frequency in Hz. You can then use this symbol in your source code to
10# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
11# automatically to create a 32-bit value in your source code.
12#
13# This will be an integer division of F_USB below, as it is sourced by
14# F_USB after it has run through any CPU prescalers. Note that this value
15# does not *change* the processor frequency - it should merely be updated to
16# reflect the processor speed set externally so that the code can use accurate
17# software delays.
18F_CPU = 16000000
19
20
21#
22# LUFA specific
23#
24# Target architecture (see library "Board Types" documentation).
25ARCH = AVR8
26
27# Input clock frequency.
28# This will define a symbol, F_USB, in all source code files equal to the
29# input clock frequency (before any prescaling is performed) in Hz. This value may
30# differ from F_CPU if prescaling is used on the latter, and is required as the
31# raw input clock is fed directly to the PLL sections of the AVR for high speed
32# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
33# at the end, this will be done automatically to create a 32-bit value in your
34# source code.
35#
36# If no clock division is performed on the input clock inside the AVR (via the
37# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
38F_USB = $(F_CPU)
39
40# Interrupt driven control endpoint task(+60)
41OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
42
43
44# Boot Section Size in *bytes*
45# Teensy halfKay 512
46# Teensy++ halfKay 1024
47# Atmel DFU loader 4096
48# LUFA bootloader 4096
49# USBaspLoader 2048
50OPT_DEFS += -DBOOTLOADER_SIZE=4096
51
52
53# Build Options
54# change yes to no to disable
55#
56BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
57MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
58EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61MIDI_ENABLE ?= no # MIDI controls
62UNICODE_ENABLE ?= no # Unicode
63BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
64AUDIO_ENABLE ?= no # Audio output on port C6
65NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
66BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
67RGBLIGHT_ENABLE ?= yes # Enable RGB light
diff --git a/keyboards/s65_x/s65_x.c b/keyboards/s65_x/s65_x.c
new file mode 100644
index 000000000..f3f8ffbc8
--- /dev/null
+++ b/keyboards/s65_x/s65_x.c
@@ -0,0 +1,30 @@
1#include "s65_x.h"
2#include "led.h"
3
4void matrix_init_kb(void) {
5 // put your keyboard start-up code here
6 // runs once when the firmware starts up
7 matrix_init_user();
8 led_init_ports();
9};
10
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 // * Set our LED pins as output
19 DDRB |= (1<<7);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
24 // Turn capslock on
25 PORTB &= ~(1<<7);
26 } else {
27 // Turn capslock off
28 PORTB |= (1<<7);
29 }
30}
diff --git a/keyboards/s65_x/s65_x.h b/keyboards/s65_x/s65_x.h
new file mode 100644
index 000000000..bbf442eda
--- /dev/null
+++ b/keyboards/s65_x/s65_x.h
@@ -0,0 +1,25 @@
1#ifndef S60X_H
2#define S60X_H
3
4#include "quantum.h"
5
6// There's an extra 2 x 5 column on the left. Not sure what that's all about
7// ANSI has more standard width shift, delete, and enter keys, doesn't use all of the 1U keys
8#define ANSI_KEYMAP( \
9 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \
10 K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
11 K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
12 K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \
13 K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \
14) { \
15 { KC_NO, KC_NO, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \
16 { KC_NO, KC_NO, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
17 { KC_NO, KC_NO, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \
18 { KC_NO, KC_NO, KC_NO, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \
19 { KC_NO, KC_NO, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \
20}
21
22void matrix_init_user(void);
23void matrix_scan_user(void);
24
25#endif