aboutsummaryrefslogtreecommitdiff
path: root/keyboards/helix/rev3_5rows
diff options
context:
space:
mode:
authorMakotoKurauchi <pluis@me.com>2020-10-12 11:37:31 +0900
committerGitHub <noreply@github.com>2020-10-12 11:37:31 +0900
commit4f923b1673fe35644af3dfe5c8e2a766116e0012 (patch)
treeb2890b314456bb0c456cb73133b1e996a925e29a /keyboards/helix/rev3_5rows
parentcacf495c91c7f6ad0e31edcefa8355eba98f75b6 (diff)
downloadqmk_firmware-4f923b1673fe35644af3dfe5c8e2a766116e0012.tar.gz
qmk_firmware-4f923b1673fe35644af3dfe5c8e2a766116e0012.zip
[Keyboard] Add Helix rev3 (#10297)
* add Helix Type-R keyboard * add default 4Rows keymaps * cleanup 4row keymaps * update about SPLIT_HAND_MATRIX_GRID and DIP_SWITCH_MATRIX_GRID * change how to toggle mac/win * update "Hardware Availability" * add a section of "How to build" * update "Hardware Supported" * add dip-sw sections * comment updated in function `encoder_update_user` * revert how to toggle mac/win * remove 4Rows variant build options * rename helix_type_r to helix_5r * add helix type-R 4Rows edition * small modifications in keymap.c * small modifications according to renaming * change project root directory * continuous work on ee2c39f1f9bffd97a2deb8f430746933a8d8684c * cleanup unused files * update info.json files * cleanup 5rows' keymaps * rename and update readme.md * update config.h * update helix's readme.md and rules.mk * update keymaps' overviews * split into each keyboard * optimize firmware size for via keymaps * fix LAYOUT to LAYOUT4 in 4rows/rev3.h * remove LAYOUT_kc lines from both keymaps * rename tyep-r to rev3 * enable to SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT * remove image from readme * clean up for PR * delete unnecessary comments * change keyboard directory * rename LAYOUT4 to LAYOUT for rev3_4rows * Update keyboards/helix/rev3_4rows/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Cleanup ADJUST Layer code for VIA * change SEND_STRING to tap_code * update readme * moved the oled code from the keymap to the keyboard * moved the dip switch code from the keymap to the keyboard * change layout name for info.json * Update keyboards/helix/rev3_4rows/rev3_4rows.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/rev3_4rows.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/rev3_4rows.h Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/rev3_5rows.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/rev3_5rows.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/keymaps/default/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/keymaps/via/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/keymaps/via/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/oled_display.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/keymaps/default/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/rev3_5rows.h Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/keymaps/default/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/keymaps/default/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/keymaps/via/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/keymaps/via/keymap.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/oled_display.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/oled_display.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_5rows/info.json Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/helix/rev3_4rows/oled_display.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_5rows/oled_display.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rules.mk Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/helix/rev3_4rows/config.h Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * Update keyboards/helix/rev3_4rows/oled_display.c Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> * deleted key_count in info.json Co-authored-by: keyaki-namiki <28521374+keyaki-namiki@users.noreply.github.com> Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'keyboards/helix/rev3_5rows')
-rw-r--r--keyboards/helix/rev3_5rows/config.h246
-rw-r--r--keyboards/helix/rev3_5rows/info.json18
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/default/config.h19
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/default/keymap.c203
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/default/readme.md81
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/via/config.h19
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/via/keymap.c190
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/via/readme.md81
-rw-r--r--keyboards/helix/rev3_5rows/keymaps/via/rules.mk1
-rw-r--r--keyboards/helix/rev3_5rows/oled_display.c123
-rw-r--r--keyboards/helix/rev3_5rows/readme.md13
-rw-r--r--keyboards/helix/rev3_5rows/rev3_5rows.c48
-rw-r--r--keyboards/helix/rev3_5rows/rev3_5rows.h50
-rw-r--r--keyboards/helix/rev3_5rows/rules.mk10
14 files changed, 1102 insertions, 0 deletions
diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h
new file mode 100644
index 000000000..bea914000
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/config.h
@@ -0,0 +1,246 @@
1/*
2Copyright 2020 yushakobo
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21#include <stdio.h>
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0x3265 //yushakobo
25#define PRODUCT_ID 0x0003 //Helix rev3 5rows
26#define DEVICE_VER 0x0001
27#define MANUFACTURER yushakobo
28#define PRODUCT Helix rev3 5rows
29
30/* key matrix size */
31#define MATRIX_ROWS 10
32#define MATRIX_COLS 7
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43 */
44#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
45#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL*/
49#define DIODE_DIRECTION COL2ROW
50
51/* Split hand configration */
52#define SPLIT_HAND_MATRIX_GRID D7,B2
53#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
54
55/* Dip switch on matrix grid */
56#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} }
57
58/*
59 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
60 */
61#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
62
63#define RGB_DI_PIN D3
64#define RGBLED_NUM 64 // Number of LEDs
65
66#ifdef RGB_MATRIX_ENABLE
67 #define DRIVER_LED_TOTAL RGBLED_NUM
68# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
69// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
70// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
71# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
72# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
73// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
74// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
75# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
76# define RGB_MATRIX_HUE_STEP 8
77# define RGB_MATRIX_SAT_STEP 8
78# define RGB_MATRIX_VAL_STEP 8
79# define RGB_MATRIX_SPD_STEP 10
80#endif
81
82#ifdef RGBLIGHT_ENABLE
83 #define RGBLIGHT_SPLIT
84 #define RGBLED_SPLIT { 32, 32 }
85// #define RGBLIGHT_HUE_STEP 8
86// #define RGBLIGHT_SAT_STEP 8
87// #define RGBLIGHT_VAL_STEP 8
88 #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */
89// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
90// /*== all animations enable ==*/
91// #define RGBLIGHT_ANIMATIONS
92// /*== or choose animations ==*/
93// #define RGBLIGHT_EFFECT_BREATHING
94 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
95 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
96// #define RGBLIGHT_EFFECT_SNAKE
97// #define RGBLIGHT_EFFECT_KNIGHT
98// #define RGBLIGHT_EFFECT_CHRISTMAS
99 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
100 #define RGBLIGHT_EFFECT_RGB_TEST
101// #define RGBLIGHT_EFFECT_ALTERNATING
102#endif
103
104/* Custom font */
105#define OLED_FONT_H "keyboards/helix/common/glcdfont.c"
106
107/* Encorder */
108#define ENCODERS_PAD_A { B6 }
109#define ENCODERS_PAD_B { B5 }
110
111/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
112#define DEBOUNCE 5
113
114/* define if matrix has ghost (lacks anti-ghosting diodes) */
115//#define MATRIX_HAS_GHOST
116
117/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
118#define LOCKING_SUPPORT_ENABLE
119/* Locking resynchronize hack */
120#define LOCKING_RESYNC_ENABLE
121
122/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
123 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
124 */
125// #define GRAVE_ESC_CTRL_OVERRIDE
126
127/*
128 * Force NKRO
129 *
130 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
131 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
132 * makefile for this to work.)
133 *
134 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
135 * until the next keyboard reset.
136 *
137 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
138 * fully operational during normal computer usage.
139 *
140 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
141 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
142 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
143 * power-up.
144 *
145 */
146//#define FORCE_NKRO
147
148/*
149 * Magic Key Options
150 *
151 * Magic keys are hotkey commands that allow control over firmware functions of
152 * the keyboard. They are best used in combination with the HID Listen program,
153 * found here: https://www.pjrc.com/teensy/hid_listen.html
154 *
155 * The options below allow the magic key functionality to be changed. This is
156 * useful if your keyboard/keypad is missing keys and you want magic key support.
157 *
158 */
159
160/* key combination for magic key command */
161/* defined by default; to change, uncomment and set to the combination you want */
162// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
163
164/* control how magic key switches layers */
165//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
166//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
167//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
168
169/* override magic key keymap */
170//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
171//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
172//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
173//#define MAGIC_KEY_HELP H
174//#define MAGIC_KEY_HELP_ALT SLASH
175//#define MAGIC_KEY_DEBUG D
176//#define MAGIC_KEY_DEBUG_MATRIX X
177//#define MAGIC_KEY_DEBUG_KBD K
178//#define MAGIC_KEY_DEBUG_MOUSE M
179//#define MAGIC_KEY_VERSION V
180//#define MAGIC_KEY_STATUS S
181//#define MAGIC_KEY_CONSOLE C
182//#define MAGIC_KEY_LAYER0 0
183//#define MAGIC_KEY_LAYER0_ALT GRAVE
184//#define MAGIC_KEY_LAYER1 1
185//#define MAGIC_KEY_LAYER2 2
186//#define MAGIC_KEY_LAYER3 3
187//#define MAGIC_KEY_LAYER4 4
188//#define MAGIC_KEY_LAYER5 5
189//#define MAGIC_KEY_LAYER6 6
190//#define MAGIC_KEY_LAYER7 7
191//#define MAGIC_KEY_LAYER8 8
192//#define MAGIC_KEY_LAYER9 9
193//#define MAGIC_KEY_BOOTLOADER B
194//#define MAGIC_KEY_BOOTLOADER_ALT ESC
195//#define MAGIC_KEY_LOCK CAPS
196//#define MAGIC_KEY_EEPROM E
197//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
198//#define MAGIC_KEY_NKRO N
199//#define MAGIC_KEY_SLEEP_LED Z
200
201/*
202 * Feature disable options
203 * These options are also useful to firmware size reduction.
204 */
205
206/* disable debug print */
207//#define NO_DEBUG
208
209/* disable print */
210//#define NO_PRINT
211
212/* disable action features */
213//#define NO_ACTION_LAYER
214//#define NO_ACTION_TAPPING
215//#define NO_ACTION_ONESHOT
216
217/* disable these deprecated features by default */
218#define NO_ACTION_MACRO
219#define NO_ACTION_FUNCTION
220
221/*
222 * MIDI options
223 */
224
225/* Prevent use of disabled MIDI features in the keymap */
226//#define MIDI_ENABLE_STRICT 1
227
228/* enable basic MIDI features:
229 - MIDI notes can be sent when in Music mode is on
230*/
231//#define MIDI_BASIC
232
233/* enable advanced MIDI features:
234 - MIDI notes can be added to the keymap
235 - Octave shift and transpose
236 - Virtual sustain, portamento, and modulation wheel
237 - etc.
238*/
239//#define MIDI_ADVANCED
240
241/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
242//#define MIDI_TONE_KEYCODE_OCTAVES 1
243
244/* Bootmagic Lite key configuration */
245// #define BOOTMAGIC_LITE_ROW 0
246// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/helix/rev3_5rows/info.json b/keyboards/helix/rev3_5rows/info.json
new file mode 100644
index 000000000..14a619944
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/info.json
@@ -0,0 +1,18 @@
1{
2 "keyboard_name": "Helix rev3 5rows",
3 "url": "",
4 "maintainer": "yushakobo",
5 "width": 15,
6 "height": 5,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0},
11 {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1},
12 {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2},
13 {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3},
14 {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}
15 ]
16 }
17 }
18}
diff --git a/keyboards/helix/rev3_5rows/keymaps/default/config.h b/keyboards/helix/rev3_5rows/keymaps/default/config.h
new file mode 100644
index 000000000..ba446182d
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/default/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
diff --git a/keyboards/helix/rev3_5rows/keymaps/default/keymap.c b/keyboards/helix/rev3_5rows/keymaps/default/keymap.c
new file mode 100644
index 000000000..18b559137
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/default/keymap.c
@@ -0,0 +1,203 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18
19// Defines names for use in layer keycodes and the keymap
20enum layer_names {
21 _QWERTY = 0,
22 _LOWER,
23 _RAISE,
24 _ADJUST
25};
26
27// Defines the keycodes used by our macros in process_record_user
28enum custom_keycodes {
29 EISU = SAFE_RANGE,
30 KANA,
31 ADJUST,
32 RGBRST
33};
34
35#define LOWER MO(_LOWER)
36#define RAISE MO(_RAISE)
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 /* Qwerty
40 * ,-----------------------------------------. ,-----------------------------------------.
41 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
42 * |------+------+------+------+------+------| |------+------+------+------+------+------|
43 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
44 * |------+------+------+------+------+------| |------+------+------+------+------+------|
45 * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
46 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
48 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
49 * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
50 * `-------------------------------------------------------------------------------------------------'
51 */
52 [_QWERTY] = LAYOUT( \
53 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
54 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
55 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
56 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
57 ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
58 ),
59 /* Lower
60 * ,-----------------------------------------. ,-----------------------------------------.
61 * | | | | | | | | | | | | | |
62 * |------+------+------+------+------+------| |------+------+------+------+------+------|
63 * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
64 * |------+------+------+------+------+------| |------+------+------+------+------+------|
65 * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
66 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
67 * | CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
68 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
69 * | | | | | | | | | | | Next | Vol- | Vol+ | Play |
70 * `-------------------------------------------------------------------------------------------------'
71 */
72 [_LOWER] = LAYOUT( \
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
74 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
75 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
76 KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \
77 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
78 ),
79
80 /* Raise
81 * ,-----------------------------------------. ,-----------------------------------------.
82 * | | | | | | | | | | | | | Bksp |
83 * |------+------+------+------+------+------| |------+------+------+------+------+------|
84 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
85 * |------+------+------+------+------+------| |------+------+------+------+------+------|
86 * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
87 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
88 * | CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
89 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
90 * | | | | | | | | | | | Next | Vol- | Vol+ | Play |
91 * `-------------------------------------------------------------------------------------------------'
92 */
93 [_RAISE] = LAYOUT( \
94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, \
95 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
96 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
97 KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \
98 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
99 ),
100
101 /* Adjust (Lower + Raise)
102 * ,-----------------------------------------. ,-----------------------------------------.
103 * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
104 * |------+------+------+------+------+------| |------+------+------+------+------+------|
105 * | | Reset|RGBRST|EEPRST| | | | | | | | | Del |
106 * |------+------+------+------+------+------| |------+------+------+------+------+------|
107 * | | | | | | Mac | | Win | | | | | |
108 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
109 * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
110 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
111 * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
112 * `-------------------------------------------------------------------------------------------------'
113 */
114 [_ADJUST] = LAYOUT( \
115 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
116 _______, RESET, RGBRST, EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
117 _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \
118 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
119 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \
120 )
121
122};
123
124void encoder_update_user(uint8_t index, bool clockwise) {
125 if (index == 0) { /* Left side encoder */
126 if (clockwise) {
127 tap_code(KC_PGDN);
128 } else {
129 tap_code(KC_PGUP);
130 }
131 } else if (index == 1) { /* Right side encoder */
132 if (clockwise) {
133 tap_code(KC_DOWN);
134 } else {
135 tap_code(KC_UP);
136 }
137 }
138}
139
140layer_state_t layer_state_set_user(layer_state_t state) {
141 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
142}
143
144bool process_record_user(uint16_t keycode, keyrecord_t *record) {
145 switch (keycode) {
146 case EISU:
147 if (record->event.pressed) {
148 if (is_mac_mode()) {
149 register_code(KC_LANG2);
150 }else{
151 tap_code16(LALT(KC_GRAVE));
152 }
153 } else {
154 unregister_code(KC_LANG2);
155 }
156 return false;
157 break;
158 case KANA:
159 if (record->event.pressed) {
160 if (is_mac_mode()) {
161 register_code(KC_LANG1);
162 }else{
163 tap_code16(LALT(KC_GRAVE));
164 }
165 } else {
166 unregister_code(KC_LANG1);
167 }
168 return false;
169 break;
170 case ADJUST:
171 if (record->event.pressed) {
172 layer_on(_LOWER);
173 layer_on(_RAISE);
174 } else {
175 layer_off(_LOWER);
176 layer_off(_RAISE);
177 }
178 break;
179 case RGBRST:
180 #ifdef RGBLIGHT_ENABLE
181 if (record->event.pressed) {
182 eeconfig_update_rgblight_default();
183 rgblight_enable();
184 }
185 #endif
186 break;
187 }
188 return true;
189}
190
191/*
192void matrix_init_user(void) {
193
194}
195
196void matrix_scan_user(void) {
197
198}
199
200bool led_update_user(led_t led_state) {
201 return true;
202}
203*/
diff --git a/keyboards/helix/rev3_5rows/keymaps/default/readme.md b/keyboards/helix/rev3_5rows/keymaps/default/readme.md
new file mode 100644
index 000000000..423443ba7
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/default/readme.md
@@ -0,0 +1,81 @@
1# The default keymap for Helix rev3 5rows
2
3### Qwerty Layer (Base)
4```
5,-----------------------------------------. ,-----------------------------------------.
6| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
7|------+------+------+------+------+------| |------+------+------+------+------+------|
8| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
9|------+------+------+------+------+------| |------+------+------+------+------+------|
10| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
11|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
12| Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
13|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
14|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
15`-------------------------------------------------------------------------------------------------'
16
17```
18
19### Lower Layer
20```
21,-----------------------------------------. ,-----------------------------------------.
22| | | | | | | | | | | | | |
23|------+------+------+------+------+------| |------+------+------+------+------+------|
24| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
25|------+------+------+------+------+------| |------+------+------+------+------+------|
26| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
27|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
28| CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
29|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
30| | | | | | | | | | | Next | Vol- | Vol+ | Play |
31`-------------------------------------------------------------------------------------------------'
32
33```
34
35
36### Raise Layer
37```
38,-----------------------------------------. ,-----------------------------------------.
39| | | | | | | | | | | | | Bksp |
40|------+------+------+------+------+------| |------+------+------+------+------+------|
41| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
42|------+------+------+------+------+------| |------+------+------+------+------+------|
43| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
44|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
45| CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
46|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
47| | | | | | | | | | | Next | Vol- | Vol+ | Play |
48`-------------------------------------------------------------------------------------------------'
49
50```
51
52### Adjust Layer (Lower + Raise)
53```
54,-----------------------------------------. ,-----------------------------------------.
55| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
56|------+------+------+------+------+------| |------+------+------+------+------+------|
57| | Reset|RGBRST|EEPRST| | | | | | | | | Del |
58|------+------+------+------+------+------| |------+------+------+------+------+------|
59| | | | | | Mac | | Win | | | | | |
60|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
61| | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
62|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
63| | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
64`-------------------------------------------------------------------------------------------------'
65```
66
67### Rotary Encoder Settings
68
69|L/R|Clockwise|Counter Clockwise|
70|---|---|---|
71|Left|Page Down|Page Up|
72|Right|Down|Up|
73
74### DipSW Settings
75
76|Switch No.||
77|---|---|
78|Left 1|Toggle Win/mac|
79|Left 2|Not assigned|
80|Right 1|Not assigned|
81|Right 2|Not assigned|
diff --git a/keyboards/helix/rev3_5rows/keymaps/via/config.h b/keyboards/helix/rev3_5rows/keymaps/via/config.h
new file mode 100644
index 000000000..ba446182d
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/via/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
diff --git a/keyboards/helix/rev3_5rows/keymaps/via/keymap.c b/keyboards/helix/rev3_5rows/keymaps/via/keymap.c
new file mode 100644
index 000000000..903e2637d
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/via/keymap.c
@@ -0,0 +1,190 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18
19// Defines names for use in layer keycodes and the keymap
20enum layer_names {
21 _QWERTY = 0,
22 _LOWER,
23 _RAISE,
24 _ADJUST
25};
26
27// Defines the keycodes used by our macros in process_record_user
28enum custom_keycodes {
29 EISU = SAFE_RANGE,
30 KANA,
31 ADJUST,
32 RGBRST
33};
34
35#define LOWER FN_MO13
36#define RAISE FN_MO23
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 /* Qwerty
40 * ,-----------------------------------------. ,-----------------------------------------.
41 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
42 * |------+------+------+------+------+------| |------+------+------+------+------+------|
43 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
44 * |------+------+------+------+------+------| |------+------+------+------+------+------|
45 * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
46 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
48 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
49 * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
50 * `-------------------------------------------------------------------------------------------------'
51 */
52 [_QWERTY] = LAYOUT( \
53 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
54 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
55 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
56 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
57 MO(_ADJUST), KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
58 ),
59 /* Lower
60 * ,-----------------------------------------. ,-----------------------------------------.
61 * | | | | | | | | | | | | | |
62 * |------+------+------+------+------+------| |------+------+------+------+------+------|
63 * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
64 * |------+------+------+------+------+------| |------+------+------+------+------+------|
65 * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
66 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
67 * | CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
68 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
69 * | | | | | | | | | | | Next | Vol- | Vol+ | Play |
70 * `-------------------------------------------------------------------------------------------------'
71 */
72 [_LOWER] = LAYOUT( \
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
74 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
75 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
76 KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \
77 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
78 ),
79
80 /* Raise
81 * ,-----------------------------------------. ,-----------------------------------------.
82 * | | | | | | | | | | | | | Bksp |
83 * |------+------+------+------+------+------| |------+------+------+------+------+------|
84 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
85 * |------+------+------+------+------+------| |------+------+------+------+------+------|
86 * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
87 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
88 * | CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
89 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
90 * | | | | | | | | | | | Next | Vol- | Vol+ | Play |
91 * `-------------------------------------------------------------------------------------------------'
92 */
93 [_RAISE] = LAYOUT( \
94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, \
95 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
96 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
97 KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \
98 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
99 ),
100
101 /* Adjust (Lower + Raise)
102 * ,-----------------------------------------. ,-----------------------------------------.
103 * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
104 * |------+------+------+------+------+------| |------+------+------+------+------+------|
105 * | | Reset|RGBRST| | | | | | | | | | Del |
106 * |------+------+------+------+------+------| |------+------+------+------+------+------|
107 * | | | | | | Mac | | Win | | | | | |
108 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
109 * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
110 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
111 * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
112 * `-------------------------------------------------------------------------------------------------'
113 */
114 [_ADJUST] = LAYOUT( \
115 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
116 _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
117 _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \
118 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
119 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \
120 )
121
122};
123
124void encoder_update_user(uint8_t index, bool clockwise) {
125 if (index == 0) { /* Left side encoder */
126 if (clockwise) {
127 tap_code(KC_PGDN);
128 } else {
129 tap_code(KC_PGUP);
130 }
131 } else if (index == 1) { /* Right side encoder */
132 if (clockwise) {
133 tap_code(KC_DOWN);
134 } else {
135 tap_code(KC_UP);
136 }
137 }
138}
139
140bool process_record_user(uint16_t keycode, keyrecord_t *record) {
141 switch (keycode) {
142 case EISU:
143 if (record->event.pressed) {
144 if (is_mac_mode()) {
145 register_code(KC_LANG2);
146 }else{
147 tap_code16(LALT(KC_GRAVE));
148 }
149 } else {
150 unregister_code(KC_LANG2);
151 }
152 return false;
153 break;
154 case KANA:
155 if (record->event.pressed) {
156 if (is_mac_mode()) {
157 register_code(KC_LANG1);
158 }else{
159 tap_code16(LALT(KC_GRAVE));
160 }
161 } else {
162 unregister_code(KC_LANG1);
163 }
164 return false;
165 break;
166 case RGBRST:
167 #ifdef RGBLIGHT_ENABLE
168 if (record->event.pressed) {
169 eeconfig_update_rgblight_default();
170 rgblight_enable();
171 }
172 #endif
173 break;
174 }
175 return true;
176}
177
178/*
179void matrix_init_user(void) {
180
181}
182
183void matrix_scan_user(void) {
184
185}
186
187bool led_update_user(led_t led_state) {
188 return true;
189}
190*/
diff --git a/keyboards/helix/rev3_5rows/keymaps/via/readme.md b/keyboards/helix/rev3_5rows/keymaps/via/readme.md
new file mode 100644
index 000000000..d3ea17f1b
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/via/readme.md
@@ -0,0 +1,81 @@
1# The default VIA keymap for Helix rev3 5rows
2
3### Qwerty Layer (Base)
4```
5,-----------------------------------------. ,-----------------------------------------.
6| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
7|------+------+------+------+------+------| |------+------+------+------+------+------|
8| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
9|------+------+------+------+------+------| |------+------+------+------+------+------|
10| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
11|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
12| Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
13|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
14|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
15`-------------------------------------------------------------------------------------------------'
16
17```
18
19### Lower Layer
20```
21,-----------------------------------------. ,-----------------------------------------.
22| | | | | | | | | | | | | |
23|------+------+------+------+------+------| |------+------+------+------+------+------|
24| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
25|------+------+------+------+------+------| |------+------+------+------+------+------|
26| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
27|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
28| CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
29|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
30| | | | | | | | | | | Next | Vol- | Vol+ | Play |
31`-------------------------------------------------------------------------------------------------'
32
33```
34
35
36### Raise Layer
37```
38,-----------------------------------------. ,-----------------------------------------.
39| | | | | | | | | | | | | Bksp |
40|------+------+------+------+------+------| |------+------+------+------+------+------|
41| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
42|------+------+------+------+------+------| |------+------+------+------+------+------|
43| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
44|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
45| CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
46|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
47| | | | | | | | | | | Next | Vol- | Vol+ | Play |
48`-------------------------------------------------------------------------------------------------'
49
50```
51
52### Adjust Layer (Lower + Raise)
53```
54,-----------------------------------------. ,-----------------------------------------.
55| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
56|------+------+------+------+------+------| |------+------+------+------+------+------|
57| | Reset|RGBRST| | | | | | | | | | Del |
58|------+------+------+------+------+------| |------+------+------+------+------+------|
59| | | | | | Mac | | Win | | | | | |
60|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
61| | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
62|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
63| | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
64`-------------------------------------------------------------------------------------------------'
65```
66
67### Rotary Encoder Settings
68
69|L/R|Clockwise|Counter Clockwise|
70|---|---|---|
71|Left|Page Down|Page Up|
72|Right|Down|Up|
73
74### DipSW Settings
75
76|Switch No.||
77|---|---|
78|Left 1|Toggle Win/mac|
79|Left 2|Not assigned|
80|Right 1|Not assigned|
81|Right 2|Not assigned|
diff --git a/keyboards/helix/rev3_5rows/keymaps/via/rules.mk b/keyboards/helix/rev3_5rows/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/helix/rev3_5rows/oled_display.c b/keyboards/helix/rev3_5rows/oled_display.c
new file mode 100644
index 000000000..ffe8b594b
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/oled_display.c
@@ -0,0 +1,123 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 /*
18 How to Customize
19
20 $ make helix/rev3_5rows:YOUR_KEYMAP:clean
21 $ cp keyboards/helix/rev3_5rows/oled_display.c keyboards/helix/rev3_5rows/keymaps/YOUR_KEYMAP
22
23 $ edit keyboards/helix/rev3_5rows/keymaps/YOUR_KEYMAP/oled_display.c
24 $ make helix/rev3_5rows:YOUR_KEYMAP
25 $ make helix/rev3_5rows:YOUR_KEYMAP:flash
26 */
27
28#include QMK_KEYBOARD_H
29
30// Defines names for use in layer keycodes and the keymap
31enum layer_names {
32 _QWERTY = 0,
33 _LOWER,
34 _RAISE,
35 _ADJUST
36};
37
38#ifdef OLED_DRIVER_ENABLE
39
40void render_status(void) {
41
42 // Render to mode icon
43 static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
44 if (is_mac_mode()) {
45 oled_write_P(os_logo[0][0], false);
46 oled_write_P(PSTR("\n"), false);
47 oled_write_P(os_logo[0][1], false);
48 }else{
49 oled_write_P(os_logo[1][0], false);
50 oled_write_P(PSTR("\n"), false);
51 oled_write_P(os_logo[1][1], false);
52 }
53
54 oled_write_P(PSTR(" "), false);
55
56 // Host Keyboard Layer Status
57 oled_write_P(PSTR("Layer: "), false);
58
59 switch (get_highest_layer(layer_state)) {
60 case _QWERTY:
61 oled_write_P(PSTR("Default\n"), false);
62 break;
63 case _RAISE:
64 oled_write_P(PSTR("Raise\n"), false);
65 break;
66 case _LOWER:
67 oled_write_P(PSTR("Lower\n"), false);
68 break;
69 case _ADJUST:
70 oled_write_P(PSTR("Adjust\n"), false);
71 break;
72 default:
73 // Or use the write_ln shortcut over adding '\n' to the end of your string
74 oled_write_ln_P(PSTR("Undefined"), false);
75 }
76
77 oled_write_P(PSTR("\n"), false);
78
79 // Host Keyboard LED Status
80 led_t led_state = host_keyboard_led_state();
81 oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
82 oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
83 oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
84}
85
86
87static void render_logo(void) {
88 static const char PROGMEM qmk_logo[] = {
89 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
90 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
91 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
92 };
93
94 oled_write_P(qmk_logo, false);
95}
96
97static void render_rgbled_status(bool full) {
98#ifdef RGBLIGHT_ENABLE
99 char buf[30];
100 if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) {
101 if (full) {
102 snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ",
103 rgblight_get_mode(),
104 rgblight_get_hue()/RGBLIGHT_HUE_STEP,
105 rgblight_get_sat()/RGBLIGHT_SAT_STEP,
106 rgblight_get_val()/RGBLIGHT_VAL_STEP);
107 } else {
108 snprintf(buf, sizeof(buf), "[%2d] ", rgblight_get_mode());
109 }
110 oled_write(buf, false);
111 }
112#endif
113}
114
115void oled_task_user(void) {
116 if(is_keyboard_master()){
117 render_status();
118 }else{
119 render_logo();
120 render_rgbled_status(true);
121 }
122}
123#endif
diff --git a/keyboards/helix/rev3_5rows/readme.md b/keyboards/helix/rev3_5rows/readme.md
new file mode 100644
index 000000000..ff7e2cd59
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/readme.md
@@ -0,0 +1,13 @@
1# Helix rev3 5rows
2
3A compact split ortholinear keyboard.
4
5* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo)
6* Hardware Supported: Helix rev3 PCBs, Pro Micro
7* Hardware Availability: (Under preparation)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make helix/rev3_5rows:default:flash
12
13See 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).
diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.c b/keyboards/helix/rev3_5rows/rev3_5rows.c
new file mode 100644
index 000000000..cf183366d
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/rev3_5rows.c
@@ -0,0 +1,48 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "helix.h"
18
19bool is_mac_mode(void) {
20 return keymap_config.swap_lalt_lgui == false;
21}
22
23void set_mac_mode(bool macmode) {
24 if (macmode) {
25 /* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI) key. */
26 /* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124 */
27 keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
28 } else {
29 /* The result is the same as pressing the AG_SWAP(=MAGIC_SWAP_ALT_GUI) key. */
30 /* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81 */
31 keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
32 }
33}
34
35void dip_switch_update_kb(uint8_t index, bool active) {
36 switch (index) {
37 case 0:
38 if(active) { // Left no.1 Helix rev3 common
39 set_mac_mode(false);
40 } else {
41 set_mac_mode(true);
42 }
43 break;
44 default: // Left no.2 or Right no.1 or Right no.2 for user/keymap
45 dip_switch_update_user(index, active);
46 break;
47 }
48}
diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.h b/keyboards/helix/rev3_5rows/rev3_5rows.h
new file mode 100644
index 000000000..1e3121d71
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/rev3_5rows.h
@@ -0,0 +1,50 @@
1/* Copyright 2020 yushakobo
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21bool is_mac_mode(void);
22void set_mac_mode(bool macmode);
23
24/* This is a shortcut to help you visually see your layout.
25 *
26 * The first section contains all of the arguments representing the physical
27 * layout of the board and position of the keys.
28 *
29 * The second converts the arguments into a two-dimensional array which
30 * represents the switch matrix.
31 */
32#define LAYOUT( \
33 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
34 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
35 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
36 L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
37 L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
38 ) \
39 { \
40 { L00, L01, L02, L03, L04, L05, KC_NO }, \
41 { L10, L11, L12, L13, L14, L15, KC_NO }, \
42 { L20, L21, L22, L23, L24, L25, KC_NO }, \
43 { L30, L31, L32, L33, L34, L35, L36 }, \
44 { L40, L41, L42, L43, L44, L45, L46 }, \
45 { R05, R04, R03, R02, R01, R00, KC_NO }, \
46 { R15, R14, R13, R12, R11, R10, KC_NO }, \
47 { R25, R24, R23, R22, R21, R20, KC_NO }, \
48 { R35, R34, R33, R32, R31, R30, R36 }, \
49 { R45, R44, R43, R42, R41, R40, R46 } \
50 }
diff --git a/keyboards/helix/rev3_5rows/rules.mk b/keyboards/helix/rev3_5rows/rules.mk
new file mode 100644
index 000000000..7168f174f
--- /dev/null
+++ b/keyboards/helix/rev3_5rows/rules.mk
@@ -0,0 +1,10 @@
1EXTRAKEY_ENABLE = yes # Audio control and System control
2RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
3SPLIT_KEYBOARD = yes
4#RGB_MATRIX_ENABLE = WS2812
5OLED_DRIVER_ENABLE = yes
6ENCODER_ENABLE = yes
7DIP_SWITCH_ENABLE = yes
8LTO_ENABLE = yes
9
10SRC += oled_display.c