diff options
author | MakotoKurauchi <pluis@me.com> | 2020-10-12 11:37:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 11:37:31 +0900 |
commit | 4f923b1673fe35644af3dfe5c8e2a766116e0012 (patch) | |
tree | b2890b314456bb0c456cb73133b1e996a925e29a /keyboards | |
parent | cacf495c91c7f6ad0e31edcefa8355eba98f75b6 (diff) |
[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')
30 files changed, 2158 insertions, 3 deletions
diff --git a/keyboards/helix/helix.h b/keyboards/helix/helix.h index d3d3b04169..b900d975d2 100644 --- a/keyboards/helix/helix.h +++ b/keyboards/helix/helix.h @@ -8,6 +8,12 @@ #ifdef KEYBOARD_helix_rev2 #include "rev2.h" #endif +#ifdef KEYBOARD_helix_rev3_5rows + #include "rev3_5rows.h" +#endif +#ifdef KEYBOARD_helix_rev3_4rows + #include "rev3_4rows.h" +#endif #ifdef KEYBOARD_helix_pico #include "pico.h" #endif diff --git a/keyboards/helix/readme.md b/keyboards/helix/readme.md index e1161cfdf1..0c190f7626 100644 --- a/keyboards/helix/readme.md +++ b/keyboards/helix/readme.md @@ -5,9 +5,9 @@ Helix A compact split ortholinear keyboard. -Keyboard Maintainer: [Makoto Kurauchi](https://github.com/MakotoKurauchi/) [@pluis9](https://twitter.com/pluis9) -Hardware Supported: Helix PCB Alpha, Beta, Pro Micro -Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix) +Keyboard Maintainer: [Makoto Kurauchi](https://github.com/MakotoKurauchi/) [@pluis9](https://twitter.com/pluis9) [yushakobo](https://github.com/yushakobo) +Hardware Supported: Helix PCB Alpha, Beta, Rev3, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix) ## How to build * [Helix how to Customize and Compile](rev2/keymaps/default/readme.md#customize) diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h new file mode 100644 index 0000000000..d2de347b9e --- /dev/null +++ b/keyboards/helix/rev3_4rows/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2020 yushakobo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" +#include <stdio.h> + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3265 //yushakobo +#define PRODUCT_ID 0x0004 //Helix rev3 4rows +#define DEVICE_VER 0x0001 +#define MANUFACTURER yushakobo +#define PRODUCT Helix rev3 4rows + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Split hand configration */ +#define SPLIT_HAND_MATRIX_GRID D7,B2 + +/* Dip switch on matrix grid */ +#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} } + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 50 // Number of LEDs + +#ifdef RGB_MATRIX_ENABLE + #define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # 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) +// # 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) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #define RGBLED_SPLIT { 25, 25 } +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Custom font */ +#define OLED_FONT_H "keyboards/helix/common/glcdfont.c" + +/* Encorder */ +#define ENCODERS_PAD_A { B6 } +#define ENCODERS_PAD_B { B5 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/helix/rev3_4rows/info.json b/keyboards/helix/rev3_4rows/info.json new file mode 100644 index 0000000000..0b927510d9 --- /dev/null +++ b/keyboards/helix/rev3_4rows/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "Helix rev3 4rows", + "url": "", + "maintainer": "yushakobo", + "width": 15, + "height": 4, + "layouts": { + "LAYOUT_4": { + "layout": [ + {"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}, + {"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}, + {"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}, + {"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} + ] + } + } +} diff --git a/keyboards/helix/rev3_4rows/keymaps/default/config.h b/keyboards/helix/rev3_4rows/keymaps/default/config.h new file mode 100644 index 0000000000..ba446182d2 --- /dev/null +++ b/keyboards/helix/rev3_4rows/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here diff --git a/keyboards/helix/rev3_4rows/keymaps/default/keymap.c b/keyboards/helix/rev3_4rows/keymaps/default/keymap.c new file mode 100644 index 0000000000..a9a2c4acca --- /dev/null +++ b/keyboards/helix/rev3_4rows/keymaps/default/keymap.c @@ -0,0 +1,193 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + EISU = SAFE_RANGE, + KANA, + ADJUST, + RGBRST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST|EEPRST| | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, RGBRST, EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left side encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Right side encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EISU: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG2); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG1); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_LOWER); + layer_on(_RAISE); + } else { + layer_off(_LOWER); + layer_off(_RAISE); + } + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +/* +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool led_update_user(led_t led_state) { + return true; +} +*/ diff --git a/keyboards/helix/rev3_4rows/keymaps/default/readme.md b/keyboards/helix/rev3_4rows/keymaps/default/readme.md new file mode 100644 index 0000000000..e747096851 --- /dev/null +++ b/keyboards/helix/rev3_4rows/keymaps/default/readme.md @@ -0,0 +1,66 @@ +# The default keymap for Helix rev3 4rows + +### Qwerty Layer (Base) +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | +`-------------------------------------------------------------------------------------------------' +``` +### Lower Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' +``` +### Raise Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' +``` +### Adjust Layer (Lower + Raise) +``` +,-----------------------------------------. ,-----------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | Reset|RGBRST|EEPRST| | | | | | | | | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | MODE | HUE- | SAT- | VAL- | +`-------------------------------------------------------------------------------------------------' +``` + +### Rotary Encoder Settings + +|L/R|Clockwise|Counter Clockwise| |