aboutsummaryrefslogtreecommitdiff
path: root/keyboards/hotdox
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/hotdox')
-rw-r--r--keyboards/hotdox/config.h78
-rw-r--r--keyboards/hotdox/hotdox.c44
-rw-r--r--keyboards/hotdox/hotdox.h187
-rw-r--r--keyboards/hotdox/info.json107
-rw-r--r--keyboards/hotdox/keymaps/default/keymap.c190
-rw-r--r--keyboards/hotdox/keymaps/eozaki/keymap.c192
-rw-r--r--keyboards/hotdox/keymaps/kloki/keymap.c210
-rw-r--r--keyboards/hotdox/left.c130
-rw-r--r--keyboards/hotdox/left.h57
-rw-r--r--keyboards/hotdox/matrix.c283
-rw-r--r--keyboards/hotdox/readme.md23
-rw-r--r--keyboards/hotdox/rules.mk82
12 files changed, 1583 insertions, 0 deletions
diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h
new file mode 100644
index 000000000..ed15f4bb4
--- /dev/null
+++ b/keyboards/hotdox/config.h
@@ -0,0 +1,78 @@
1#pragma once
2
3#include "config_common.h"
4
5/* USB Device descriptor parameter */
6#define VENDOR_ID 0xFEED
7#define PRODUCT_ID 0xE11D
8
9#define DEVICE_VER 0x0001
10#define MANUFACTURER Z.P.Z.O.
11#define PRODUCT HotDox
12#define DESCRIPTION QMK keyboard firmware for HotDox
13
14/* key matrix size */
15#define MATRIX_ROWS 6
16#define MATRIX_COLS 14
17
18#define MOUSEKEY_INTERVAL 20
19#define MOUSEKEY_DELAY 0
20#define MOUSEKEY_TIME_TO_MAX 60
21#define MOUSEKEY_MAX_SPEED 7
22#define MOUSEKEY_WHEEL_DELAY 0
23
24#define TAPPING_TOGGLE 1
25
26/* define if matrix has ghost */
27//#define MATRIX_HAS_GHOST
28
29#define TAPPING_TERM 200
30#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
31
32/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
33#define LOCKING_SUPPORT_ENABLE
34/* Locking resynchronize hack */
35#define LOCKING_RESYNC_ENABLE
36
37/* key combination for command */
38#ifndef IS_COMMAND
39#define IS_COMMAND() ( \
40 get_mods() == MOD_MASK_CTRL || \
41 get_mods() == MOD_MASK_SHIFT \
42)
43#endif
44
45#define BACKLIGHT_PIN B7
46/* number of backlight levels */
47#define BACKLIGHT_LEVELS 3
48
49#define LED_BRIGHTNESS_LO 15
50#define LED_BRIGHTNESS_HI 255
51
52/* fix space cadet rollover issue */
53#define DISABLE_SPACE_CADET_ROLLOVER
54
55/* Set 0 if debouncing isn't needed */
56#define DEBOUNCE 5
57
58#define USB_MAX_POWER_CONSUMPTION 500
59
60/*
61 * Feature disable options
62 * These options are also useful to firmware size reduction.
63 */
64
65/* disable debug print */
66// #define NO_DEBUG
67
68/* disable print */
69// #define NO_PRINT
70
71/* disable action features */
72//#define NO_ACTION_LAYER
73//#define NO_ACTION_TAPPING
74//#define NO_ACTION_ONESHOT
75//#define NO_ACTION_MACRO
76//#define NO_ACTION_FUNCTION
77//#define DEBUG_MATRIX_SCAN_RATE
78
diff --git a/keyboards/hotdox/hotdox.c b/keyboards/hotdox/hotdox.c
new file mode 100644
index 000000000..00af9efb1
--- /dev/null
+++ b/keyboards/hotdox/hotdox.c
@@ -0,0 +1,44 @@
1#include "hotdox.h"
2#include "backlight.h"
3#include "quantum.h"
4
5extern inline void ergodox_board_led_on(void);
6extern inline void ergodox_right_led_1_on(void);
7extern inline void ergodox_right_led_2_on(void);
8extern inline void ergodox_right_led_3_on(void);
9
10extern inline void ergodox_board_led_off(void);
11extern inline void ergodox_right_led_1_off(void);
12extern inline void ergodox_right_led_2_off(void);
13extern inline void ergodox_right_led_3_off(void);
14
15extern inline void ergodox_led_all_on(void);
16extern inline void ergodox_led_all_off(void);
17
18void ergodox_led_init(void);
19void ergodox_blink_all_leds(void);
20
21void matrix_init_kb(void) {
22 ergodox_blink_all_leds();
23 matrix_init_user();
24}
25
26void ergodox_blink_all_leds(void)
27{
28 ergodox_led_all_off();
29 ergodox_led_all_set(LED_BRIGHTNESS_HI);
30 ergodox_right_led_1_on();
31 _delay_ms(50);
32 ergodox_right_led_2_on();
33 _delay_ms(50);
34 ergodox_right_led_3_on();
35 _delay_ms(50);
36 ergodox_right_led_1_off();
37 _delay_ms(50);
38 ergodox_right_led_2_off();
39 _delay_ms(50);
40 ergodox_right_led_3_off();
41 ergodox_led_all_on();
42 _delay_ms(333);
43 ergodox_led_all_off();
44}
diff --git a/keyboards/hotdox/hotdox.h b/keyboards/hotdox/hotdox.h
new file mode 100644
index 000000000..d79f335ad
--- /dev/null
+++ b/keyboards/hotdox/hotdox.h
@@ -0,0 +1,187 @@
1#pragma once
2
3#include "quantum.h"
4#include <stdint.h>
5#include <stdbool.h>
6
7#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
8#define CPU_16MHz 0x00
9
10void init_ergodox(void);
11
12inline void ergodox_board_led_on(void) { DDRB |= (1<<PB7); PORTB |= (1<<PB7); }
13inline void ergodox_right_led_1_on(void) { DDRB |= (1<<PB5); PORTB &= ~(1<<PB5); }
14inline void ergodox_right_led_2_on(void) { DDRB |= (1<<PB6); PORTB &= ~(1<<PB6); }
15inline void ergodox_right_led_3_on(void) { DDRB |= (1<<PB4); PORTB &= ~(1<<PB4); }
16
17inline void ergodox_board_led_off(void) { DDRB |= (1<<PB7); PORTB &= ~(1<<PB7); }
18inline void ergodox_right_led_1_off(void) { DDRB |= (1<<PB5); PORTB |= (1<<PB5); }
19inline void ergodox_right_led_2_off(void) { DDRB |= (1<<PB6); PORTB |= (1<<PB6); }
20inline void ergodox_right_led_3_off(void) { DDRB |= (1<<PB4); PORTB |= (1<<PB4); }
21
22inline void ergodox_right_led_on(uint8_t l) {
23 switch (l) {
24 case 1:
25 ergodox_right_led_1_on();
26 break;
27 case 2:
28 ergodox_right_led_2_on();
29 break;
30 case 3:
31 ergodox_right_led_3_on();
32 break;
33 default:
34 break;
35 }
36}
37
38inline void ergodox_right_led_off(uint8_t l) {
39 switch (l) {
40 case 1:
41 ergodox_right_led_1_off();
42 break;
43 case 2:
44 ergodox_right_led_2_off();
45 break;
46 case 3:
47 ergodox_right_led_3_off();
48 break;
49 default:
50 break;
51 }
52}
53
54inline void ergodox_led_all_on(void) {
55 ergodox_board_led_on();
56 ergodox_right_led_1_on();
57 ergodox_right_led_2_on();
58 ergodox_right_led_3_on();
59}
60
61inline void ergodox_led_all_off(void) {
62 ergodox_board_led_off();
63 ergodox_right_led_1_off();
64 ergodox_right_led_2_off();
65 ergodox_right_led_3_off();
66}
67
68inline void ergodox_right_led_1_set(uint8_t n) {}
69inline void ergodox_right_led_2_set(uint8_t n) {}
70inline void ergodox_right_led_3_set(uint8_t n) {}
71inline void ergodox_right_led_set(uint8_t l, uint8_t n) {}
72inline void ergodox_led_all_set(uint8_t n) {}
73
74void ergodox_blink_all_leds(void);
75
76/*
77 * LEFT HAND: LINES 76-83
78 * RIGHT HAND: LINES 85-92
79 */
80#define LAYOUT_ergodox( \
81 \
82 k00,k01,k02,k03,k04,k05,k06, \
83 k10,k11,k12,k13,k14,k15,k16, \
84 k20,k21,k22,k23,k24,k25, \
85 k30,k31,k32,k33,k34,k35,k36, \
86 k40,k41,k42,k43,k44, \
87 k55,k56, \
88 k54, \
89 k51,k52,k53, \
90 \
91 k07,k08,k09,k0A,k0B,k0C,k0D, \
92 k17,k18,k19,k1A,k1B,k1C,k1D, \
93 k28,k29,k2A,k2B,k2C,k2D, \
94 k37,k38,k39,k3A,k3B,k3C,k3D, \
95 k49,k4A,k4B,k4C,k4D, \
96 k57,k58, \
97 k59, \
98 k5C,k5B,k5A ) \
99 \
100 /* matrix positions */ \
101 { \
102 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
103 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
104 { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \
105 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
106 { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \
107 { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \
108 }
109
110/*
111 * LEFT HAND: LINES 110-117
112 * RIGHT HAND: LINES 119-126
113 */
114#define LAYOUT_ergodox_80( \
115 \
116 k00,k01,k02,k03,k04,k05,k06, \
117 k10,k11,k12,k13,k14,k15,k16, \
118 k20,k21,k22,k23,k24,k25, \
119 k30,k31,k32,k33,k34,k35,k36, \
120 k40,k41,k42,k43,k44, \
121 k55,k56, \
122 k45,k46,k54, \
123 k53,k52,k51, \
124 \
125 k07,k08,k09,k0A,k0B,k0C,k0D, \
126 k17,k18,k19,k1A,k1B,k1C,k1D, \
127 k28,k29,k2A,k2B,k2C,k2D, \
128 k37,k38,k39,k3A,k3B,k3C,k3D, \
129 k49,k4A,k4B,k4C,k4D, \
130 k57,k58, \
131 k59,k47,k48, \
132 k5C,k5B,k5A ) \
133 \
134 /* matrix positions */ \
135 { \
136 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
137 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
138 { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \
139 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
140 { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4A, k4B, k4C, k4D }, \
141 { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \
142 }
143
144/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
145#define LAYOUT_ergodox_pretty( \
146 \
147 L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
148 L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
149 L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
150 L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
151 L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
152 L55,L56, R50,R51, \
153 L54, R52, \
154 L53,L52,L51, R55,R54,R53 ) \
155 \
156 /* matrix positions */ \
157 { \
158 { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \
159 { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \
160 { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \
161 { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \
162 { L40,L41,L42,L43,L44,KC_NO,KC_NO, KC_NO,KC_NO,R42,R43,R44,R45,R46 }, \
163 { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \
164 }
165
166/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
167#define LAYOUT_ergodox_pretty_80( \
168 \
169 L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
170 L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
171 L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
172 L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
173 L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
174 L55,L56, R50,R51, \
175 L45,L46,L54, R52,R40,R41, \
176 L53,L52,L51, R55,R54,R53 ) \
177 \
178 /* matrix positions */ \
179 { \
180 { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \
181 { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \
182 { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \
183 { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \
184 { L40,L41,L42,L43,L44,L45,L46, R40,R41,R42,R43,R44,R45,R46 }, \
185 { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \
186 }
187
diff --git a/keyboards/hotdox/info.json b/keyboards/hotdox/info.json
new file mode 100644
index 000000000..cdfcd990c
--- /dev/null
+++ b/keyboards/hotdox/info.json
@@ -0,0 +1,107 @@
1{
2 "keyboard_name": "HotDox",
3 "maintainer": "layne001365",
4 "width": 19.5,
5 "height": 9.375,
6
7 "layouts": {
8 "LAYOUT_ergodox": {
9
10 "layout": [
11 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
12 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
13 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
14 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
15 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
16
17 {"x":6, "y":5}, {"x":7, "y":5},
18 {"x":7, "y":6},
19 {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7},
20
21
22 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
23 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
24 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
25 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
26 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
27
28
29 {"x":9, "y":5}, {"x":10, "y":5},
30 {"x":9, "y":6},
31 {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
32 ]
33 },
34 "LAYOUT_ergodox_pretty": {
35 "layout": [
36 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
37 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
38
39 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
40 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
41
42 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
43 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
44
45 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
46 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
47
48 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
49 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
50
51 {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
52 {"x":7, "y":6}, {"x":9, "y":6},
53 {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
54 ]
55 },
56 "LAYOUT_ergodox_80": {
57
58 "layout": [
59 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
60 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
61 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
62 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
63 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
64
65 {"x":6, "y":5}, {"x":7, "y":5},
66
67 {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6},
68 {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7},
69
70
71 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
72 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
73 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
74 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
75 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
76
77
78 {"x":9, "y":5}, {"x":10, "y":5},
79 {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
80 {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
81 ]
82 },
83 "LAYOUT_ergodox_pretty_80": {
84
85 "layout": [
86 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
87 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
88
89 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
90 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
91
92 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
93 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
94
95 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
96 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
97
98 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
99 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
100
101 {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
102 {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
103 {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
104 ]
105 }
106 }
107}
diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c
new file mode 100644
index 000000000..1c0f69d9b
--- /dev/null
+++ b/keyboards/hotdox/keymaps/default/keymap.c
@@ -0,0 +1,190 @@
1#include QMK_KEYBOARD_H
2#include "version.h"
3
4#define BASE 0 // default layer
5#define SYMB 1 // symbols
6#define MDIA 2 // media keys
7
8enum custom_keycodes {
9 VRSN = SAFE_RANGE,
10 RGB_SLD
11};
12
13const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
14/* Keymap 0: Basic layer
15 *
16 * ,--------------------------------------------------. ,--------------------------------------------------.
17 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
18 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
19 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
20 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
21 * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
22 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
23 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
24 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
25 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
26 * `----------------------------------' `----------------------------------'
27 * ,-------------. ,-------------.
28 * | App | LGui | | Alt |Ctrl/Esc|
29 * ,------|------|------| |------+--------+------.
30 * | | | Home | | PgUp | | |
31 * | Space|Backsp|------| |------| Tab |Enter |
32 * | |ace | End | | PgDn | | |
33 * `--------------------' `----------------------'
34 */
35// If it accepts an argument (i.e, is a function), it doesn't need KC_.
36// Otherwise, it needs KC_*
37[BASE] = LAYOUT_ergodox( // layer 0 : default
38 // left hand
39 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
40 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
41 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
42 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
43 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
44 ALT_T(KC_APP), KC_LGUI,
45 KC_HOME,
46 KC_SPC,KC_BSPC,KC_END,
47 // right hand
48 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
49 //KC_RGHT, KC_6, BL_OFF, BL_ON, BL_INC, BL_DEC, KC_MINS,
50 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
51 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
52 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
53 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
54 KC_LALT, CTL_T(KC_ESC),
55 KC_PGUP,
56 KC_ENT,KC_TAB,KC_PGDN
57 ),
58/* Keymap 1: Symbol Layer
59 *
60 * ,---------------------------------------------------. ,--------------------------------------------------.
61 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
62 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
63 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
64 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
65 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
66 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
67 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
68 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
69 * | EEP_RST | | | | | | | . | 0 | = | |
70 * `-----------------------------------' `----------------------------------'
71 * ,-------------. ,-------------.
72 * |Animat| | |Toggle|Solid |
73 * ,------|------|------| |------+------+------.
74 * |Bright|Bright| | | |Hue- |Hue+ |
75 * |ness- |ness+ |------| |------| | |
76 * | | | | | | | |
77 * `--------------------' `--------------------'
78 */
79// SYMBOLS
80[SYMB] = LAYOUT_ergodox(
81 // left hand
82 VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
83 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
84 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
85 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
86 EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
87 RGB_MOD,KC_TRNS,
88 KC_TRNS,
89 RGB_VAD,RGB_VAI,KC_TRNS,
90 // right hand
91 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
92 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
93 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
94 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
95 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
96 RGB_TOG, RGB_SLD,
97 KC_TRNS,
98 KC_TRNS, RGB_HUD, RGB_HUI
99),
100/* Keymap 2: Media and mouse keys
101 *
102 * ,--------------------------------------------------. ,--------------------------------------------------.
103 * | | | | | | | | | | | | | | | |
104 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
105 * | | | | MsUp | | | | | | | | | | | |
106 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
107 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
108 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
109 * | | | | | | | | | | | | Prev | Next | | |
110 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
111 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
112 * `----------------------------------' `----------------------------------'
113 * ,-------------. ,-------------.
114 * | | | | | |
115 * ,------|------|------| |------+------+------.
116 * | | | | | | |Brwser|
117 * | | |------| |------| |Back |
118 * | | | | | | | |
119 * `--------------------' `--------------------'
120 */
121// MEDIA AND MOUSE
122[MDIA] = LAYOUT_ergodox(
123 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
124 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
126 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
128 KC_TRNS, KC_TRNS,
129 KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS,
131 // right hand
132 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
134 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
136 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
137 KC_TRNS, KC_TRNS,
138 KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_WBAK
140),
141};
142
143bool process_record_user(uint16_t keycode, keyrecord_t *record) {
144 switch (keycode) {
145 // dynamically generate these.
146 case VRSN:
147 if (record->event.pressed) {
148 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
149 }
150 return false;
151 break;
152 case RGB_SLD:
153 if (record->event.pressed) {
154 #ifdef RGBLIGHT_ENABLE
155 rgblight_mode(1);
156 #endif
157 }
158 return false;
159 break;
160 }
161 return true;
162}
163
164// Runs just one time when the keyboard initializes.
165void matrix_init_user(void) {
166
167};
168
169
170// Runs constantly in the background, in a loop.
171void matrix_scan_user(void) {
172
173 uint8_t layer = biton32(layer_state);
174
175 ergodox_right_led_1_off();
176 ergodox_right_led_2_off();
177 ergodox_right_led_3_off();
178 switch (layer) {
179 // TODO: Make this relevant to the ErgoDox EZ.
180 case 1:
181 ergodox_right_led_1_on();
182 break;
183 case 2:
184 ergodox_right_led_2_on();
185 break;
186 default:
187 // none
188 break;
189 }
190};
diff --git a/keyboards/hotdox/keymaps/eozaki/keymap.c b/keyboards/hotdox/keymaps/eozaki/keymap.c
new file mode 100644
index 000000000..dc80e7a34
--- /dev/null
+++ b/keyboards/hotdox/keymaps/eozaki/keymap.c
@@ -0,0 +1,192 @@
1#include QMK_KEYBOARD_H
2#include "version.h"
3
4#define BASE 0 // default layer
5#define SYMB 1 // symbols
6#define MDIA 2 // media keys
7
8enum custom_keycodes {
9 PLACEHOLDER = SAFE_RANGE, // can always be here
10 VRSN,
11 RGB_SLD
12};
13
14const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15/* Keymap 0: Basic layer
16 *
17 * ,--------------------------------------------------. ,--------------------------------------------------.
18 * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | ' | 6 | 7 | 8 | 9 | 0 | = |
19 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
20 * | Del | Q | W | E | R | T | ~ | | " | Y | U | I | O | P | - |
21 * |--------+------+------+------+------+------| ` | | |------+------+------+------+------+--------|
22 * | Ctrl | A | S | D | F | G |------| |------| H | J | K | L | ; | \ |
23 * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
24 * | LAlt | Z | X | C | V | B | [ | | ] | N | M | , | . | / | LShift |
25 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
26 * | LT-1 | F4 | F5 | F6 | F11 | | Left | Down | Up | Right| RAlt |
27 * `----------------------------------' `----------------------------------'
28 * ,-------------. ,-------------.
29 * | L1 | Prev | | Vol+ | L2 |
30 * ,------|------|------| |------+--------+------.
31 * | | | Play | | Vol- | | |
32 * | Space|Backsp|------| |------| Tab |Enter |
33 * | |ace | Next | | Mute | | |
34 * `--------------------' `----------------------'
35 */
36// If it accepts an argument (i.e, is a function), it doesn't need KC_.
37// Otherwise, it needs KC_*
38[BASE] = LAYOUT_ergodox( // layer 0 : default
39 // left hand
40 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV),
41 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV,
42 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
43 KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
44 LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11,
45 TG(SYMB), KC_MPRV,
46 KC_MPLY,
47 KC_SPC,KC_BSPC,KC_MNXT,
48 // right hand
49 KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
50 LSFT(KC_QUOT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
51 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS,
52 KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_LSFT,
53 KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_RALT,
54 KC_VOLU, TG(MDIA),
55 KC_VOLD,
56 KC_MUTE,KC_TAB, KC_ENT
57 ),
58/* Keymap 1: Symbol Layer
59 *
60 * ,---------------------------------------------------. ,--------------------------------------------------.
61 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
62 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
63 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
64 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
65 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
66 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
67 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
68 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
69 * | EEP_RST | | | | | | | . | 0 | = | |
70 * `-----------------------------------' `----------------------------------'
71 * ,-------------. ,-------------.
72 * |Animat| | |Toggle|Solid |
73 * ,------|------|------| |------+------+------.
74 * |Bright|Bright| | | |Hue- |Hue+ |
75 * |ness- |ness+ |------| |------| | |
76 * | | | | | | | |
77 * `--------------------' `--------------------'
78 */
79// SYMBOLS
80[SYMB] = LAYOUT_ergodox(
81 // left hand
82 VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
83 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
84 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
85 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
86 EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
87 RGB_MOD,KC_TRNS,
88 KC_TRNS,
89 RGB_VAD,RGB_VAI,KC_TRNS,
90 // right hand
91 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
92 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
93 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
94 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
95 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
96 RGB_TOG, RGB_SLD,
97 KC_TRNS,
98 KC_TRNS, RGB_HUD, RGB_HUI
99),
100/* Keymap 2: Media and mouse keys
101 *
102 * ,--------------------------------------------------. ,--------------------------------------------------.
103 * | | | | | | | | | | | | | | | |
104 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
105 * | | | | MsUp | | | | | | | | | | | |
106 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
107 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
108 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
109 * | | | | | | | | | | | | Prev | Next | | |
110 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
111 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
112 * `----------------------------------' `----------------------------------'
113 * ,-------------. ,-------------.
114 * | | | | | |
115 * ,------|------|------| |------+------+------.
116 * | | | | | | |Brwser|
117 * | | |------| |------| |Back |
118 * | | | | | | | |
119 * `--------------------' `--------------------'
120 */
121// MEDIA AND MOUSE
122[MDIA] = LAYOUT_ergodox(
123 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
124 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
126 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
128 KC_TRNS, KC_TRNS,
129 KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS,
131 // right hand
132 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
134 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
136 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
137 KC_TRNS, KC_TRNS,
138 KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_WBAK
140),
141};
142
143bool process_record_user(uint16_t keycode, keyrecord_t *record) {
144 switch (keycode) {
145 // dynamically generate these.
146 case VRSN:
147 if (record->event.pressed) {
148 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
149 }
150 return false;
151 break;
152 case RGB_SLD:
153 if (record->event.pressed) {
154 #ifdef RGBLIGHT_ENABLE
155 rgblight_mode(1);
156 #endif
157 }
158 return false;
159 break;
160 }
161 return true;
162}
163
164// Runs just one time when the keyboard initializes.
165void matrix_init_user(void) {
166
167};
168
169
170// Runs constantly in the background, in a loop.
171void matrix_scan_user(void) {
172
173 uint8_t layer = biton32(layer_state);
174
175 ergodox_board_led_off();
176 ergodox_right_led_1_off();
177 ergodox_right_led_2_off();
178 ergodox_right_led_3_off();
179 switch (layer) {
180 // TODO: Make this relevant to the ErgoDox EZ.
181 case 1:
182 ergodox_right_led_1_on();
183 break;
184 case 2:
185 ergodox_right_led_2_on();
186 break;
187 default:
188 // none
189 break;
190 }
191
192};
diff --git a/keyboards/hotdox/keymaps/kloki/keymap.c b/keyboards/hotdox/keymaps/kloki/keymap.c
new file mode 100644
index 000000000..f858effd5
--- /dev/null
+++ b/keyboards/hotdox/keymaps/kloki/keymap.c
@@ -0,0 +1,210 @@
1#include QMK_KEYBOARD_H
2#include "version.h"
3
4#define BASE 0 // default layer
5#define QW 1 // qwerty
6#define SYMB 2 // symbols
7#define NUM 3 // media keys
8
9enum custom_keycodes {
10 PLACEHOLDER = SAFE_RANGE, // can always be here
11 VRSN,
12 RGB_SLD
13};
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16/* Keymap 0: Basic layer
17 *
18 * ,--------------------------------------------------. ,--------------------------------------------------.
19 * | Esc | 1 | 2 | 3 | 4 | 5 | SHIFT| | SYM | 6 | 7 | 8 | 9 | 0 | Bck |
20 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
21 * | Tab | Q | D | R | W | B | `~ | | "' | J | F | U | P | : | \ | |
22 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
23 * | Ctr/Es | A | S | H | T | G |------| |------| Y | N | E | O | I | Enter |
24 * |--------+------+------+------+------+------| = + | | -_ |------+------+------+------+------+--------|
25 * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | RShift |
26 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
27 * |MEH | Gui |AltShf| Left | Right| | DOWN | UP | [ | ] | ~SYM |
28 * `----------------------------------' `----------------------------------'
29 * ,-------------. ,-------------.
30 * | ESC |Home | | PgUp | QW |
31 * ,------|------|------| |------+--------+------.
32 * | | ENT | End | | PgDn | | |
33 * | Space| WIN |------| |------| Tab |Back |
34 * | SYM | | SCTR | | SALT | SYM | |
35 * `--------------------' `----------------------'
36 */
37
38[BASE] = LAYOUT_ergodox( // layer 0 : default
39 // left hand
40 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSFT,
41 KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_GRV,
42 CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G,
43 KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_EQL,
44 KC_MEH, KC_LGUI, KC_LALT, KC_LEFT,KC_RGHT,
45 KC_ESC, KC_HOME,
46 KC_END,
47 LT(SYMB, KC_SPC), LGUI_T(KC_ENT), S(KC_LGUI),
48 // right hand
49 TG(NUM), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
50 KC_QUOT, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
51 KC_Y, KC_N, KC_E, KC_O, KC_I , KC_ENT,
52 KC_MINS, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
53 KC_DOWN,KC_UP, KC_LBRC,KC_RBRC, MO(SYMB),
54 KC_PGUP, TG(QW),
55 KC_PGDN,
56 S(KC_LALT),LT(SYMB, KC_TAB), KC_BSPC
57 ),
58
59[QW] = LAYOUT_ergodox(
60 _______, _______, _______, _______, _______, _______, _______,
61 _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______,
62 _______, KC_A, KC_S, KC_D, KC_F, KC_G,
63 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______,
64 _______, _______, _______, _______, _______,
65 _______, _______,
66 _______,
67 _______, _______, _______,
68 // right hand
69 _______, _______, _______, _______, _______, _______, _______,
70 _______, KC_Y, KC_U, KC_I , KC_O, KC_P, _______,
71 KC_H, KC_J, KC_K , KC_L, KC_SCLN, _______,
72 _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
73 _______, _______, _______, _______, _______,
74 _______, _______,
75 _______,
76 _______, _______, _______
77),
78/* Keymap 1: Symbol Layer
79 *
80 * ,---------------------------------------------------. ,--------------------------------------------------.
81 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL |
82 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
83 * | | ! | @ | { | } | * | | | | < | H | U | PU | * | |
84 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
85 * | | # | $ | ( | ) | ` |------| |------| > | L | D | R | + | |
86 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
87 * | | % | ^ | [ | ] | ~ | | | | & | E | D | PD | \ | |
88 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
89 * | | | | | | | | | | | |
90 * `-----------------------------------' `----------------------------------'
91 * ,-------------. ,-------------.
92 * | | | | | |
93 * ,------|------|------| |------+------+------.
94 * | | | | | | | |
95 * | | |------| |------| | |
96 * | | | | | | | |
97 * `--------------------' `--------------------'
98 */
99// SYMBOLS
100[SYMB] = LAYOUT_ergodox(
101 // left hand
102 _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
103 _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_ASTR,_______,
104 _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
105 _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______,
106 _______,_______,_______,_______,_______,
107 _______,_______,
108 _______,
109 _______,_______,_______,
110 // right hand
111 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
112 _______, KC_LABK, KC_HOME, KC_UP, KC_PGUP, KC_ASTR, _______,
113 KC_RABK, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PLUS, _______,
114 _______, KC_AMPR, KC_END, KC_DOWN, KC_PGDN, KC_BSLS, _______,
115 _______, _______, _______, _______, _______,
116 _______, _______,
117 _______,
118 _______, _______, _______
119),
120/* Keymap 2: Media and mouse keys
121 *
122 * ,--------------------------------------------------. ,--------------------------------------------------.
123 * | | | | | | | | | | | | | | | |
124 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
125 * | | | L | MsUp | R | | | | | | 4 | 5 | 6 | | TAB |
126 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
127 * | | |MsLeft|MsDown|MsRght| |------| |------| | 1 | 2 | 3 | | |
128 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
129 * | | | | | | | | | | | | 0 | 0 | | |
130 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
131 * | | | | | | | | | | | |
132 * `----------------------------------' `----------------------------------'
133 * ,-------------. ,-------------.
134 * | | | | | |
135 * ,------|------|------| |------+------+------.
136 * | | | | | | | |
137 * | | |------| |------| | |
138 * | | | | | | | |
139 * `--------------------' `--------------------'
140 */
141[NUM] = LAYOUT_ergodox(
142 _______, _______, _______, _______, _______, _______, _______,
143 _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,
144 _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______,
145 _______, _______, _______, _______, _______, _______, _______,
146 _______, _______, _______, _______, _______,
147 _______, _______,
148 _______,
149 _______, _______, _______,
150 // right hand
151 _______, _______, _______, _______, _______, _______, _______,
152 _______, _______, KC_4, KC_5 , KC_6, _______, KC_TAB,
153 _______, KC_1, KC_2 , KC_3, _______, _______,
154 _______, _______, _______, KC_0, KC_0, _______, _______,
155 _______, _______, _______, _______, _______,
156 _______, _______,
157 _______,
158 _______, _______, _______
159),
160};
161
162bool process_record_user(uint16_t keycode, keyrecord_t *record) {
163 switch (keycode) {
164 // dynamically generate these.
165 case VRSN:
166 if (record->event.pressed) {
167 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
168 }
169 return false;
170 break;
171 case RGB_SLD:
172 if (record->event.pressed) {
173 #ifdef RGBLIGHT_ENABLE
174 rgblight_mode(1);
175 #endif
176 }
177 return false;
178 break;
179 }
180 return true;
181}
182
183// Runs just one time when the keyboard initializes.
184void matrix_init_user(void) {
185
186};
187
188
189// Runs constantly in the background, in a loop.
190void matrix_scan_user(void) {
191
192 uint8_t layer = biton32(layer_state);
193
194 ergodox_board_led_off();
195 ergodox_right_led_1_off();
196 ergodox_right_led_2_off();
197 ergodox_right_led_3_off();
198 switch (layer) {
199 case 1:
200 ergodox_board_led_on();
201 break;
202 case 3:
203 ergodox_board_led_on();
204 break;
205 default:
206 // none
207 break;
208 }
209
210};
diff --git a/keyboards/hotdox/left.c b/keyboards/hotdox/left.c
new file mode 100644
index 000000000..ae56b1816
--- /dev/null
+++ b/keyboards/hotdox/left.c
@@ -0,0 +1,130 @@
1#include "action.h"
2#include "left.h"
3#include "wait.h"
4
5bool i2c_initialized = false;
6
7void left_config(void);
8uint8_t left_write(uint8_t reg, uint8_t data);
9uint8_t left_read(uint8_t reg, uint8_t *data);
10
11uint8_t init_mcp23017(void)
12{
13 i2c_initialized = false;
14
15 if (i2c_initialized == 0)
16 {
17 i2c_init(); // on pins D(1,0)
18 _delay_ms(1000);
19 }
20
21 return 0;
22}
23void left_init(void)
24{
25 init_mcp23017();
26 left_scan();
27#if 0
28 while (1)
29 {
30 print("wait\n");
31 wait_us(1000000);
32 }
33#endif
34}
35
36void left_scan(void)
37{
38 uint8_t ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT);
39
40 if (ret == 0)
41 {
42 i2c_stop(HOTDOX_I2C_TIMEOUT);
43
44 if (!i2c_initialized)
45 {
46 i2c_initialized = true;
47 left_config();
48 clear_keyboard();
49 print("mcp23017 attached!!!\n");
50 }
51 }
52 else
53 {
54 if (i2c_initialized)
55 {
56 i2c_initialized = false;
57 clear_keyboard();
58 print("mcp23017 deattached!!!\n");
59 }
60 }
61
62 return;
63}
64
65uint8_t left_read_cols(void)
66{
67 uint8_t data = 0;
68
69 left_read(MCP23017_B0_GPIOA, &data);
70
71 return data;
72}
73
74void left_unselect_rows(void)
75{
76 left_write(MCP23017_B0_IODIRB, 0x3F);
77}
78
79void left_select_row(uint8_t row)
80{
81 left_write(MCP23017_B0_IODIRB, ~(1 << row));
82}
83
84void left_config(void)
85{
86 left_write(MCP23017_B0_IODIRA, 0x7F);
87 left_write(MCP23017_B0_IPOLA, 0x7F);
88 left_write(MCP23017_B0_GPPUA, 0x7F);
89
90 left_write(MCP23017_B0_IODIRB, 0xFF);
91 left_write(MCP23017_B0_GPIOB, 0xC0);
92}
93
94uint8_t left_write(uint8_t reg, uint8_t data)
95{
96 if (!i2c_initialized)
97 {
98 return 0;
99 }
100
101 uint8_t ret;
102
103 ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
104 ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
105 ret = i2c_write(data, HOTDOX_I2C_TIMEOUT);
106
107out:
108 i2c_stop(HOTDOX_I2C_TIMEOUT);
109 return ret;
110}
111
112uint8_t left_read(uint8_t reg, uint8_t *data)
113{
114 if (!i2c_initialized)
115 {
116 return 0;
117 }
118
119 uint8_t ret = 0;
120
121 ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
122 ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
123 ret = i2c_start(I2C_ADDR_READ, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
124
125 *data = i2c_read_nack(HOTDOX_I2C_TIMEOUT);
126
127out:
128 i2c_stop(HOTDOX_I2C_TIMEOUT);
129 return ret;
130}
diff --git a/keyboards/hotdox/left.h b/keyboards/hotdox/left.h
new file mode 100644
index 000000000..3d8b5a6ea
--- /dev/null
+++ b/keyboards/hotdox/left.h
@@ -0,0 +1,57 @@
1#pragma once
2
3#include "quantum.h"
4#include <stdint.h>
5#include "i2c_master.h"
6#include <util/delay.h>
7
8#define MCP23017
9#define MCP23017_A0 0
10#define MCP23017_A1 0
11#define MCP23017_A2 0
12
13#define I2C_ADDR (0x20)
14#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
15#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
16
17
18#define MCP23017_B0_IODIRA 0x00
19#define MCP23017_B0_IODIRB 0x01
20#define MCP23017_B0_IPOLA 0x02
21#define MCP23017_B0_IPOLB 0x03
22#define MCP23017_B0_GPINTENA 0x04
23#define MCP23017_B0_GPINTENB 0x05
24#define MCP23017_B0_DEFVALA 0x06
25#define MCP23017_B0_DEFVALB 0x07
26#define MCP23017_B0_INTCONA 0x08
27#define MCP23017_B0_INTCONB 0x09
28#define MCP23017_B0_IOCONA 0x0A
29#define MCP23017_B0_IOCONB 0x0B
30#define MCP23017_B0_GPPUA 0x0C
31#define MCP23017_B0_GPPUB 0x0D
32#define MCP23017_B0_INTFA 0x0E
33#define MCP23017_B0_INTFB 0x0F
34#define MCP23017_B0_INTCAPA 0x10
35#define MCP23017_B0_INTCAPB 0x11
36#define MCP23017_B0_GPIOA 0x12
37#define MCP23017_B0_GPIOB 0x13
38#define MCP23017_B0_OLATA 0x14
39#define MCP23017_B0_OLATB 0x15
40
41#define HOTDOX_I2C_TIMEOUT 100
42
43typedef int16_t i2c_status_t;
44
45void left_init(void);
46void left_scan(void);
47
48uint8_t left_read_cols(void);
49uint8_t left_get_col(uint8_t col);
50
51matrix_row_t left_read_row(void);
52
53void left_unselect_rows(void);
54void left_select_row(uint8_t row);
55
56uint8_t init_mcp23017(void);
57
diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c
new file mode 100644
index 000000000..9d3a98db2
--- /dev/null
+++ b/keyboards/hotdox/matrix.c
@@ -0,0 +1,283 @@
1#include <stdint.h>
2#include <stdbool.h>
3#include <avr/io.h>
4#include "wait.h"
5#include "action_layer.h"
6#include "print.h"
7#include "debug.h"
8#include "util.h"
9#include "matrix.h"
10#include "hotdox.h"
11#include "left.h"
12#ifdef DEBUG_MATRIX_SCAN_RATE
13#include "timer.h"
14#endif
15
16/*
17 * This constant define not debouncing time in msecs, but amount of matrix
18 * scan loops which should be made to get stable debounced results.
19 *
20 * On Ergodox matrix scan rate is relatively low, because of slow I2C.
21 * Now it's only 317 scans/second, or about 3.15 msec/scan.
22 * According to Cherry specs, debouncing time is 5 msec.
23 *
24 * And so, there is no sense to have DEBOUNCE higher than 2.
25 */
26
27#ifndef DEBOUNCE
28# define DEBOUNCE 5
29#endif
30
31/* matrix state(1:on, 0:off) */
32static matrix_row_t matrix[MATRIX_ROWS];
33
34// Debouncing: store for each key the number of scans until it's eligible to
35// change. When scanning the matrix, ignore any changes in keys that have
36// already changed in the last DEBOUNCE scans.
37static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
38
39static matrix_row_t read_cols(uint8_t row);
40static void init_cols(void);
41static void unselect_rows(void);
42static void select_row(uint8_t row);
43
44#ifdef DEBUG_MATRIX_SCAN_RATE
45uint32_t matrix_timer;
46uint32_t matrix_scan_count;
47#endif
48
49
50__attribute__ ((weak))
51void matrix_init_user(void) {}
52
53__attribute__ ((weak))
54void matrix_scan_user(void) {}
55
56__attribute__ ((weak))
57void matrix_init_kb(void) {
58 matrix_init_user();
59}
60
61__attribute__ ((weak))
62void matrix_scan_kb(void) {
63 matrix_scan_user();
64}
65
66inline
67uint8_t matrix_rows(void)
68{
69 return MATRIX_ROWS;
70}
71
72inline
73uint8_t matrix_cols(void)
74{
75 return MATRIX_COLS;
76}
77
78void matrix_init(void)
79{
80 // disable JTAG
81 MCUCR = (1<<JTD);
82 MCUCR = (1<<JTD);
83
84 unselect_rows();
85 init_cols();
86
87 //eeprom_update_word(EECONFIG_MAGIC, 0x0000);
88
89 // initialize matrix state: all keys off
90 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
91 matrix[i] = 0;
92 for (uint8_t j=0; j < MATRIX_COLS; ++j) {
93 debounce_matrix[i * MATRIX_COLS + j] = 0;
94 }
95 }
96
97#ifdef DEBUG_MATRIX_SCAN_RATE
98 matrix_timer = timer_read32();
99 matrix_scan_count = 0;
100#endif
101
102 matrix_init_quantum();
103
104}
105
106void matrix_power_up(void) {
107 unselect_rows();
108 init_cols();
109
110 // initialize matrix state: all keys off
111 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
112 matrix[i] = 0;
113 }
114
115#ifdef DEBUG_MATRIX_SCAN_RATE
116 matrix_timer = timer_read32();
117 matrix_scan_count = 0;
118#endif
119}
120
121// Returns a matrix_row_t whose bits are set if the corresponding key should be
122// eligible to change in this scan.
123matrix_row_t debounce_mask(uint8_t row) {
124 matrix_row_t result = 0;
125 for (uint8_t j=0; j < MATRIX_COLS; ++j) {
126 if (debounce_matrix[row * MATRIX_COLS + j]) {
127 --debounce_matrix[row * MATRIX_COLS + j];
128 } else {
129 result |= (1 << j);
130 }
131 }
132 return result;
133}
134
135// Report changed keys in the given row. Resets the debounce countdowns
136// corresponding to each set bit in 'change' to DEBOUNCE.
137void debounce_report(matrix_row_t change, uint8_t row) {
138 for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
139 if (change & (1 << i)) {
140 debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
141 }
142 }
143}
144
145uint8_t matrix_scan(void)
146{
147 left_scan();
148
149#ifdef DEBUG_MATRIX_SCAN_RATE
150 matrix_scan_count++;
151
152 uint32_t timer_now = timer_read32();
153 if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
154 print("matrix scan frequency: ");
155 pdec(matrix_scan_count);
156 print("\n");
157 matrix_print();
158
159 matrix_timer = timer_now;
160 matrix_scan_count = 0;
161 }
162#endif
163 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
164 select_row(i);
165 wait_us(30); // without this wait read unstable value.
166 matrix_row_t mask = debounce_mask(i);
167 matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask);
168 debounce_report(cols ^ matrix[i], i);
169 matrix[i] = cols;
170
171 unselect_rows();
172 }
173
174 matrix_scan_quantum();
175
176 return 1;
177}
178
179inline
180bool matrix_is_on(uint8_t row, uint8_t col)
181{
182 return (matrix[row] & ((matrix_row_t)1<<col));
183}
184
185inline
186matrix_row_t matrix_get_row(uint8_t row)
187{
188 return matrix[row];
189}
190
191void matrix_print(void)
192{
193 print("\nr/c 0123456789ABCDEF\n");
194 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
195 phex(row); print(": ");
196 pbin_reverse16(matrix_get_row(row));
197 print("\n");
198 }
199}
200
201uint8_t matrix_key_count(void)
202{
203 uint8_t count = 0;
204 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
205 count += bitpop16(matrix[i]);
206 }
207 return count;
208}
209
210static void init_cols(void)
211{
212 // Pro Micro
213 DDRB &= ~(1<<PB0 | 1<<PB1 | 1<<PB2 | 1<<PB3);
214 PORTB |= (1<<PB0 | 1<<PB1 | 1<<PB2 | 1<<PB3);
215
216 DDRD &= ~(1<<PD2 | 1<<PD3);
217 PORTD |= (1<<PD2 | 1<<PD3);
218
219 DDRC &= ~(1<<PC6);
220 PORTC |= (1<<PC6);
221
222 left_init();
223}
224
225static matrix_row_t read_cols(uint8_t row)
226{
227 matrix_row_t cols0 = 0x00, cols1 = 0x00;
228
229 cols0 = left_read_cols();
230
231 cols1 = (PINC&(1<<PC6) ? 0 : (1<<(0+7))) |
232 (PIND&(1<<PD3) ? 0 : (1<<(1+7))) |
233 (PIND&(1<<PD2) ? 0 : (1<<(2+7))) |
234 (PINB&(1<<PB3) ? 0 : (1<<(3+7))) |
235 (PINB&(1<<PB2) ? 0 : (1<<(4+7))) |
236 (PINB&(1<<PB1) ? 0 : (1<<(5+7))) |
237 (PINB&(1<<PB0) ? 0 : (1<<(6+7))) ;
238
239 return (cols0 | cols1);
240}
241
242static void unselect_rows(void)
243{
244 // Pro Micro
245 DDRF &= ~(1<<PF7 | 1<< PF6 | 1<<PF5 | 1<<PF4 | 1<<PF1 | 1<<PF0);
246 PORTF &= ~(1<<PF7 | 1<< PF6 | 1<<PF5 | 1<<PF4 | 1<<PF1 | 1<<PF0);
247
248 left_unselect_rows();
249}
250
251static void select_row(uint8_t row)
252{
253 // Pro Micro
254 switch (row) {
255 case 5:
256 DDRF |= (1<<PF0);
257 PORTF &= ~(1<<PF0);
258 break;
259 case 4:
260 DDRF |= (1<<PF1);
261 PORTF &= ~(1<<PF1);
262 break;
263 case 3:
264 DDRF |= (1<<PF4);
265 PORTF &= ~(1<<PF4);
266 break;
267 case 2:
268 DDRF |= (1<<PF5);
269 PORTF &= ~(1<<PF5);
270 break;
271 case 1:
272 DDRF |= (1<<PF6);
273 PORTF &= ~(1<<PF6);
274 break;
275 case 0:
276 DDRF |= (1<<PF7);
277 PORTF &= ~(1<<PF7);
278 break;
279 }
280
281 left_select_row(row);
282}
283
diff --git a/keyboards/hotdox/readme.md b/keyboards/hotdox/readme.md
new file mode 100644
index 000000000..c8062b038
--- /dev/null
+++ b/keyboards/hotdox/readme.md
@@ -0,0 +1,23 @@
1HotDox
2========
3
4![HotDox](https://cdn.shopify.com/s/files/1/1994/3097/products/Sunset_Ergodox.jpg?v=1540495379)
5
6The HotDox is a modified version of the ErgoDox & ErgoDone(made by K.T.E.C.).
7
8
9- Keyboard maintainer: [Layne](https://github.com/layne001365/qmk_firmware)
10
11# Building the firmware
12
13[Install the build tools.](https://docs.qmk.fm/#/getting_started_build_tools)
14
15In the root directory of the repository, build the firmware with a command like:
16
17 make hotdox:default
18
19For more information on the layout option and other ones, see the [`make` guide](https://docs.qmk.fm/#/getting_started_make_guide).
20
21# Flashing the firmware onto the keyboard
22 https://docs.qmk.fm/#/newbs_flashing
23
diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk
new file mode 100644
index 000000000..f785cdd06
--- /dev/null
+++ b/keyboards/hotdox/rules.mk
@@ -0,0 +1,82 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make = Make software.
5#
6# make clean = Clean out built project files.
7#
8# That's pretty much all you need. To compile, always go make clean,
9# followed by make.
10#
11# For advanced users only:
12# make teensy = Download the hex file to the device, using teensy_loader_cli.
13# (must have teensy_loader_cli installed).
14#
15#----------------------------------------------------------------------------
16
17# # project specific files
18SRC = matrix.c \
19 i2c_master.c \
20 left.c
21
22# MCU name
23MCU = atmega32u4
24
25# Processor frequency.
26# This will define a symbol, F_CPU, in all source code files equal to the
27# processor frequency in Hz. You can then use this symbol in your source code to
28# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
29# automatically to create a 32-bit value in your source code.
30#
31# This will be an integer division of F_USB below, as it is sourced by
32# F_USB after it has run through any CPU prescalers. Note that this value
33# does not *change* the processor frequency - it should merely be updated to
34# reflect the processor speed set externally so that the code can use accurate
35# software delays.
36F_CPU = 16000000
37
38#
39# LUFA specific
40#
41# Target architecture (see library "Board Types" documentation).
42ARCH = AVR8
43
44# Input clock frequency.
45# This will define a symbol, F_USB, in all source code files equal to the
46# input clock frequency (before any prescaling is performed) in Hz. This value may
47# differ from F_CPU if prescaling is used on the latter, and is required as the
48# raw input clock is fed directly to the PLL sections of the AVR for high speed
49# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
50# at the end, this will be done automatically to create a 32-bit value in your
51# source code.
52#
53# If no clock division is performed on the input clock inside the AVR (via the
54# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
55F_USB = $(F_CPU)
56
57# Interrupt driven control endpoint task(+60)
58OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
59
60# Boot Section
61BOOTLOADER = atmel-dfu
62
63# Build Options
64# comment out to disable the options.
65#
66CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone
67UNICODE_ENABLE = yes # Unicode
68BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
69MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
70EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
71CONSOLE_ENABLE = yes # Console for debug(+400)
72COMMAND_ENABLE = no # Commands for debug and configuration
73SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
74NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
75USB_6KRO_ENABLE = no # USB 6key Rollover
76BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
77KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor
78SWAP_HANDS_ENABLE = no # Disable Onehand
79RGBLIGHT_ENABLE = no
80MIDI_ENABLE = no
81
82LAYOUTS = ergodox