mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-21 15:12:02 +00:00
Latam version of Helix/rev2/back
. Latam adaptation of keymap(whit "ñ") . 3 layers (Qwerty, Lower, Raise) . Underglow light changes while pressing Lower(BLUE) and Raise(RED), then it returns to prior mode. (cherry picked from commit 974be350115b2d33b55edbc02e3b5281e1f856d7)
This commit is contained in:
parent
c21d5a0973
commit
9cd57982cd
@ -17,3 +17,6 @@
|
||||
#ifdef KEYBOARD_helix_pico
|
||||
#include "pico.h"
|
||||
#endif
|
||||
#ifdef KEYBOARD_helix_rev2_latam
|
||||
#include "rev2.h"
|
||||
#endif
|
1
keyboards/helix/rev2_latam/back/oled/rules.mk
Normal file
1
keyboards/helix/rev2_latam/back/oled/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
OLED_ENABLE = yes
|
2
keyboards/helix/rev2_latam/back/rules.mk
Normal file
2
keyboards/helix/rev2_latam/back/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
LED_BACK_ENABLE = yes
|
||||
SPLIT_KEYBOARD = yes
|
162
keyboards/helix/rev2_latam/config.h
Normal file
162
keyboards/helix/rev2_latam/config.h
Normal file
@ -0,0 +1,162 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x3265
|
||||
#define PRODUCT_ID 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Yushakobo
|
||||
#define PRODUCT Helix Beta
|
||||
#define DESCRIPTION A split keyboard for the cheap makers
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 100
|
||||
|
||||
/* Use I2C or Serial */
|
||||
#define USE_SERIAL
|
||||
//#define USE_MATRIX_I2C
|
||||
|
||||
/* Soft Serial defines */
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
#define SERIAL_USE_MULTI_TRANSACTION
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
// Helix keyboard OLED support
|
||||
// see ./rules.mk: OLED_ENABLE=yes or no
|
||||
#ifdef OLED_ENABLE
|
||||
#define SSD1306OLED
|
||||
#endif
|
||||
|
||||
/* Select rows configuration */
|
||||
// Rows are 4 or 5
|
||||
// #define HELIX_ROWS 5 see ./rules.mk
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#if HELIX_ROWS == 4
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||
#else
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||
#endif
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* 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
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D3
|
||||
|
||||
//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
|
||||
|
||||
// Helix keyboard RGB LED support
|
||||
#define RGBLIGHT_ANIMATIONS //: see ./rules.mk: LED_ANIMATIONS = yes or no
|
||||
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
|
||||
#ifdef RGBLED_BACK
|
||||
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||
#define RGBLED_NUM 25
|
||||
#else
|
||||
#define RGBLED_NUM 32
|
||||
#endif
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if RGBLED_NUM <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 140
|
||||
#endif
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if RGBLED_NUM <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
#endif
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 4
|
||||
#endif
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
||||
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
|
||||
// 120 RGBoff, OLEDoff
|
||||
// 120 OLED
|
||||
// 330 RGB 6
|
||||
// 300 RGB 32
|
||||
// 310 OLED & RGB 32
|
||||
#define USB_MAX_POWER_CONSUMPTION 400
|
||||
#else
|
||||
// fix iPhone and iPad power adapter issue
|
||||
// iOS device need lessthan 100
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 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
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
86
keyboards/helix/rev2_latam/info.json
Normal file
86
keyboards/helix/rev2_latam/info.json
Normal file
@ -0,0 +1,86 @@
|
||||
{
|
||||
"keyboard_name": "Helix rev. 2",
|
||||
"url": "https://github.com/MakotoKurauchi/helix",
|
||||
"maintainer": "MakotoKurauchi",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"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},
|
||||
|
||||
{"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}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
38
keyboards/helix/rev2_latam/keymaps/default/config.h
Normal file
38
keyboards/helix/rev2_latam/keymaps/default/config.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
606
keyboards/helix/rev2_latam/keymaps/default/keymap.c
Normal file
606
keyboards/helix/rev2_latam/keymaps/default/keymap.c
Normal file
@ -0,0 +1,606 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "bootloader.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
# include "lufa.h"
|
||||
# include "split_util.h"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
# include "audio.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
# include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
uint8_t RGB_current_mode;
|
||||
HSV CURRENT_COLOR;
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblight_enable(); // Enables RGB, without saving settings
|
||||
rgblight_mode(RGBLIGHT_MODE_CHRISTMAS);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
CURRENT_COLOR = (HSV){0, 0, 255};
|
||||
}
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE };
|
||||
|
||||
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, RGBRST };
|
||||
|
||||
#define LOWER MO(1)
|
||||
#define RAISE MO(2)
|
||||
|
||||
// HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[_QWERTY] = 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_TAB,
|
||||
KC_Q,
|
||||
KC_W,
|
||||
KC_E,
|
||||
KC_R,
|
||||
KC_T,
|
||||
KC_Y,
|
||||
KC_U,
|
||||
KC_I,
|
||||
KC_O,
|
||||
KC_P,
|
||||
KC_BSPC,
|
||||
KC_CAPS,
|
||||
KC_A,
|
||||
KC_S,
|
||||
KC_D,
|
||||
KC_F,
|
||||
KC_G,
|
||||
KC_H,
|
||||
KC_J,
|
||||
KC_K,
|
||||
KC_L,
|
||||
KC_SCLN,
|
||||
KC_ENT,
|
||||
KC_LSFT,
|
||||
KC_Z,
|
||||
KC_X,
|
||||
KC_C,
|
||||
KC_V,
|
||||
KC_B,
|
||||
KC_QUOT,
|
||||
KC_NUHS,
|
||||
KC_N,
|
||||
KC_M,
|
||||
KC_COMM,
|
||||
KC_DOT,
|
||||
KC_SLSH,
|
||||
KC_RSFT,
|
||||
KC_LCTL,
|
||||
KC_ESC,
|
||||
KC_LGUI,
|
||||
KC_LALT,
|
||||
MO(2),
|
||||
MO(1),
|
||||
KC_SPC,
|
||||
KC_SPC,
|
||||
KC_RALT,
|
||||
KC_LEFT,
|
||||
KC_UP,
|
||||
KC_DOWN,
|
||||
KC_RGHT,
|
||||
KC_RCTL
|
||||
),
|
||||
|
||||
[_LOWER] = 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,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_BRID,
|
||||
KC_BRIU,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_PSCR,
|
||||
KC_INS,
|
||||
KC_TRNS,
|
||||
KC_MINS,
|
||||
KC_EQL,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_MUTE,
|
||||
KC_VOLD,
|
||||
KC_VOLU,
|
||||
KC_MPLY,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_LBRC,
|
||||
KC_RBRC,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_NUBS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_HOME,
|
||||
KC_PGUP,
|
||||
KC_PGDN,
|
||||
KC_END,
|
||||
KC_TRNS
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
RGB_M_R,
|
||||
RGB_M_K,
|
||||
RGB_M_SN,
|
||||
RGB_M_SW,
|
||||
RGB_TOG,
|
||||
RGB_MOD,
|
||||
RGB_MOD,
|
||||
RGB_SPI,
|
||||
RGB_HUI,
|
||||
RGB_VAI,
|
||||
RGB_SAI,
|
||||
KC_NO,
|
||||
RGB_M_G,
|
||||
RGB_M_B,
|
||||
RGB_M_P,
|
||||
RGB_M_T,
|
||||
RGB_M_X,
|
||||
RGB_RMOD,
|
||||
RGB_RMOD,
|
||||
RGB_SPD,
|
||||
RGB_HUD,
|
||||
RGB_VAD,
|
||||
RGB_SAD,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_TRNS,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO,
|
||||
KC_NO
|
||||
)};
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool TOG_STATUS = false;
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL << _QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL << _COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL << _DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
// not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
// uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { // TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_sethsv(HSV_BLUE);
|
||||
#endif
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
#endif
|
||||
TOG_STATUS = false;
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
// not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
// uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { // TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_sethsv(HSV_RED);
|
||||
#endif
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
TOG_STATUS = false;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
// led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||
case RGB_MOD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_RMOD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step_reverse();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
// Estos faltan agregar...
|
||||
// RGB_SPI,RGB_VAI,RGB_SAI,
|
||||
// RGB_SPD,RGB_VAD,RGB_SAD,
|
||||
case RGB_M_R:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD + 1);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_K:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_KNIGHT + 1);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_SN:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_SNAKE + 3);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_SW:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 3);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_G:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_TWINKLE + 5);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_B:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_BREATHING + 2);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_P:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_T:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_RGB_TEST);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_M_X:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGBLIGHT_MODE_CHRISTMAS);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_HUI:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
rgblight_increase_hue();
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGB_HUD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
rgblight_decrease_hue();
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
CURRENT_COLOR = (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val};
|
||||
#endif
|
||||
// SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user() {
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user() {
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void) { music_scale_user(); }
|
||||
|
||||
void music_scale_user(void) { PLAY_SONG(music_scale); }
|
||||
|
||||
#endif
|
||||
|
||||
// SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// assign the right code to your layers for OLED display
|
||||
# define L_BASE 0
|
||||
# define L_LOWER (1 << _LOWER)
|
||||
# define L_RAISE (1 << _RAISE)
|
||||
static void render_logo(struct CharacterMatrix *matrix) {
|
||||
static const char helix_logo[] PROGMEM = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0};
|
||||
matrix_write_P(matrix, helix_logo);
|
||||
// matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
|
||||
}
|
||||
|
||||
static void render_rgbled_status(bool full, struct CharacterMatrix *matrix) {
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
char buf[30];
|
||||
if (RGBLIGHT_MODES > 1 && rgblight_config.enable) {
|
||||
if (full) {
|
||||
snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", rgblight_config.mode, rgblight_config.hue / RGBLIGHT_HUE_STEP, rgblight_config.sat / RGBLIGHT_SAT_STEP, rgblight_config.val / RGBLIGHT_VAL_STEP);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), "[%2d] ", rgblight_config.mode);
|
||||
}
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
static void render_layer_status(struct CharacterMatrix *matrix) {
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
char buf[10];
|
||||
matrix_write_P(matrix, PSTR("Layer: "));
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
matrix_write_P(matrix, PSTR("Default"));
|
||||
break;
|
||||
case L_RAISE:
|
||||
matrix_write_P(matrix, PSTR("Raise"));
|
||||
break;
|
||||
case L_LOWER:
|
||||
matrix_write_P(matrix, PSTR("Lower"));
|
||||
break;
|
||||
default:
|
||||
matrix_write_P(matrix, PSTR("Undef-"));
|
||||
snprintf(buf, sizeof(buf), "%ld", layer_state);
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
// Render to mode icon
|
||||
static const char os_logo[][2][3] PROGMEM = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}};
|
||||
if (keymap_config.swap_lalt_lgui == false) {
|
||||
matrix_write_P(matrix, os_logo[0][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write_P(matrix, os_logo[0][1]);
|
||||
} else {
|
||||
matrix_write_P(matrix, os_logo[1][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write_P(matrix, os_logo[1][1]);
|
||||
}
|
||||
|
||||
matrix_write_P(matrix, PSTR(" "));
|
||||
render_layer_status(matrix);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
|
||||
// Host Keyboard LED Status
|
||||
matrix_write_P(matrix, (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) ? PSTR("NUMLOCK") : PSTR(" "));
|
||||
matrix_write_P(matrix, (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) ? PSTR("CAPS") : PSTR(" "));
|
||||
matrix_write_P(matrix, (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) ? PSTR("SCLK") : PSTR(" "));
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
render_rgbled_status(true, matrix);
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
# if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if (is_master) {
|
||||
render_status(&matrix);
|
||||
} else {
|
||||
render_logo(&matrix);
|
||||
render_rgbled_status(false, &matrix);
|
||||
render_layer_status(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
165
keyboards/helix/rev2_latam/keymaps/default/readme.md
Normal file
165
keyboards/helix/rev2_latam/keymaps/default/readme.md
Normal file
@ -0,0 +1,165 @@
|
||||
# The Default Helix Layout
|
||||
## Layout
|
||||
|
||||
### Qwerty
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| 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 |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Colemak
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Dvorak
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Tab | ' | , | . | P | Y | | F | G | C | R | L | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
## Layers
|
||||
|
||||
|Priority|number|name|description|
|
||||
| ---- | ---- | --- | --- |
|
||||
|high|16|Adjust|Functions|
|
||||
||4|Raise|Numeric charactors|
|
||||
||3|Lower|Other charactors|
|
||||
||2|Dvorak|Dvorak leyout|
|
||||
||1|Colemak|Colemak leyout|
|
||||
|low|0|Qwerty|QWERTY leyout(base)|
|
||||
|
||||
### Lower
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Raise
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | Reset|RGBRST| | | | | | | | | | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
## Customize
|
||||
|
||||
see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk`
|
||||
|
||||
```
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
# HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
# OLED_ENABLE = no # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
# LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
```
|
||||
## Compile
|
||||
|
||||
go to qmk top directory.
|
||||
```
|
||||
$ cd qmk_firmware
|
||||
```
|
||||
|
||||
build
|
||||
```
|
||||
$ make helix:default
|
||||
$ make helix/rev2/back:default # with backlight
|
||||
$ make HELIX=no_ani helix/rev2/back:default # with backlight without animation
|
||||
$ make helix/rev2/under:default # with underglow
|
||||
$ make helix/rev2/oled:default # with oled
|
||||
$ make helix/rev2/oled/back:default # with oled and backlight
|
||||
$ make helix/rev2/oled/under:default # with oled and underglow
|
||||
```
|
||||
|
||||
build (experimental use of split_common)
|
||||
```
|
||||
$ make helix/rev2/sc:default
|
||||
$ make helix/rev2/sc/back:default
|
||||
$ make helix/rev2/sc/under:default
|
||||
$ make helix/rev2/sc/oled:default
|
||||
$ make helix/rev2/sc/oledback:default
|
||||
$ make helix/rev2/sc/oledunder:default
|
||||
```
|
||||
|
||||
flash to keyboard
|
||||
```
|
||||
$ make helix:default:flash
|
||||
$ make helix/rev2/back:default:flash # with backlight
|
||||
$ make HELIX=no_ani helix/rev2/back:default:flash # with backlight without animation
|
||||
$ make helix/rev2/under:default:flash # with underglow
|
||||
$ make helix/rev2/oled:default:flash # with oled
|
||||
$ make helix/rev2/oled/back:default:flash # with oled and backlight
|
||||
$ make helix/rev2/oled/under:default:flash # with oled and underglow
|
||||
|
||||
```
|
||||
|
||||
## Link
|
||||
* more detail wrote in Japanese [helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)
|
||||
* [Helix top](https://github.com/MakotoKurauchi/helix)
|
||||
|
135
keyboards/helix/rev2_latam/keymaps/default/readme_jp.md
Normal file
135
keyboards/helix/rev2_latam/keymaps/default/readme_jp.md
Normal file
@ -0,0 +1,135 @@
|
||||
# The Default Helix Layout
|
||||
## 配列
|
||||
|
||||
### Qwerty配列
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| 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 |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照
|
||||
|
||||
## カスタマイズ
|
||||
|
||||
Helix キーボードを4行版として製作したり、オプションの OLED をつけたり、
|
||||
RGB バックライトまたは、RGB Underglow をつけた場合は、
|
||||
`qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。
|
||||
|
||||
```
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
# HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
# OLED_ENABLE = no # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
# LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
```
|
||||
|
||||
## 4行版Helix に対応する
|
||||
|
||||
rules.mk の下記の部分を編集して 5 を 4 に変更してください。
|
||||
|
||||
```
|
||||
HELIX_ROWS = 4 # Helix Rows is 4 or 5
|
||||
```
|
||||
|
||||
## RGB バックライトを有効にする
|
||||
|
||||
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||
|
||||
```
|
||||
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
|
||||
```
|
||||
|
||||
## RGB Underglow を有効にする
|
||||
|
||||
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||
```
|
||||
LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
|
||||
```
|
||||
|
||||
## OLEDを有効にする
|
||||
|
||||
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||
```
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
```
|
||||
|
||||
## iPad/iPhoneサポートを有効にする。
|
||||
|
||||
rules.mk の下記の部分を編集して no を yes に変更してください。
|
||||
RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。
|
||||
|
||||
```
|
||||
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
```
|
||||
|
||||
## コンパイルの仕方
|
||||
|
||||
コンパイルは、qmk_firmware のトップディレクトリで行います。
|
||||
|
||||
```
|
||||
$ cd qmk_firmware
|
||||
```
|
||||
qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。
|
||||
|
||||
```
|
||||
$ make helix:default
|
||||
```
|
||||
|
||||
キーボードへの書き込みまで同時に行うには下記のように`:flash`を付けます。
|
||||
|
||||
```
|
||||
$ make helix:default:flash
|
||||
```
|
||||
|
||||
コンパイル結果と中間生成物を消去したい場合は以下のようにします。
|
||||
|
||||
```
|
||||
$ make helix:default:clean
|
||||
```
|
||||
|
||||
上記の、rules.mk によるカスタマイズ項目の一部は下記のようにコマンド上で直接指定することも可能です。
|
||||
|
||||
OLED を有効にしてコンパイルしてキーボードへの書き込む。
|
||||
```
|
||||
$ make helix/rev2/oled:default:flash
|
||||
```
|
||||
|
||||
RGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。
|
||||
```
|
||||
$ make helix/rev2/back:default:flash
|
||||
```
|
||||
|
||||
RGB Underglow を有効にしてコンパイルしてキーボードへ書き込む。
|
||||
```
|
||||
$ make helix/rev2/under:default:flash
|
||||
```
|
||||
|
||||
OLED とRGB バックライトを有効にしてコンパイルしてキーボードへ書き込む。
|
||||
```
|
||||
$ make helix/rev2/oled/back:default:flash
|
||||
```
|
||||
|
||||
OLED とRGB Underglowを有効にしてコンパイルしてキーボードへ書き込む。
|
||||
```
|
||||
$ make helix/rev2/oled/under:default:flash
|
||||
```
|
||||
|
||||
## リンク
|
||||
|
||||
* さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。
|
||||
* [Helix top](https://github.com/MakotoKurauchi/helix)
|
24
keyboards/helix/rev2_latam/keymaps/default/rules.mk
Normal file
24
keyboards/helix/rev2_latam/keymaps/default/rules.mk
Normal file
@ -0,0 +1,24 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
# AUDIO_ENABLE = yes # Audio output on port C6
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
# HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
# OLED_ENABLE = no # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
# LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
26
keyboards/helix/rev2_latam/keymaps/edvorakjp/config.h
Normal file
26
keyboards/helix/rev2_latam/keymaps/edvorakjp/config.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#define SWAP_SCLN
|
||||
|
||||
#undef TAPPING_FORCE_HOLD
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 300
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
38
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap.c
Normal file
38
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap.c
Normal file
@ -0,0 +1,38 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "split_util.h"
|
||||
#include "keymap_xrows.h"
|
||||
#ifdef SSD1306OLED
|
||||
#include "oled.h"
|
||||
#endif
|
||||
|
||||
// keymaps definitions are moved to keymap_Xrows.c.
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void matrix_init_keymap(void) {
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
uint32_t layer_state_set_keymap(uint32_t state) {
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
switch (biton32(state)) {
|
||||
case _LOWER:
|
||||
rgblight_sethsv_noeeprom_red();
|
||||
break;
|
||||
case _RAISE:
|
||||
rgblight_sethsv_noeeprom_blue();
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
||||
rgblight_sethsv_red();
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
#endif
|
41
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap_4rows.c
Normal file
41
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap_4rows.c
Normal file
@ -0,0 +1,41 @@
|
||||
#include "helix.h"
|
||||
#include "keymap_xrows.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_EDVORAK] = LAYOUT_kc(
|
||||
//,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----.
|
||||
GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
ESC ,SCLN, X , C , V , Z , H , J , K , L , B ,SLSH,
|
||||
//|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----|
|
||||
HOME,PGDN,PGUP , END ,TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 ,LEFT ,DOWN , UP ,RGHT
|
||||
//`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_kc(
|
||||
//,----+----+------+------+------+----. ,----+------+------+-------+----+----.
|
||||
, , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , ,
|
||||
//|----+----+------+------+------+----| |----+------+------+-------+----+----|
|
||||
F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 ,
|
||||
//|----+----+------+------+------+----| |----+------+------+-------+----+----|
|
||||
PSCR, , HOME , PGDN , PGUP ,END , LEFT, DOWN , UP , RGHT , , ,
|
||||
//|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----|
|
||||
, , , , , , NO , MAC ,TMB7, , , , ,
|
||||
//`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_kc(
|
||||
//,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----.
|
||||
, ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , ,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
, 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , ,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
PSCR, ,HOME ,PGDN ,PGUP ,END , LEFT,DOWN , UP ,RGHT , , ,
|
||||
//|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----|
|
||||
, , , , , ,WIN , NO , , , , , ,
|
||||
//`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----'
|
||||
)
|
||||
};
|
47
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap_5rows.c
Normal file
47
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap_5rows.c
Normal file
@ -0,0 +1,47 @@
|
||||
#include "helix.h"
|
||||
#include "keymap_xrows.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_EDVORAK] = LAYOUT_kc(
|
||||
//,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----.
|
||||
ESC ,EXLM, AT ,HASH , DLR ,PERC, CIRC,AMPR ,ASTR ,LPRN ,RPRN,BSPC,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS,
|
||||
//|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----|
|
||||
TAB ,SCLN, X , C , V , Z , NO , NO , H , J , K , L , B ,SLSH,
|
||||
//|----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----|
|
||||
HOME,PGDN,PGUP , END ,TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 ,LEFT ,DOWN , UP ,RGHT
|
||||
//`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_kc(
|
||||
//,----+----+------+------+------+----. ,----+------+------+-------+----+----.
|
||||
PSCR, , , , , , , , , , , ,
|
||||
//|----+----+------+------+------+----| |----+------+------+-------+----+----|
|
||||
, , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , ,
|
||||
//|----+----+------+------+------+----| |----+------+------+-------+----+----|
|
||||
F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 ,
|
||||
//|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----|
|
||||
, , HOME , PGDN , PGUP ,END , , ,LEFT, DOWN , UP , RGHT , , ,
|
||||
//|----+----+------+------+------+----+----| |----+----+------+------+-------+----+----|
|
||||
, , , , , , NO , MAC ,TMB7, , , , ,
|
||||
//`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_kc(
|
||||
//,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----.
|
||||
PSCR, , , , , , , , , , , ,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
, ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , ,
|
||||
//|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----|
|
||||
, 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , ,
|
||||
//|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----|
|
||||
, ,HOME ,PGDN ,PGUP ,END , , ,LEFT,DOWN , UP ,RGHT , , ,
|
||||
//|----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----|
|
||||
, , , , , ,WIN , NO , , , , , ,
|
||||
//`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----'
|
||||
)
|
||||
};
|
21
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap_xrows.h
Normal file
21
keyboards/helix/rev2_latam/keymaps/edvorakjp/keymap_xrows.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef KEYMAP_XROWS_H
|
||||
#define KEYMAP_XROWS_H
|
||||
|
||||
#include "edvorakjp.h"
|
||||
/*
|
||||
* enum custom_keycodes {
|
||||
* KC_LOCK = NEW_SAFE_RANGE,
|
||||
* };
|
||||
*/
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_TMB1 KC_LA(TAB)
|
||||
#define KC_TMB2 KC_LS(SPC)
|
||||
#define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped
|
||||
#define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped
|
||||
#define KC_TMB5 KC_RC(BSPC)
|
||||
#define KC_TMB6 KC_RG(ENT)
|
||||
#define KC_TMB7 KC_RC(DEL)
|
||||
|
||||
#endif
|
72
keyboards/helix/rev2_latam/keymaps/edvorakjp/oled.c
Normal file
72
keyboards/helix/rev2_latam/keymaps/edvorakjp/oled.c
Normal file
@ -0,0 +1,72 @@
|
||||
#include <string.h>
|
||||
#include "oled.h"
|
||||
|
||||
static void render_logo(struct CharacterMatrix *matrix) {
|
||||
|
||||
static char logo[] = {
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||
0};
|
||||
matrix_write(matrix, logo);
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
// Render to mode icon
|
||||
static char logo[][2][3] = {{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
int mode_number = get_enable_kc_lang() ? 0 : 1;
|
||||
matrix_write(matrix, logo[mode_number][0]);
|
||||
matrix_write(matrix, "\n");
|
||||
matrix_write(matrix, logo[mode_number][1]);
|
||||
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
char buf[40];
|
||||
snprintf(buf,sizeof(buf), "Undef-%ld", layer_state);
|
||||
matrix_write_P(matrix, PSTR("\nLayer: "));
|
||||
switch (biton32(layer_state)) {
|
||||
case L_BASE:
|
||||
matrix_write_P(matrix, PSTR("Default"));
|
||||
break;
|
||||
case _RAISE:
|
||||
matrix_write_P(matrix, PSTR("Raise"));
|
||||
break;
|
||||
case _LOWER:
|
||||
matrix_write_P(matrix, PSTR("Lower"));
|
||||
break;
|
||||
default:
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
char led[40];
|
||||
snprintf(led, sizeof(led), "\n%s %s %s",
|
||||
(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NMLK" : " ",
|
||||
(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
|
||||
(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
|
||||
matrix_write(matrix, led);
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) { return; }
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if (is_master) {
|
||||
render_status(&matrix);
|
||||
} else {
|
||||
render_logo(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
19
keyboards/helix/rev2_latam/keymaps/edvorakjp/oled.h
Normal file
19
keyboards/helix/rev2_latam/keymaps/edvorakjp/oled.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef OLED_USER_H
|
||||
#define OLED_USER_H
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#include "ssd1306.h"
|
||||
#include "edvorakjp.h"
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
|
||||
extern uint8_t is_master;
|
||||
extern bool japanese_mode;
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source);
|
||||
void render_status(struct CharacterMatrix *matrix);
|
||||
void iota_gfx_task_user(void);
|
||||
|
||||
#endif // OLED_CONFIG_USER_H
|
21
keyboards/helix/rev2_latam/keymaps/edvorakjp/readme.md
Normal file
21
keyboards/helix/rev2_latam/keymaps/edvorakjp/readme.md
Normal file
@ -0,0 +1,21 @@
|
||||
# edvorakjp
|
||||
|
||||
Epaew's Enhanced Dvorak layout for Japanese Programmer
|
||||
see [here](/users/edvorakjp) for more informations.
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew
|
||||
|
||||
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/>.
|
38
keyboards/helix/rev2_latam/keymaps/edvorakjp/rules.mk
Normal file
38
keyboards/helix/rev2_latam/keymaps/edvorakjp/rules.mk
Normal file
@ -0,0 +1,38 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
# HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
# OLED_ENABLE = no # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" instead of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
# LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
||||
|
||||
ifeq ($(strip $(HELIX_ROWS)), 4)
|
||||
SRC += keymap_4rows.c
|
||||
else ifeq ($(strip $(HELIX_ROWS)), 5)
|
||||
SRC += keymap_5rows.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLED_BACK
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
SRC += oled.c
|
||||
endif
|
84
keyboards/helix/rev2_latam/keymaps/five_rows/README.md
Normal file
84
keyboards/helix/rev2_latam/keymaps/five_rows/README.md
Normal file
@ -0,0 +1,84 @@
|
||||
# Keymap for 5 rows Helix keyboard
|
||||
|
||||
This keymap is only for 5 rows Helix keyboard.
|
||||
|
||||
## Layout
|
||||
|
||||

|
||||
|
||||
## Layer
|
||||
|
||||
|Priority|Number|Name|Discription|
|
||||
| ---- | ---- | --- | --- |
|
||||
|high|9|Adjust| keyboard local functions (violet)|
|
||||
||8|KFunction| TenkeyPad function keys (bule)|
|
||||
||7|Extra char| some charactors (red)|
|
||||
||6|Function| function keys (blue)|
|
||||
||2|Keypad|TenkeyPad|
|
||||
||2|Dvorak|Dvorak|
|
||||
||1|Colemak|Colemak|
|
||||
|low|0|Qwerty|QWERTY (base)|
|
||||
|
||||
### Adjust Layer
|
||||
|
||||
Adjust Layer has keyboard local function keys.
|
||||
|
||||
* LED control.
|
||||
* Mac/Win mode change.
|
||||
* Qwerty/Colemak/Dvorak/TenkeyPad change.
|
||||
|
||||

|
||||
|
||||
### Mac mode and Win mode
|
||||
|
||||
Mac mode swap Alt/Win(GUI) key.
|
||||
|
||||
|mode|key|code|
|
||||
| ---- | ---- | --- |
|
||||
|Mac mode|Adjust + g(Qwerty)|AG_NORM|
|
||||
| |Adjust + h(Qwerty)| |
|
||||
|Win mode|Adjust + t(Qwerty)|AG_SWAP|
|
||||
| |Adjust + y(Qwerty)| |
|
||||
|
||||
### LED control
|
||||
|
||||
|command|key|code|
|
||||
| ---- | ---- | --- |
|
||||
|on/off|Adjust + e(Qwerty)|RGB_TOG|
|
||||
| |Adjust + i(Qwerty)| |
|
||||
|change mode|Adjust + d(Qwerty) |RGB_MOD|
|
||||
| |Adjust + k(Qwerty)| |
|
||||
|HUE +|Adjust + Left Control|RGB_HUI|
|
||||
| |Adjust + Right Control| |
|
||||
|HUE -|Adjust + Left Shift |RGB_HUD|
|
||||
| |Adjust + Right Shift | |
|
||||
|SAT +|Adjust + ;(Qwerty) |RGB_SAI|
|
||||
| |Adjust + a(Qwerty) | |
|
||||
|SAT -|Adjust + z(Qwerty) |RGB_SAD|
|
||||
| |Adjust + /(Qwerty) | |
|
||||
|Bright +|Adjust + s(Qwerty) |RGB_VAI|
|
||||
| |Adjust + l(Qwerty) | |
|
||||
|Bright -|Adjust + x(Qwerty) |RGB_VAD|
|
||||
| |Adjust + >(Qwerty) | |
|
||||
|reset|Adjust + w|RGBRST|
|
||||
|
||||
### Qwerty, Colemak, Dvorak, TenkeyPad selection
|
||||
|
||||
|char layout|key|
|
||||
| ---- | ---- |
|
||||
|Qwerty | Adjust + 5 |
|
||||
| | Adjust + 6 |
|
||||
|Calemak| Adjust + 4 |
|
||||
| | Adjust + 7 |
|
||||
|Dvorak | Adjust + 3 |
|
||||
| | Adjust + 8 |
|
||||
|Keypad | Adjust + 2 |
|
||||
| | Adjust + 9 |
|
||||
|
||||
## TenkeyPad layout
|
||||
|
||||

|
||||
|
||||
## Note
|
||||
|
||||

|
121
keyboards/helix/rev2_latam/keymaps/five_rows/README_jp.md
Normal file
121
keyboards/helix/rev2_latam/keymaps/five_rows/README_jp.md
Normal file
@ -0,0 +1,121 @@
|
||||
# Keymap for 5 rows Helix keyboard
|
||||
|
||||
本キーマップは、Helix キーボードの5行版専用のキーマップです。
|
||||
|
||||
普通のキーボード使用者が、Helix キーボードを使うときになるべく違いが少なく戸惑いが少なくなるように意図したキーマップです。(意図通り成功しているかどうかは使用する人の判断で、、、)
|
||||
|
||||
## キー配置
|
||||
以下に、Qwerty配列時の、文字配列の図を示します。
|
||||
|
||||

|
||||
|
||||
## レイヤー
|
||||
|
||||
|優先順位|番号|名称|内容|
|
||||
| ---- | ---- | --- | --- |
|
||||
|高い|9|Adjust|機能キー(紫)|
|
||||
||8|KFunction|テンキーパッド用ファンクションキー類(青)|
|
||||
||7|Extra char|記号類(赤)|
|
||||
||6|Function|ファンクションキー類(青)|
|
||||
||3|Keypad|テンキーパッド配列|
|
||||
||2|Dvorak|Dvorak配列|
|
||||
||1|Colemak|Colemak配列|
|
||||
|低い|0|Qwerty|QWERTY配列(ベース)|
|
||||
|
||||
Qwerty/Colemak/Dvorak/Keypad の各レイヤーは、後述する、Ajuestレイヤーの キーによる選択で、いずれか一つだけが有効になり、標準のキーマップとなります。
|
||||
|
||||
Function レイヤーは、下段両端の4つのFnキーのどれかひとつを押している間だけ有効になり、矢印キー等のナビゲーションキーや F1, F2, ...F12キーなどが配置されています。
|
||||
上の図の青色の刻印のキーのあるレイヤーです。
|
||||
|
||||
Extra レイヤーは、下段中央部の Enter キーか BS キーを一定時間(0.2秒)以上押していると押している間だけ有効になり、'+=-_[]{}' の 8つの記号と「英数」キー、「かな」キーが配置されています。
|
||||
このため、Enter/BS キーで Enter/BS を入力するには、Enter/BSキーを押して短時間ですぐ離してください。
|
||||
上の図の赤色の刻印のキーのあるレイヤーです。
|
||||
|
||||
Adjust レイヤーは、Adjust キーを押している間有効になります。
|
||||
Adjust キーは Function レイヤーに有り、下段両端の4つのFnキーのどれか一つを押しながら、下段中央部の Enter キーか BS キーを押すことで Adjust レイヤーが有効になります。
|
||||
Adjust キー (Enter/BS)を押した後は、Fnキーは離して構いません。
|
||||
|
||||
### Adjust レイヤー
|
||||
Ajust レイヤーは、LEDのコントロール、Mac/Win モードの切り替え、Qwerty配列, Colemak配列, Dvorak配列, TenkeyPad配列の切り替えが行えます。
|
||||
|
||||

|
||||
|
||||
### MacモードとWinモード
|
||||
キーボードには、Mac モードと、Win モードの二つのモードがあります。
|
||||
|
||||
現在のモードはOLEDにアイコンとして表示されます。
|
||||
(以下の指定キーは、Qwerty配列時の文字を使ってキーを表示しています)
|
||||
|
||||
|コマンド|指定キー|コード|
|
||||
| ---- | ---- | --- |
|
||||
|Macモード|Adjust + g(Qwerty)|AG_NORM|
|
||||
| |Adjust + h(Qwerty)| |
|
||||
|Winモード|Adjust + t(Qwerty)|AG_SWAP|
|
||||
| |Adjust + y(Qwerty)| |
|
||||
|
||||
Mac モードと Win モードでは、AltキーとWin(GUI)キーが入れ替わります。
|
||||
|
||||
Mac モードでは、Extra レイヤー の「英数」キーと「かな」キーで英語モードと日本語モードの切り替えができます。
|
||||
|
||||
Winモードでは、該当のキーはどちらも共に Alt + `(日本語IMEの切り替え)として入力されます。
|
||||
|
||||
### LEDコントロール
|
||||
|
||||
バックライトやUnderglowをコントロールするにはAdjustレイヤーにある機能キーを使います。
|
||||
(以下の指定キーは、Qwerty配列時の文字を使ってキーを表示しています)
|
||||
|
||||
|コマンド|指定キー|コード|
|
||||
| ---- | ---- | --- |
|
||||
|オン/オフ|Adjust + e(Qwerty)|RGB_TOG|
|
||||
| |Adjust + i(Qwerty)| |
|
||||
|モード切り替え|Adjust + d(Qwerty) |RGB_MOD|
|
||||
| |Adjust + k(Qwerty)| |
|
||||
|色相 +|Adjust + Left Control|RGB_HUI|
|
||||
| |Adjust + Right Control| |
|
||||
|色相 -|Adjust + Left Shift |RGB_HUD|
|
||||
| |Adjust + Right Shift | |
|
||||
|彩度 +|Adjust + ;(Qwerty) |RGB_SAI|
|
||||
| |Adjust + a(Qwerty) | |
|
||||
|彩度 -|Adjust + z(Qwerty) |RGB_SAD|
|
||||
| |Adjust + /(Qwerty) | |
|
||||
|明度 +|Adjust + s(Qwerty) |RGB_VAI|
|
||||
| |Adjust + l(Qwerty) | |
|
||||
|明度 -|Adjust + x(Qwerty) |RGB_VAD|
|
||||
| |Adjust + >(Qwerty) | |
|
||||
|リセット|Adjust + w|RGBRST|
|
||||
|
||||
### 文字配列選択
|
||||
Qwerty, Colemak, Dvorak, Keypad それぞれの文字配列の選択は以下のキーを使います。
|
||||
|
||||
|選択配列|指定キー|
|
||||
| ---- | ---- |
|
||||
|Qwerty | Adjust + 5 |
|
||||
| | Adjust + 6 |
|
||||
|Calemak| Adjust + 4 |
|
||||
| | Adjust + 7 |
|
||||
|Dvorak | Adjust + 3 |
|
||||
| | Adjust + 8 |
|
||||
|Keypad | Adjust + 2 |
|
||||
| | Adjust + 9 |
|
||||
|
||||
## テンキーパッドのキー配置
|
||||
以下に、テンキーパッド配列時の、文字配列の図を示します。
|
||||
|
||||

|
||||
|
||||
図でわかるように、テンキーと F1,F2..F12 のキー入力ができる配列です。
|
||||
F12キーは一定時間(0.2秒)以上押していると KFunc キーとして働き、押している間は、青色の刻印のキー入力を行えます。
|
||||
F12 そのものを入力するときは押して短時間ですぐ離してください。
|
||||
F12キーを押しているときは、F11キー は Adjust キーとなり、Adjust レイヤーが有効になります。
|
||||
これによって、Qwerty 配列などに戻すことが可能になります。
|
||||
|
||||
## 備考
|
||||
本キーマップは、通常のキーボードの主要部分のホームポジション周辺をなるべくそのまま踏襲する方針で作成しました。
|
||||
変更点は以下の通りです。
|
||||
|
||||
* 右手小指により多く割り当たっていた5つの記号と左上の1つの記号を中央に集め人差し指の担当とする。
|
||||
* Enter キーを親指担当として中央手前に移動。
|
||||
* Control キーを左右共にホームポジションの行に移動。
|
||||
* 左手親指に BackSpace キーを割り当てる。
|
||||
|
||||

|
47
keyboards/helix/rev2_latam/keymaps/five_rows/config.h
Normal file
47
keyboards/helix/rev2_latam/keymaps/five_rows/config.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 300
|
||||
#define PERMISSIVE_HOLD
|
||||
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
|
||||
see tmk_core/common/action_tapping.c */
|
||||
|
||||
// place overrides here
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
597
keyboards/helix/rev2_latam/keymaps/five_rows/keymap.c
Normal file
597
keyboards/helix/rev2_latam/keymaps/five_rows/keymap.c
Normal file
@ -0,0 +1,597 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "bootloader.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
#ifdef CONSOLE_ENABLE
|
||||
#include <print.h>
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_EUCALYN,
|
||||
_KEYPAD,
|
||||
_AUX,
|
||||
_KAUX,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PADFUNC,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
EUCALYN,
|
||||
KEYPAD,
|
||||
KC_xEISU,
|
||||
KC_xKANA,
|
||||
KC_ZERO2,
|
||||
RGBRST
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define KC_LOWER MO(_LOWER)
|
||||
#define KC_RABS LT(_RAISE,KC_BSPC)
|
||||
#define KC_RAEN LT(_RAISE,KC_ENT)
|
||||
#define KC_FF12 LT(_PADFUNC,KC_F12)
|
||||
#define KC_____ _______
|
||||
#define KC_XXXX XXXXXXX
|
||||
#define KC_ADJ MO(_ADJUST)
|
||||
#define KC_LSMI LSFT(KC_MINS)
|
||||
#define KC_LSEQ LSFT(KC_EQL)
|
||||
#define KC_LSRB LSFT(KC_RBRC)
|
||||
#define KC_LSLB LSFT(KC_LBRC)
|
||||
#define ___ _______
|
||||
|
||||
#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_kc( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \
|
||||
TAB, Q, W, E, R, T, Y, U, I, O, P, BSLS, \
|
||||
LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCTL, \
|
||||
LSFT, Z, X, C, V, B, GRV, QUOT, N, M, COMM, DOT, SLSH, RSFT, \
|
||||
LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_kc( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \
|
||||
TAB, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \
|
||||
LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \
|
||||
LSFT, Z, X, C, V, B, GRV, QUOT, K, M, COMM, DOT, SLSH, RSFT, \
|
||||
LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_kc( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \
|
||||
TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \
|
||||
LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \
|
||||
LSFT, SCLN, Q, J, K, X, GRV, SLSH, B, M, W, V, Z, RSFT, \
|
||||
LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
|
||||
/* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EUCALYN] = LAYOUT_kc( \
|
||||
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \
|
||||
TAB, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \
|
||||
LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \
|
||||
LSFT, Z, X, C, V, F, GRV, QUOT, B, H, J, L, SLSH, RSFT, \
|
||||
LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
|
||||
/* Keypad
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | 0 | , | . | Enter| F5 | F10 | F12 | F12 | F5 | F10 | Enter| 0 | , | . |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_KEYPAD] = LAYOUT_kc( \
|
||||
TAB, PSLS, PAST, DEL, F1, F6, F1, F6, DEL, TAB, PSLS, PAST, \
|
||||
KP_7, KP_8, KP_9, BSPC, F2, F7, F2, F7, BSPC, KP_7, KP_8, KP_9, \
|
||||
KP_4, KP_5, KP_6, PMNS, F3, F8, F3, F8, PMNS, KP_4, KP_5, KP_6, \
|
||||
KP_1, KP_2, KP_3, PPLS, F4, F9, F11, F11, F4, F9, PPLS, KP_1, KP_2, KP_3, \
|
||||
KP_0, COMM, PDOT, PENT, F5, F10, FF12, FF12, F5, F10, PENT, KP_0, COMM, PDOT \
|
||||
),
|
||||
|
||||
/* AUX modifier key layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | 00 | | | | | | | | | | | 00 | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_KAUX] = LAYOUT_kc( \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ZERO2,____ \
|
||||
),
|
||||
|
||||
/* Keypad function layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | Pause| ScrLk| PtrSc| | PtrSc| ScrLk| Pause| | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | Home | Up | PgUp | | PgUp | Up | Home | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | |Delete|Insert| Left | Down | Right| | Left | Down | Right|Insert|Delete| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | End | | PgDn |Adjust|Adjust| PgDn | | End | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_PADFUNC] = LAYOUT_kc( \
|
||||
XXXX, XXXX, XXXX, PAUS, SLCK, PSCR, PSCR, SLCK, PAUS, XXXX, XXXX, XXXX, \
|
||||
XXXX, XXXX, XXXX, HOME, UP, PGUP, PGUP, UP, HOME, XXXX, XXXX, XXXX, \
|
||||
XXXX, DEL, INS, LEFT, DOWN, RGHT, LEFT, DOWN, RGHT, INS, DEL, XXXX, \
|
||||
XXXX, XXXX, XXXX, END, XXXX, PGDN, ADJ, ADJ, PGDN, XXXX, END, XXXX, XXXX, XXXX, \
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | PgDn | Left | Down | Right| End |Adjust|Adjust| End | Left | Down | Right| PgDn | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | PrtSc| | | | | | | | | PrtSc| | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_kc( \
|
||||
XXXX, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \
|
||||
XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, F12, \
|
||||
____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \
|
||||
____, END, LEFT, DOWN, RGHT, PGDN, XXXX, XXXX, PGDN, LEFT, DOWN, RGHT, END, ____, \
|
||||
____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | _ | - | | = | + | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | { | [ | | ] | } | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | EISU | EISU | KANA | KANA | Next | Vol- | Vol+ | Play | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_kc( \
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \
|
||||
XXXX, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \
|
||||
____, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, ____, \
|
||||
____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA,MNXT, VOLD, VOLU, MPLY, ____, \
|
||||
ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | |Keypad|Dvorak|Colemk|Euclyn|Qwerty| |Qwerty|Euclyn|Colemk|Dvorak|Keypad| |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | Reset|RGBRST|RGB ON|Aud on| Win | | Win |Aud on|RGB ON|RGBRST| | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | HUE+ | SAT+ | VAL+ |RGB md|Audoff| Mac | | Mac |Audoff|RGB md| VAL+ | SAT+ | HUE+ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | HUE- | SAT- | VAL- | | | | | | | | | VAL- | SAT- | HUE- |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
XXXXXXX, KEYPAD, DVORAK, COLEMAK, EUCALYN, QWERTY, QWERTY, EUCALYN, COLEMAK, DVORAK, KEYPAD, XXXXXXX, \
|
||||
XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, \
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \
|
||||
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \
|
||||
),
|
||||
|
||||
/* AUX modifier key layer
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | BS | Enter| | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_AUX] = LAYOUT_kc( \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||
____, ____, ____, ____, ____, BSPC, RAEN, ____, ____, ____, ____, ____, ____, ____ \
|
||||
)
|
||||
};
|
||||
|
||||
#else
|
||||
#error "undefined keymaps"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
static int current_default_layer;
|
||||
|
||||
uint32_t default_layer_state_set_kb(uint32_t state) {
|
||||
// 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0)
|
||||
// 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1)
|
||||
current_default_layer = state - 1;
|
||||
// 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2)
|
||||
if ( current_default_layer == 3 ) current_default_layer -= 1;
|
||||
// 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3)
|
||||
if ( current_default_layer == 7 ) current_default_layer -= 4;
|
||||
// 1<<_KEYPAD - 12 == 16 - 12 == _KEYPAD (=4)
|
||||
if ( current_default_layer == 15 ) current_default_layer -= 11;
|
||||
return state;
|
||||
}
|
||||
|
||||
void update_base_layer(int base)
|
||||
{
|
||||
if( current_default_layer != base ) {
|
||||
eeconfig_update_default_layer(1UL<<base);
|
||||
default_layer_set(1UL<<base);
|
||||
layer_off(_AUX);
|
||||
layer_off(_KAUX);
|
||||
} else {
|
||||
if( base < _KEYPAD )
|
||||
layer_invert(_AUX);
|
||||
else
|
||||
layer_invert(_KAUX);
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
update_base_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
update_base_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
update_base_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EUCALYN:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
update_base_layer(_EUCALYN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KEYPAD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
update_base_layer(_KEYPAD);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_ZERO2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("00");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_xEISU:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG2);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_xKANA:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG1);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
return false;
|
||||
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) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void render_logo(struct CharacterMatrix *matrix) {
|
||||
|
||||
static char logo[]={
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||
0};
|
||||
matrix_write(matrix, logo);
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
char buf[30];
|
||||
if (RGBLIGHT_MODES > 1 && rgblight_config.enable) {
|
||||
snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ",
|
||||
rgblight_config.mode,
|
||||
rgblight_config.hue/RGBLIGHT_HUE_STEP,
|
||||
rgblight_config.sat/RGBLIGHT_SAT_STEP,
|
||||
rgblight_config.val/RGBLIGHT_VAL_STEP);
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
#endif
|
||||
//matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
|
||||
}
|
||||
|
||||
static const char Qwerty_name[] PROGMEM = " Qwerty";
|
||||
static const char Colemak_name[] PROGMEM = " Colemak";
|
||||
static const char Dvorak_name[] PROGMEM = " Dvorak";
|
||||
static const char Eucalyn_name[] PROGMEM = " Eucalyn";
|
||||
static const char Keypad_name[] PROGMEM = " Keypad";
|
||||
|
||||
static const char AUX_name[] PROGMEM = ":AUX";
|
||||
static const char KAUX_name[] PROGMEM = ":00";
|
||||
static const char Padfunc_name[] PROGMEM = ":PadFunc";
|
||||
static const char Lower_name[] PROGMEM = ":Func";
|
||||
static const char Raise_name[] PROGMEM = ":Extra";
|
||||
static const char Adjust_name[] PROGMEM = ":Adjust";
|
||||
|
||||
static const char *layer_names[] = {
|
||||
[_QWERTY] = Qwerty_name,
|
||||
[_COLEMAK] = Colemak_name,
|
||||
[_DVORAK] = Dvorak_name,
|
||||
[_EUCALYN]= Eucalyn_name,
|
||||
[_KEYPAD] = Keypad_name,
|
||||
[_AUX] = AUX_name,
|
||||
[_KAUX] = KAUX_name,
|
||||
[_LOWER] = Lower_name,
|
||||
[_RAISE] = Raise_name,
|
||||
[_PADFUNC]= Padfunc_name,
|
||||
[_ADJUST] = Adjust_name
|
||||
};
|
||||
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
// Render to mode icon
|
||||
static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
matrix_write(matrix, logo[0][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, logo[0][1]);
|
||||
}else{
|
||||
matrix_write(matrix, logo[1][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, logo[1][1]);
|
||||
}
|
||||
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
int name_num;
|
||||
uint32_t lstate;
|
||||
matrix_write_P(matrix, layer_names[current_default_layer]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
for( lstate = layer_state, name_num = 0;
|
||||
lstate && name_num < sizeof(layer_names)/sizeof(char *);
|
||||
lstate >>=1, name_num++ ) {
|
||||
if( (lstate & 1) != 0 ) {
|
||||
if( layer_names[name_num] ) {
|
||||
matrix_write_P(matrix, layer_names[name_num]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
char led[40];
|
||||
snprintf(led, sizeof(led), "\n%s %s %s",
|
||||
(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
|
||||
(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
|
||||
(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
|
||||
matrix_write(matrix, led);
|
||||
}
|
||||
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if(is_master){
|
||||
render_status(&matrix);
|
||||
}else{
|
||||
render_logo(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
35
keyboards/helix/rev2_latam/keymaps/five_rows/rules.mk
Normal file
35
keyboards/helix/rev2_latam/keymaps/five_rows/rules.mk
Normal file
@ -0,0 +1,35 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# CONSOLE_ENABLE and COMMAND_ENABLE
|
||||
# yes, no +1500
|
||||
# yes, yes +3200
|
||||
# no, yes +400
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
# OLED_ENABLE = no # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
# LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
ifneq ($(strip $(HELIX)),)
|
||||
ifeq ($(findstring console,$(HELIX)), console)
|
||||
CONSOLE_ENABLE = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
58
keyboards/helix/rev2_latam/keymaps/five_rows_jis/config.h
Normal file
58
keyboards/helix/rev2_latam/keymaps/five_rows_jis/config.h
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
// place overrides here
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#define MOUSEKEY_INTERVAL 0
|
||||
|
||||
#undef MOUSEKEY_TIME_TO_MAX
|
||||
#define MOUSEKEY_TIME_TO_MAX 150
|
||||
|
||||
#undef MOUSEKEY_MAX_SPEED
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
|
||||
#undef MOUSEKEY_MOVE_DELTA
|
||||
#define MOUSEKEY_MOVE_DELTA 5
|
||||
|
||||
#undef MOUSEKEY_DELAY
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#endif
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
443
keyboards/helix/rev2_latam/keymaps/five_rows_jis/keymap.c
Normal file
443
keyboards/helix/rev2_latam/keymaps/five_rows_jis/keymap.c
Normal file
@ -0,0 +1,443 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_jp.h"
|
||||
#include "bootloader.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
// * If you want to recognize that you pressed the Adjust key with the Lower / Raise key you can enable this comment out. However, the binary size may be over. *
|
||||
// #define ADJUST_MACRO_ENABLE
|
||||
|
||||
// * If you want to use the Kana key you can enable this comment out. However, the binary size may be over. *
|
||||
// #define KANA_ENABLE
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_BASE = 0,
|
||||
_BAS_E,
|
||||
_LOWER,
|
||||
_LOW_E,
|
||||
_RAISE,
|
||||
_RAI_E,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
RGBRST = SAFE_RANGE,
|
||||
#ifdef KANA_ENABLE
|
||||
EISU,
|
||||
KANA,
|
||||
#endif
|
||||
};
|
||||
|
||||
// Layer Mode aliases
|
||||
#define DL_BAS DF(_BASE)
|
||||
#define DL_BASE DF(_BAS_E)
|
||||
#define ML_LOW MO(_LOWER)
|
||||
#define ML_LOWE MO(_LOW_E)
|
||||
#define ML_RAI MO(_RAISE)
|
||||
#define ML_RAIE MO(_RAI_E)
|
||||
#define ML_ADJ MO(_ADJUST)
|
||||
|
||||
#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty JIS Normal
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | 1! | 2" | 3# | 4$ | 5% | | 6& | 7' | 8( | 9) | 0 | -= |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | KANJI| Q | W | E | R | T | | Y | U | I | O | P | @` |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | | H | J | K | L | ;+ | :* |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | B | N | M | ,< | .> | Up |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt |Adjust|Lower |Space |Bksp |Space |Space |Raise | APP | Left | Down |Right |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BASE] = LAYOUT( \
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
|
||||
JP_ZHTG, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, ML_ADJ, ML_LOW, KC_SPC, KC_BSPC, KC_SPC, KC_SPC, ML_RAI, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Qwerty JIS Exchange L and R
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | 6& | 7' | 8( | 9) | 0 | -= | | Esc | 1! | 2" | 3# | 4$ | 5% |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Y | U | I | O | P | @` | | Tab | Q | W | E | R | T |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | H | J | K | L | ;+ | :* | | | A | S | D | F | G |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | N | M | ,< | .> | /? | Up |Enter |KANJI | Shift| Z | X | C | V | B |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Space |Raise | }] | APP | Left | Down |Right |Adjust| Ctrl | GUI | Alt | [{ |Lower | Bksp |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BAS_E] = LAYOUT( \
|
||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \
|
||||
KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, \
|
||||
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, JP_ZHTG, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \
|
||||
KC_SPC, ML_RAIE, JP_RBRC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, ML_ADJ, KC_LCTL, KC_LALT, KC_LGUI, JP_LBRC, ML_LOWE, KC_BSPC \
|
||||
),
|
||||
|
||||
/* Lower JIS Normal
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | | | | | | | | -= | ^~ | \| |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | @` | [{ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | ;+ | :* | ]} |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | ,< | .> | /? | \_ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | Del | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT( \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, JP_CIRC, JP_YEN, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_AT, JP_LBRC, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, JP_COLN, JP_RBRC, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, \
|
||||
_______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_DEL, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||
),
|
||||
|
||||
/* Lower JIS Exchange L and R
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | -= | ^~ | \| | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | @` | [{ | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | ;+ | :* | ]} | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | ,< | .> | /? | \_ |PageUp| | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | Home |PageDn| End | | | | | | | Del |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOW_E] = LAYOUT( \
|
||||
_______, XXXXXXX, XXXXXXX, KC_MINS, JP_CIRC, JP_YEN, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, JP_AT, JP_LBRC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, XXXXXXX, XXXXXXX, KC_SCLN, JP_COLN, JP_RBRC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_PGUP, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, _______, XXXXXXX, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, XXXXXXX, _______, KC_DEL \
|
||||
),
|
||||
|
||||
/* Raise JIS Normal
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | |MsWhL |MsWhU | Home |PageUp| F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | |MsWhR |MsWhD | End |PageDn| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | |MsBtn1|MsBtn2| MsUp | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |MsLeft|MsDown|MsRght|
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT( \
|
||||
_______, KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, KC_F12, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXXXX, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, KC_MS_U, XXXXXXX, \
|
||||
_______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R \
|
||||
),
|
||||
|
||||
/* Raise JIS Exchange L and R
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | F6 | F7 | F8 | F9 | F10 | F11 | | | F1 | F2 | F3 | F4 | F5 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |MsWhL |MsWhU | F12 | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |MsWhR |MsWhD | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | |MsBtn1|MsBtn2| MsUp | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | |MsLeft|MsDown|MsRght| | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAI_E] = LAYOUT( \
|
||||
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_U, KC_F12, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_R, KC_WH_D, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, KC_MS_U, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, _______, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise) Common map for Normal and Exchange
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | Reset|RGBRST| | | | | | Reset|RGBRST| | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | |ModNrm|ModExc| Mac | Win | | | |ModNrm|ModExc| Mac | Win | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------|------+
|
||||
* | |RGB ON| HUE+ | SAT+ | VAL+ | | | |RGB ON| HUE+ | SAT+ | VAL+ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------|------+
|
||||
* | | MODE | HUE- | SAT- | VAL- | | | | | MODE | HUE- | SAT- | VAL- | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
XXXXXXX, RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, DL_BAS, DL_BASE, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, DL_BAS, DL_BASE, AG_NORM, AG_SWAP, XXXXXXX, \
|
||||
XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, \
|
||||
XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
};
|
||||
|
||||
#else
|
||||
#error "undefined keymaps"
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
char keylog[24] = {};
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ',
|
||||
' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
static inline void set_keylog(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
char name = ' ';
|
||||
uint8_t leds = host_keyboard_leds();
|
||||
|
||||
if (keycode < 60)
|
||||
{
|
||||
name = code_to_name[keycode];
|
||||
}
|
||||
|
||||
// update keylog
|
||||
snprintf(keylog, sizeof(keylog), "\n%dx%d %2x %c %c %c %c",
|
||||
record->event.key.row,
|
||||
record->event.key.col,
|
||||
keycode,
|
||||
name,
|
||||
(leds & (1<<USB_LED_NUM_LOCK)) ? 'N' : ' ',
|
||||
(leds & (1<<USB_LED_CAPS_LOCK)) ? 'C' : ' ',
|
||||
(leds & (1<<USB_LED_SCROLL_LOCK)) ? 'S' : ' '
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT(mode) rgblight_mode(mode)
|
||||
#else
|
||||
#define RGBLIGHT(mode)
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
int RGB_current_mode;
|
||||
#ifdef ADJUST_MACRO_ENABLE
|
||||
// Setting ADJUST layer RGB back to default
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
RGBLIGHT(RGB_current_mode);
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
#define ADJUST_MACRO(layer1, layer2, layer3) update_tri_layer_RGB(layer1, layer2, layer3)
|
||||
#else
|
||||
#define ADJUST_MACRO(layer1, layer2, layer3)
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef SSD1306OLED
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (keycode) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||
case RGB_MOD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef KANA_ENABLE
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
if (keymap_config.swap_lalt_lgui==false) {
|
||||
register_code(KC_LANG2);
|
||||
} else {
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG1);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGBRST:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
|
||||
static inline void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE _BASE
|
||||
#define L_LOWER (1<<_LOWER)
|
||||
#define L_RAISE (1<<_RAISE)
|
||||
#define L_ADJUST (1<<_ADJUST)
|
||||
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
|
||||
#define L_LOW_E (1<<_LOW_E)
|
||||
#define L_RAI_E (1<<_RAI_E)
|
||||
#define L_ADJUST_TRIE (L_ADJUST|L_RAI_E|L_LOW_E)
|
||||
|
||||
const char helix_logo[]={
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||
0};
|
||||
|
||||
static inline void render_logo(struct CharacterMatrix *matrix) {
|
||||
|
||||
matrix_write(matrix, helix_logo);
|
||||
}
|
||||
|
||||
const char mac_win_logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
|
||||
static inline void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
char buf[20];
|
||||
// Render to mode icon
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
matrix_write(matrix, mac_win_logo[0][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, mac_win_logo[0][1]);
|
||||
} else {
|
||||
matrix_write(matrix, mac_win_logo[1][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, mac_win_logo[1][1]);
|
||||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
snprintf(buf, sizeof(buf), " LED mode:%d", (short)RGB_current_mode);
|
||||
matrix_write(matrix, buf);
|
||||
#endif
|
||||
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
matrix_write_P(matrix, PSTR("\nLayer: "));
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
matrix_write_P(matrix, default_layer_state == (1UL<<_BAS_E) ? PSTR("BaseEx") : PSTR("Base"));
|
||||
break;
|
||||
case L_RAISE:
|
||||
matrix_write_P(matrix, PSTR("Raise"));
|
||||
break;
|
||||
case L_RAI_E:
|
||||
matrix_write_P(matrix, PSTR("RaiseEx"));
|
||||
break;
|
||||
case L_LOWER:
|
||||
matrix_write_P(matrix, PSTR("Lower"));
|
||||
break;
|
||||
case L_LOW_E:
|
||||
matrix_write_P(matrix, PSTR("LowerEx"));
|
||||
break;
|
||||
case L_ADJUST:
|
||||
case L_ADJUST_TRI:
|
||||
case L_ADJUST_TRIE:
|
||||
matrix_write_P(matrix, PSTR("Adjust"));
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "%d", (short)layer_state);
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
|
||||
matrix_write(matrix, keylog);
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if (is_master) {
|
||||
render_status(&matrix);
|
||||
} else {
|
||||
render_logo(&matrix);
|
||||
}
|
||||
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
150
keyboards/helix/rev2_latam/keymaps/five_rows_jis/readme.md
Normal file
150
keyboards/helix/rev2_latam/keymaps/five_rows_jis/readme.md
Normal file
@ -0,0 +1,150 @@
|
||||
# Helix 5 rows JIS layout
|
||||
|
||||
This keymap was created with the concept that users using Japanese JIS keyboard layout can operate without difficulty. It has the following features.
|
||||
|
||||
* We are considering to be able to input long Japanese notes without moving the layer
|
||||
* We are arranging the relation of symbols that can not fit in the Lower layer keeping the positional relationship
|
||||
* The four-way key is in a convex arrangement
|
||||
* Ctrl, Shift, Tab, Kanji, Esc, GUI (Win), App keys are arranged keeping positional relationship
|
||||
* Lower / Raise keymap is considering easy placement so that it can be used without memorizing
|
||||
|
||||
This keymap also includes a "NORMAL" keymap that uses Helix's split keyboard as usual, and an "EXCHANGE" key that exchanges left and right sides of Helix's split keyboard for key position optimization I am trying to switch maps. These have the following additional features.
|
||||
|
||||
## NORMAL Keymap
|
||||
|
||||
* It is possible to press the N key with the left index finger and the B key with the right index finger
|
||||
|
||||
## EXCHANGE Keymap
|
||||
|
||||
* By using the 2 key under Pro micro effectively add `` `[{` `` `` `]]` ``, `` `/?` `` Keys to NORMAL's base keymap And make inputs other than the `` `\ _` `` key possible with the base map
|
||||
* To avoid mistakes in pressing the Kanji key and the Enter key, we are moving to the 2 key.
|
||||
|
||||
## 配列
|
||||
|
||||
### NORMAL Keymap
|
||||
|
||||
Adjust + ModExc key switches to the NORMAL keymap.
|
||||
|
||||
Base Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| Esc | 1! | 2" | 3# | 4$ | 5% | | 6& | 7' | 8( | 9) | 0 | -= |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| KANJI| Q | W | E | R | T | | Y | U | I | O | P | @` |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Tab | A | S | D | F | G | | H | J | K | L | ;+ | :* |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | B | N | M | ,< | .> | Up |Enter |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl | GUI | Alt |Adjust|Lower |Space |Bksp |Space |Space |Raise | APP | Left | Down |Right |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Lower Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | | | | | | | | | | -= | ^~ | \| |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | @` | [{ |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | | | | ;+ | :* | ]} |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | ,< | .> | /? | \_ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | Del | | | | | | | |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Raise Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | F12 | | | | Home |PageUp|
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | End |PageDn|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| |MsBtn1|MsBtn2| | | | | | | | | | MsUp | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | |MsLeft|MsDown|MsRght|
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### EXCHANGE Keymap
|
||||
|
||||
Adjust + ModExc key switches to the EXCHANGE keymap.
|
||||
|
||||
Base Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| Esc | 1! | 2" | 3# | 4$ | 5% || 6& | 7' | 8( | 9) | 0 | -= |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T || Y | U | I | O | P | @` |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | A | S | D | F | G || H | J | K | L | ;+ | :* |
|
||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||
|KANJI | Shift| Z | X | C | V | B || N | M | ,< | .> | /? | Up |Enter |
|
||||
|------+------+------+------+------+------+------||------+------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | GUI | Alt | [{ |Lower | Bksp ||Space |Raise | }] | APP | Left | Down |Right |
|
||||
`------------------------------------------------'`------------------------------------------------'
|
||||
```
|
||||
|
||||
Lower Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| | | | | | || | | | -= | ^~ | \| |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | | | @` | [{ |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | | ;+ | :* | ]} |
|
||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||
| | | | | | | || | ,< | .> | /? | \_ |PageUp| |
|
||||
|------+------+------+------+------+------+------||------+------+------+------+------+------+------|
|
||||
| | | | | | | Del || | | | | Home |PageDn| End |
|
||||
`------------------------------------------------'`------------------------------------------------'
|
||||
```
|
||||
|
||||
Raise Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || F12 | | | | | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | | | | |
|
||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||
| | |MsBtn1|MsBtn2| | | || | | | | | MsUp | |
|
||||
|------+------+------+------+------+------+------||------+------+------+------+------+------+------|
|
||||
| | | | | | | || | | | |MsLeft|MsDown|MsRght|
|
||||
`------------------------------------------------'`------------------------------------------------'
|
||||
```
|
||||
|
||||
### NORMAL/EXCHANGE common Layer
|
||||
|
||||
Adjust Layer
|
||||
|
||||
NORMAL / EXCHANGE This layer is used in common. The same items are arranged in the same row on both sides so that they can be used in common.
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | Reset|RGBRST|Aud on|Audoff| | | | Reset|RGBRST|Aud on|Audoff| |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| |ModNrm|ModExc| Mac | Win | | | |ModNrm|ModExc| Mac | Win | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------|------+
|
||||
| |RGB ON| HUE+ | SAT+ | VAL+ | | | |RGB ON| HUE+ | SAT+ | VAL+ | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------|------+
|
||||
| | MODE | HUE- | SAT- | VAL- | | | | | MODE | HUE- | SAT- | VAL- | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | | | |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
## How to compile these program
|
||||
|
||||
See the readme of the Default keymap.
|
173
keyboards/helix/rev2_latam/keymaps/five_rows_jis/readme_jp.md
Normal file
173
keyboards/helix/rev2_latam/keymaps/five_rows_jis/readme_jp.md
Normal file
@ -0,0 +1,173 @@
|
||||
# Helix 5 rows JIS layout
|
||||
|
||||
## コンセプト
|
||||
|
||||
このキーマップは日本語JISキーボード配列を利用しているユーザーが無理なく操作出来るというコンセプトで作成しました。以下の特徴があります。
|
||||
|
||||
* 日本語の長音記号をレイヤーを移動せずに入力可能なように考慮しています
|
||||
* 入りきらない記号関連をLowerレイヤーに位置関係を維持して配置しています
|
||||
* 十字キーを凸配置にしています
|
||||
* Ctrl,Shift,Tab,漢字,Esc,GUI(Win),Appの各キーは位置関係を維持して配置しています
|
||||
* Lower/Raiseキーマップは暗記しないでも使えるようにわかりやすい配置を考慮しています
|
||||
|
||||
またこのキーマップにはHelixの分割されたキーボードを通常通りに使用する「NORMAL」キーマップと、キー位置の最適化のためにHelixの分割されたキーボードの左右を交換して使う「EXCHANGE」キーマップをバイナリの書き換えなしに切り替えられるようにしています。これらにはさらに以下の特徴があります。
|
||||
|
||||
### NORMALキーマップ
|
||||
|
||||
* Nキーを左人差し指で、Bキーを右人差し指で押下することが可能
|
||||
|
||||
### EXCHANGEキーマップ
|
||||
|
||||
* Pro micro下の2キーを有効に使うことにより、NORMALのベースキーマップに```[{```,```}]```,```/?```の各キーを追加し、```\_```キー以外の入力をベースマップで可能にしています
|
||||
* 漢字キー,Enterキーの押し間違いを避けるためPro micro下の2キーに移動しています
|
||||
|
||||
## カスタマイズ
|
||||
|
||||
Normal/Exchangeにそれぞれ、Base,Lower,Raiseの各レイヤーを備え、2マップ3レイヤー、共通1レイヤー(Adjust)の全7種のレイヤーを備えています。
|
||||
ファームの書き換えなしにキーマップを別のものに切り替えられるので、片方は通常のキーマップ、もう片方は画像や動画編集用のキーマップや別の変態配置のキーマップにすれば、状況に応じて簡単に切り替えられます。
|
||||
|
||||
## 配列
|
||||
|
||||
### NORMAL
|
||||
|
||||
Adjust + ModNrmキーでNORMALキーマップに切り替わります。
|
||||
|
||||
#### Baseレイヤー
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| Esc | 1! | 2" | 3# | 4$ | 5% | | 6& | 7' | 8( | 9) | 0 | -= |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| KANJI| Q | W | E | R | T | | Y | U | I | O | P | @` |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Tab | A | S | D | F | G | | H | J | K | L | ;+ | :* |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | B | N | M | ,< | .> | Up |Enter |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl | GUI | Alt |Adjust|Lower |Space |Bksp |Space |Space |Raise | APP | Left | Down |Right |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
#### Lowerレイヤー
|
||||
|
||||
記号キーと、BackSpace位置にDeleteキーを配置しています。
|
||||
例えば```|```キーを入力する場合、Lower + Shift + \キーで入力することが出来ます。
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | | | | | | | | | | -= | ^~ | \| |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | @` | [{ |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | | | | ;+ | :* | ]} |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | ,< | .> | /? | \_ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | Del | | | | | | | |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
#### Raiseレイヤー
|
||||
|
||||
rules.mkのMOUSEKEY_ENABLEをyesにした場合マウスキーを利用できます。ただしバイナリ容量を食いますのでmakeした時に確認できるバイナリサイズがオーバーしていないことに十分注意してください。
|
||||
また、F1-F12キーをHHKBライクに使えるように横並びにしました。
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | F12 | | | | Home |PageUp|
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | End |PageDn|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| |MsBtn1|MsBtn2| | | | | | | | | | MsUp | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | |MsLeft|MsDown|MsRght|
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### EXCHANGEキーマップ
|
||||
|
||||
Adjust + ModExcキーでEXCHANGEキーマップに切り替わります。
|
||||
HelixのUSBやフォンケーブルの接続は変更せず、分割された左右のキーボードを入れ替えて使います。
|
||||
|
||||
#### Baseレイヤー
|
||||
|
||||
ちょっと無理やりですが```[{```,```}]```キーを突っ込んでいます。
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| Esc | 1! | 2" | 3# | 4$ | 5% || 6& | 7' | 8( | 9) | 0 | -= |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T || Y | U | I | O | P | @` |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | A | S | D | F | G || H | J | K | L | ;+ | :* |
|
||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||
|KANJI | Shift| Z | X | C | V | B || N | M | ,< | .> | /? | Up |Enter |
|
||||
|------+------+------+------+------+------+------||------+------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | GUI | Alt | [{ |Lower | Bksp ||Space |Raise | }] | APP | Left | Down |Right |
|
||||
`------------------------------------------------'`------------------------------------------------'
|
||||
```
|
||||
|
||||
#### Lowerレイヤー
|
||||
|
||||
記号キーと、BackSpace位置にDeleteキーを配置しています。
|
||||
PageDown/Up, Home/EndをCtrl+十字キーの延長線上で使用できるように配置しています。
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| | | | | | || | | | -= | ^~ | \| |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | | | @` | [{ |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | | ;+ | :* | ]} |
|
||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||
| | | | | | | || | ,< | .> | /? | \_ |PageUp| |
|
||||
|------+------+------+------+------+------+------||------+------+------+------+------+------+------|
|
||||
| | | | | | | Del || | | | | Home |PageDn| End |
|
||||
`------------------------------------------------'`------------------------------------------------'
|
||||
```
|
||||
|
||||
#### Raiseレイヤー
|
||||
|
||||
rules.mkのMOUSEKEY_ENABLEをyesにした場合マウスキーを利用できます。ただしバイナリ容量を食いますのでmakeした時に確認できるバイナリサイズがオーバーしていないことに十分注意してください。
|
||||
また、F1-F12キーをHHKBライクに使えるように横並びにしました。
|
||||
マウスキーは十字キーの延長線上で使用できるように配置しています。
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || F12 | | | | | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | | | | |
|
||||
,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
|
||||
| | |MsBtn1|MsBtn2| | | || | | | | | MsUp | |
|
||||
|------+------+------+------+------+------+------||------+------+------+------+------+------+------|
|
||||
| | | | | | | || | | | |MsLeft|MsDown|MsRght|
|
||||
`------------------------------------------------'`------------------------------------------------'
|
||||
```
|
||||
|
||||
### NORMAL/EXCHANGE共通レイヤー
|
||||
|
||||
Adjustレイヤー
|
||||
|
||||
NORMAL/EXCHANGE共通で利用するレイヤーです。共通で使えるように両側同じ並びで同じものを配置しています。
|
||||
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | Reset|RGBRST|Aud on|Audoff| | | | Reset|RGBRST|Aud on|Audoff| |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| |ModNrm|ModExc| Mac | Win | | | |ModNrm|ModExc| Mac | Win | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------|------+
|
||||
| |RGB ON| HUE+ | SAT+ | VAL+ | | | |RGB ON| HUE+ | SAT+ | VAL+ | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------|------+
|
||||
| | MODE | HUE- | SAT- | VAL- | | | | | MODE | HUE- | SAT- | VAL- | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | | | |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
## コンパイルの仕方
|
||||
|
||||
Defaultキーマップのreadmeを参照してください。
|
23
keyboards/helix/rev2_latam/keymaps/five_rows_jis/rules.mk
Normal file
23
keyboards/helix/rev2_latam/keymaps/five_rows_jis/rules.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
# OLED_ENABLE = no # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
# LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
44
keyboards/helix/rev2_latam/keymaps/froggy/config.h
Normal file
44
keyboards/helix/rev2_latam/keymaps/froggy/config.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
235
keyboards/helix/rev2_latam/keymaps/froggy/helixfont.h
Normal file
235
keyboards/helix/rev2_latam/keymaps/froggy/helixfont.h
Normal file
@ -0,0 +1,235 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0xFC, 0xFE, 0x02, 0x82, 0x82, 0x82,
|
||||
0x82, 0x82, 0x82, 0xC2, 0x82, 0x02,
|
||||
0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0x02, 0x62, 0x62, 0x62, 0x62, 0xE2,
|
||||
0x62, 0x62, 0xE2, 0x02, 0x02, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
|
||||
0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x00, 0x00, 0x24, 0xA4,
|
||||
0xA4, 0xBC, 0xA4, 0x24, 0x24, 0x00,
|
||||
0x00, 0x00, 0x24, 0xA4, 0x24, 0x24,
|
||||
0x3C, 0x04, 0x04, 0x00, 0x00, 0x00,
|
||||
0xB8, 0xA4, 0xA4, 0xA4, 0xBC, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC,
|
||||
0x00, 0x44, 0x44, 0x44, 0xDC, 0x44,
|
||||
0x04, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFC, 0xFE, 0xFE, 0x7E, 0x7E, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0x3E, 0x7E, 0xFE,
|
||||
0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0xFE, 0x9E, 0x9E, 0x9E, 0x9E, 0x1E,
|
||||
0x9E, 0x9E, 0x1E, 0xFE, 0xFE, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x7F, 0x7F, 0x40, 0x41, 0x41, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0x40,
|
||||
0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x41,
|
||||
0x40, 0x40, 0x43, 0x40, 0x40, 0x7F,
|
||||
0x00, 0x00, 0x00, 0xF0, 0xFB, 0xFB,
|
||||
0x00, 0x50, 0x60, 0xFF, 0xFC, 0x3C,
|
||||
0x1E, 0x0E, 0x0C, 0xFC, 0xF8, 0xE8,
|
||||
0xE8, 0xE8, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x02, 0x0D, 0x02,
|
||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x57, 0x50,
|
||||
0x57, 0x54, 0x57, 0x10, 0x50, 0x00,
|
||||
0x00, 0x00, 0x97, 0x94, 0x97, 0x94,
|
||||
0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xE4, 0x14, 0xF4, 0x94, 0xF7, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x38, 0xA4, 0xA4, 0xA5, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7F, 0x7F, 0x7F, 0x7E, 0x7E, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7F,
|
||||
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7E,
|
||||
0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFE, 0x02, 0x62, 0x62, 0x62,
|
||||
0xE2, 0x62, 0x62, 0x62, 0xC2, 0x02,
|
||||
0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0x02, 0x82, 0xC2, 0xE2, 0xF2, 0x82,
|
||||
0x82, 0x82, 0x82, 0x02, 0x02, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
|
||||
0x00, 0x05, 0x03, 0x7F, 0x1F, 0x1E,
|
||||
0x3C, 0x38, 0x18, 0x1F, 0x0F, 0x0D,
|
||||
0x0D, 0x0D, 0x06, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x20, 0x20, 0x50,
|
||||
0x8C, 0x50, 0x20, 0x20, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
|
||||
0x40, 0x30, 0x40, 0x80, 0x89, 0x09,
|
||||
0x06, 0x09, 0x09, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1C, 0x12, 0x12, 0x12,
|
||||
0x1E, 0x10, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00, 0x73,
|
||||
0x84, 0xE7, 0x94, 0x94, 0x94, 0x67,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFE, 0xFE, 0x9E, 0x9E, 0x9E,
|
||||
0x1E, 0x9E, 0x9E, 0x9E, 0x3E, 0xFE,
|
||||
0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0xFE, 0x7E, 0x3E, 0x1E, 0x0E, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0xFE, 0xFE, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x7F, 0x40, 0x46, 0x46, 0x46,
|
||||
0x47, 0x46, 0x46, 0x46, 0x43, 0x40,
|
||||
0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x40, 0x41, 0x43, 0x47, 0x4F, 0x41,
|
||||
0x41, 0x41, 0x41, 0x40, 0x40, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
|
||||
0x06, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x06, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
|
||||
0x36, 0x08, 0x08, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E,
|
||||
0x10, 0x1C, 0x12, 0x12, 0x12, 0x12,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x7F, 0x7F, 0x79, 0x79, 0x79,
|
||||
0x78, 0x79, 0x79, 0x79, 0x7C, 0x7F,
|
||||
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x7F, 0x7E, 0x7C, 0x78, 0x70, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0x7F, 0x7F, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
742
keyboards/helix/rev2_latam/keymaps/froggy/keymap.c
Normal file
742
keyboards/helix/rev2_latam/keymaps/froggy/keymap.c
Normal file
@ -0,0 +1,742 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "bootloader.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
#define DELAY_TIME 75
|
||||
static uint16_t key_timer;
|
||||
static uint16_t tap_timer;
|
||||
static uint16_t delay_registered_code;
|
||||
static uint8_t delay_mat_row;
|
||||
static uint8_t delay_mat_col;
|
||||
static bool delay_key_stat;
|
||||
static bool delay_key_pressed;
|
||||
static bool tapping_key;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BASE 0
|
||||
#define _OPT 1
|
||||
#define _FUNC 2
|
||||
#define _SYM 3
|
||||
#define _NUM 4
|
||||
|
||||
bool RGBAnimation = false; //Flag for LED Layer color Refresh.
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
EISU,
|
||||
KANA,
|
||||
RGBRST,
|
||||
RGBOFF,
|
||||
RGB1,
|
||||
RGB2,
|
||||
RGB3,
|
||||
OPT_TAP_SP,
|
||||
DESKTOP,
|
||||
MAC,
|
||||
WIN,
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
|
||||
#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Base
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | C+z | ; | [ | ( | < | { | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | KANA | P | K | R | A | F | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | BS | D | T | H | E | O | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Y | S | N | I | U |Space | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | Gui | Sym | Num | OPT | Ent | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BASE] = LAYOUT( \
|
||||
LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \
|
||||
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
|
||||
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), MO(_SYM), MO(_NUM), OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Opt
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | : | ] | ) | > | } | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | EISU| J | M | B | ' | Tab | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | . | V | C | L | Z | Q | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | X | G | W | - | Del | Esc | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | , | DTOP | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_OPT] = LAYOUT( \
|
||||
KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \
|
||||
EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_X, KC_G, KC_W, KC_MINUS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Func
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* |RGBRST| Hue | | RST | Mac | Win | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | RGB1 | VAL+ | F7 | F8 | F9 | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | RGB2 | VAL- | F4 | F5 | F6 | F12 | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | RGB3 | F10 | F1 | F2 | F3 | F11 | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |RGBOFF| | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = LAYOUT( \
|
||||
RGBRST,RGB_HUI, _______, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \
|
||||
RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \
|
||||
RGB3, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGBOFF,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Sym
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Ins | GRV | | PU | PD | ^ | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | \ | # | = | ? | % | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | $ | upA | @ | ! | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | CL | <- | dwA | -> | _ | & | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | PS | | ~ | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYM] = LAYOUT( \
|
||||
KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_UNDS, KC_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_PSCR, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | Func | home | End | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | * | 7 | 8 | 9 | - | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | . | / | 4 | 5 | 6 | + | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LN | 0 | 1 | 2 | 3 |C+S+F1| | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | , | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUM] = LAYOUT( \
|
||||
_______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \
|
||||
KC_PDOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \
|
||||
KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_PDOT, KC_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
};
|
||||
#else
|
||||
#error "undefined keymaps"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
//bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool find_mairix(uint16_t keycode, uint8_t *row, uint8_t *col){
|
||||
for(uint8_t i=0; i<MATRIX_ROWS; i++){
|
||||
for(uint8_t j=0; j<MATRIX_COLS; j++){
|
||||
if( pgm_read_word(&(keymaps[_BASE][i][j]))==keycode){
|
||||
*row = i;
|
||||
*col = j;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void unregister_delay_code(void){
|
||||
if(delay_registered_code){
|
||||
unregister_code(delay_registered_code);
|
||||
if (delay_registered_code & QK_LSFT){
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
if (delay_registered_code & QK_LCTL){
|
||||
unregister_code(KC_LCTL);
|
||||
}
|
||||
if (delay_registered_code & QK_LALT){
|
||||
unregister_code(KC_LALT);
|
||||
}
|
||||
if (delay_registered_code & QK_LGUI){
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
delay_registered_code=0;
|
||||
}
|
||||
}
|
||||
|
||||
void register_delay_code(uint8_t layer){
|
||||
if(delay_key_stat){
|
||||
unregister_delay_code();
|
||||
|
||||
uint16_t code = pgm_read_word(&(keymaps[layer][delay_mat_row][delay_mat_col]));
|
||||
if (code & QK_LSFT){
|
||||
register_code(KC_LSFT);
|
||||
}
|
||||
if (code & QK_LCTL){
|
||||
register_code(KC_LCTL);
|
||||
}
|
||||
if (code & QK_LALT){
|
||||
register_code(KC_LALT);
|
||||
}
|
||||
if (code & QK_LGUI){
|
||||
register_code(KC_LGUI);
|
||||
}
|
||||
register_code(code);
|
||||
delay_registered_code = code;
|
||||
delay_key_stat = false;
|
||||
tapping_key = true;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
struct keybuf {
|
||||
char col, row;
|
||||
char frame;
|
||||
};
|
||||
struct keybuf keybufs[256];
|
||||
unsigned char keybuf_begin, keybuf_end;
|
||||
|
||||
int col, row;
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
col = record->event.key.col;
|
||||
row = record->event.key.row;
|
||||
if (record->event.pressed && ((row < 5 && is_master) || (row >= 5 && !is_master))) {
|
||||
int end = keybuf_end;
|
||||
keybufs[end].col = col;
|
||||
keybufs[end].row = row % 5;
|
||||
keybufs[end].frame = 0;
|
||||
keybuf_end ++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(tap_timer&&keycode!=OPT_TAP_SP){
|
||||
tapping_key = true;
|
||||
}
|
||||
|
||||
if(keycode==delay_registered_code){
|
||||
if (!record->event.pressed){
|
||||
unregister_delay_code();
|
||||
}
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case KC_SCLN:
|
||||
case KC_LBRC:
|
||||
case KC_LPRN:
|
||||
case KC_LT:
|
||||
case KC_LCBR:
|
||||
case KC_P:
|
||||
case KC_K:
|
||||
case KC_R:
|
||||
case KC_A:
|
||||
case KC_F:
|
||||
case KC_BSPC:
|
||||
case KC_D:
|
||||
case KC_T:
|
||||
case KC_H:
|
||||
case KC_E:
|
||||
case KC_O:
|
||||
case KC_Y:
|
||||
case KC_S:
|
||||
case KC_N:
|
||||
case KC_I:
|
||||
case KC_U:
|
||||
case LCTL(KC_Z):
|
||||
case KC_SPC:
|
||||
if (record->event.pressed) {
|
||||
register_delay_code(_BASE);
|
||||
if(find_mairix(keycode, &delay_mat_row, &delay_mat_col)){
|
||||
key_timer = timer_read();
|
||||
delay_key_stat = true;
|
||||
delay_key_pressed = true;
|
||||
}
|
||||
}else{
|
||||
delay_key_pressed = false;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case OPT_TAP_SP:
|
||||
if (record->event.pressed) {
|
||||
tapping_key = false;
|
||||
register_delay_code(_OPT);
|
||||
layer_on(_OPT);
|
||||
tap_timer = timer_read();
|
||||
}else{
|
||||
layer_off(_OPT);
|
||||
if(tapping_key==false && timer_elapsed(tap_timer) < TAPPING_TERM){
|
||||
SEND_STRING(" ");
|
||||
}
|
||||
tap_timer = 0;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG2);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG1);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DESKTOP:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_F11);
|
||||
}else{
|
||||
SEND_STRING(SS_LGUI("d"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_F11);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
RGBAnimation = false;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGBOFF:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_disable();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB1:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB2:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB3:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case MAC:
|
||||
if (record->event.pressed) {
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(ag_norm_song);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case WIN:
|
||||
if (record->event.pressed) {
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(ag_swap_song);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//keyboard start-up code. Runs once when the firmware starts up.
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
#define L_OPT 2
|
||||
#define L_FUNC 4
|
||||
#define L_SYM 8
|
||||
#define L_NUM 16
|
||||
#define L_FNLAYER 64
|
||||
#define L_NUMLAY 128
|
||||
#define L_NLOWER 136
|
||||
#define L_NFNLAYER 192
|
||||
#define L_MOUSECURSOR 256
|
||||
|
||||
// LED Effect
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
unsigned char rgb[7][5][3];
|
||||
void led_ripple_effect(char r, char g, char b) {
|
||||
static int scan_count = -10;
|
||||
static int keys[] = { 6, 6, 6, 7, 7 };
|
||||
static int keys_sum[] = { 0, 6, 12, 18, 25 };
|
||||
|
||||
if (scan_count == -1) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
} else if (scan_count >= 0 && scan_count < 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
// FIXME:
|
||||
|
||||
int y = scan_count;
|
||||
int dist_y = abs(y - keybufs[i].row);
|
||||
for (int x=0; x<keys[y]; x++) {
|
||||
int dist = abs(x - keybufs[i].col) + dist_y;
|
||||
if (dist <= keybufs[i].frame) {
|
||||
int elevation = MAX(0, (8 + dist - keybufs[i].frame)) << 2;
|
||||
if (elevation) {
|
||||
if ((rgb[x][y][0] != 255) && r) { rgb[x][y][0] = MIN(255, elevation + rgb[x][y][0]); }
|
||||
if ((rgb[x][y][1] != 255) && g) { rgb[x][y][1] = MIN(255, elevation + rgb[x][y][1]); }
|
||||
if ((rgb[x][y][2] != 255) && b) { rgb[x][y][2] = MIN(255, elevation + rgb[x][y][2]); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (scan_count == 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
if (keybufs[i].frame < 18) {
|
||||
keybufs[i].frame ++;
|
||||
} else {
|
||||
keybuf_begin ++;
|
||||
}
|
||||
}
|
||||
} else if (scan_count >= 6 && scan_count <= 10) {
|
||||
int y = scan_count - 6;
|
||||
for (int x=0; x<keys[y]; x++) {
|
||||
int at = keys_sum[y] + ((y & 1) ? x : (keys[y] - x - 1));
|
||||
led[at].r = rgb[x][y][0];
|
||||
led[at].g = rgb[x][y][1];
|
||||
led[at].b = rgb[x][y][2];
|
||||
}
|
||||
rgblight_set();
|
||||
} else if (scan_count == 11) {
|
||||
memset(rgb, 0, sizeof(rgb));
|
||||
}
|
||||
scan_count++;
|
||||
if (scan_count >= 12) { scan_count = 0; }
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t layer_state_old;
|
||||
|
||||
//runs every scan cycle (a lot)
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
#endif
|
||||
|
||||
if(delay_key_stat && (timer_elapsed(key_timer) > DELAY_TIME)){
|
||||
register_delay_code(_BASE);
|
||||
if(!delay_key_pressed){
|
||||
unregister_delay_code();
|
||||
}
|
||||
}
|
||||
|
||||
if(layer_state_old != layer_state){
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
break;
|
||||
case L_OPT:
|
||||
register_delay_code(_OPT);
|
||||
break;
|
||||
case L_NUM:
|
||||
register_delay_code(_NUM);
|
||||
break;
|
||||
case L_SYM:
|
||||
register_delay_code(_SYM);
|
||||
break;
|
||||
case L_FUNC:
|
||||
register_delay_code(_FUNC);
|
||||
break;
|
||||
}
|
||||
layer_state_old = layer_state;
|
||||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if(!RGBAnimation){
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(0,112,127);
|
||||
#else
|
||||
rgblight_setrgb(0,112,127);
|
||||
#endif
|
||||
break;
|
||||
case L_OPT:
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(127,0,100);
|
||||
#else
|
||||
rgblight_setrgb(127,0,100);
|
||||
#endif
|
||||
break;
|
||||
case L_NUM:
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(127,23,0);
|
||||
#else
|
||||
rgblight_setrgb(127,23,0);
|
||||
#endif
|
||||
break;
|
||||
case L_SYM:
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(0,127,0);
|
||||
#else
|
||||
rgblight_setrgb(0,127,0);
|
||||
#endif
|
||||
break;
|
||||
case L_FUNC:
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(127,0,61);
|
||||
#else
|
||||
rgblight_setrgb(127,0,61);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Render to OLED
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
// froggy logo
|
||||
static char logo[4][1][17]=
|
||||
{
|
||||
{
|
||||
{0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0}
|
||||
},
|
||||
{
|
||||
{0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0}
|
||||
},
|
||||
{
|
||||
{0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0}
|
||||
},
|
||||
{
|
||||
{0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0}
|
||||
}
|
||||
};
|
||||
|
||||
static char indctr[8][2][4]=
|
||||
{
|
||||
// white icon
|
||||
{
|
||||
{0x60,0x61,0x62,0},
|
||||
{0x63,0x64,0}
|
||||
},
|
||||
{
|
||||
{0x80,0x81,0x82,0},
|
||||
{0x83,0x84,0}
|
||||
},
|
||||
{
|
||||
{0xa0,0xa1,0xa2,0},
|
||||
{0xa3,0xa4,0}
|
||||
},
|
||||
{
|
||||
{0xc0,0xc1,0xc2,0},
|
||||
{0xc3,0xc4,0}
|
||||
},
|
||||
// Black icon
|
||||
{
|
||||
{0x75,0x76,0x77,0},
|
||||
{0x78,0x79,0}
|
||||
},
|
||||
{
|
||||
{0x95,0x96,0x97,0},
|
||||
{0x98,0x99,0}
|
||||
},
|
||||
{
|
||||
{0xb5,0xb6,0xb7,0},
|
||||
{0xb8,0xb9,0}
|
||||
},
|
||||
{
|
||||
{0xd5,0xd6,0xd7,0},
|
||||
{0xd8,0xd9,0}
|
||||
},
|
||||
};
|
||||
|
||||
int rown = 0;
|
||||
int rowf = 0;
|
||||
int rowa = 0;
|
||||
int rows = 0;
|
||||
|
||||
//Set Indicator icon
|
||||
if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 4; } else { rown = 0; }
|
||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowa = 4; } else { rowa = 0; }
|
||||
if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) { rows = 4; } else { rows = 0; }
|
||||
if (layer_state == L_FUNC) { rowf = 4; }
|
||||
|
||||
matrix_write(matrix, indctr[rown] [0]);
|
||||
matrix_write(matrix, indctr[rowf] [1]);
|
||||
matrix_write(matrix, logo [0] [0]);
|
||||
matrix_write(matrix, indctr[rown+1][0]);
|
||||
matrix_write(matrix, indctr[rowf+1][1]);
|
||||
matrix_write(matrix, logo [1] [0]);
|
||||
matrix_write(matrix, indctr[rowa+2][0]);
|
||||
matrix_write(matrix, indctr[rows+2][1]);
|
||||
matrix_write(matrix, logo [2] [0]);
|
||||
matrix_write(matrix, indctr[rowa+3][0]);
|
||||
matrix_write(matrix, indctr[rows+3][1]);
|
||||
matrix_write(matrix, logo [3] [0]);
|
||||
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if(is_master){
|
||||
render_status(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
83
keyboards/helix/rev2_latam/keymaps/froggy/readme.md
Normal file
83
keyboards/helix/rev2_latam/keymaps/froggy/readme.md
Normal file
@ -0,0 +1,83 @@
|
||||
Froggy -one hand Helix-
|
||||
======
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
It is a one-handed keyboard with reference to Frogpad. Layout Designed by タクマ ([@humid](https://twitter.com/humid)).
|
||||
|
||||
## Layout
|
||||
### Base
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| C+z | ; | [ | ( | < | { |
|
||||
|------+------+------+------+------+------|
|
||||
| KANA | P | K | R | A | F |
|
||||
|------+------+------+------+------+------|
|
||||
| BS | D | T | H | E | O |
|
||||
|------+------+------+------+------+------+------.
|
||||
| Shift| Y | S | N | I | U | Space|
|
||||
|------+------+------+------+------+------+------|
|
||||
| Ctrl | Alt | win | Sym | Num | OPT | Ent |
|
||||
`------------------------------------------------'
|
||||
```
|
||||
|
||||
### Opt
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| Esc | : | ] | ) | > | } |
|
||||
|------+------+------+------+------+------|
|
||||
| EISU | J | M | B | ' | Tab |
|
||||
|------+------+------+------+------+------|
|
||||
| . | V | C | L | Z | Q |
|
||||
|------+------+------+------+------+------+------.
|
||||
| | X | G | W | - | Del | Esc |
|
||||
|------+------+------+------+------+------+------|
|
||||
| | | | , | DTOP | | |
|
||||
`------------------------------------------------'
|
||||
```
|
||||
|
||||
### Num
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| | | Func | home | End | |
|
||||
|------+------+------+------+------+------|
|
||||
| | * | 7 | 8 | 9 | - |
|
||||
|------+------+------+------+------+------|
|
||||
| . | / | 4 | 5 | 6 | + |
|
||||
|------+------+------+------+------+------+------.
|
||||
| LN | 0 | 1 | 2 | 3 |C+S+F1| |
|
||||
|------+------+------+------+------+------+------|
|
||||
| | | | , | | | |
|
||||
`------------------------------------------------'
|
||||
```
|
||||
|
||||
### Sym
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| Ins | GRV | | PU | PD | ^ |
|
||||
|------+------+------+------+------+------|
|
||||
| | \ | # | = | ? | % |
|
||||
|------+------+------+------+------+------|
|
||||
| | $ | upA | @ | ! | | |
|
||||
|------+------+------+------+------+------+------.
|
||||
| CL | <- | dwA | -> | _ | & | |
|
||||
|------+------+------+------+------+------+------|
|
||||
| | | PS | | ~ | | |
|
||||
`-----------------------------------------------'
|
||||
```
|
||||
|
||||
### Func
|
||||
```
|
||||
,-----------------------------------------.
|
||||
|RGBRST| Hue | | RST | Mac | Win |
|
||||
|------+------+------+------+------+------|
|
||||
| RGB1 | VAL+ | F7 | F8 | F9 | |
|
||||
|------+------+------+------+------+------|
|
||||
| RGB2 | VAL- | F4 | F5 | F6 | F12 |
|
||||
|------+------+------+------+------+------+------.
|
||||
| RGB3 | F10 | F1 | F2 | F3 | F11 | |
|
||||
|------+------+------+------+------+------+------|
|
||||
|RGBOFF| | | | | | |
|
||||
`------------------------------------------------'
|
||||
```
|
23
keyboards/helix/rev2_latam/keymaps/froggy/rules.mk
Normal file
23
keyboards/helix/rev2_latam/keymaps/froggy/rules.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
|
||||
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
41
keyboards/helix/rev2_latam/keymaps/froggy_106/config.h
Normal file
41
keyboards/helix/rev2_latam/keymaps/froggy_106/config.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
235
keyboards/helix/rev2_latam/keymaps/froggy_106/helixfont.h
Normal file
235
keyboards/helix/rev2_latam/keymaps/froggy_106/helixfont.h
Normal file
@ -0,0 +1,235 @@
|
||||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0xFC, 0xFE, 0x02, 0x82, 0x82, 0x82,
|
||||
0x82, 0x82, 0x82, 0xC2, 0x82, 0x02,
|
||||
0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0x02, 0x62, 0x62, 0x62, 0x62, 0xE2,
|
||||
0x62, 0x62, 0xE2, 0x02, 0x02, 0xFC,
|
||||
0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC,
|
||||
0xFC, 0x00, 0xFC, 0xFC, 0xF0, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
|
||||
0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x20, 0x00, 0x00, 0x24, 0xA4,
|
||||
0xA4, 0xBC, 0xA4, 0x24, 0x24, 0x00,
|
||||
0x00, 0x00, 0x24, 0xA4, 0x24, 0x24,
|
||||
0x3C, 0x04, 0x04, 0x00, 0x00, 0x00,
|
||||
0xB8, 0xA4, 0xA4, 0xA4, 0xBC, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC,
|
||||
0x00, 0x44, 0x44, 0x44, 0xDC, 0x44,
|
||||
0x04, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFC, 0xFE, 0xFE, 0x7E, 0x7E, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0x3E, 0x7E, 0xFE,
|
||||
0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0xFE, 0x9E, 0x9E, 0x9E, 0x9E, 0x1E,
|
||||
0x9E, 0x9E, 0x1E, 0xFE, 0xFE, 0xFC,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x7F, 0x7F, 0x40, 0x41, 0x41, 0x41,
|
||||
0x41, 0x41, 0x41, 0x41, 0x41, 0x40,
|
||||
0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x41,
|
||||
0x40, 0x40, 0x43, 0x40, 0x40, 0x7F,
|
||||
0x00, 0x20, 0x3C, 0x3E, 0x3E, 0x3E,
|
||||
0x3E, 0x00, 0x3E, 0x3E, 0x3E, 0x3E,
|
||||
0x38, 0x00, 0x00, 0xF0, 0xFB, 0xFB,
|
||||
0x00, 0x50, 0x60, 0xFF, 0xFC, 0x3C,
|
||||
0x1E, 0x0E, 0x0C, 0xFC, 0xF8, 0xE8,
|
||||
0xE8, 0xE8, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x1B, 0x04, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x57, 0x50,
|
||||
0x57, 0x54, 0x57, 0x10, 0x50, 0x00,
|
||||
0x00, 0x00, 0x97, 0x94, 0x97, 0x94,
|
||||
0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xE4, 0x14, 0xF4, 0x94, 0xF7, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x38, 0xA4, 0xA4, 0xA5, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7F, 0x7F, 0x7F, 0x7E, 0x7E, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7F,
|
||||
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7E,
|
||||
0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFE, 0x02, 0x62, 0x62, 0x62,
|
||||
0xE2, 0x62, 0x62, 0x62, 0xC2, 0x02,
|
||||
0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0x02, 0x82, 0xC2, 0xE2, 0xF2, 0x82,
|
||||
0x82, 0x82, 0x82, 0x02, 0x02, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
|
||||
0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
|
||||
0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
|
||||
0x00, 0x05, 0x03, 0x7F, 0x1F, 0x1E,
|
||||
0x3C, 0x38, 0x18, 0x1F, 0x0F, 0x0D,
|
||||
0x0D, 0x0D, 0x06, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x20, 0x20, 0x50,
|
||||
0x8C, 0x50, 0x20, 0x20, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x09,
|
||||
0x06, 0x09, 0x09, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1C, 0x12, 0x12, 0x12,
|
||||
0x1E, 0x10, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00, 0x73,
|
||||
0x84, 0xE7, 0x94, 0x94, 0x94, 0x67,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFE, 0xFE, 0x9E, 0x9E, 0x9E,
|
||||
0x1E, 0x9E, 0x9E, 0x9E, 0x3E, 0xFE,
|
||||
0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE,
|
||||
0xFE, 0x7E, 0x3E, 0x1E, 0x0E, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0xFE, 0xFE, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF,
|
||||
0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFC,
|
||||
0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
|
||||
0x3F, 0x7F, 0x40, 0x46, 0x46, 0x46,
|
||||
0x47, 0x46, 0x46, 0x46, 0x43, 0x40,
|
||||
0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x40, 0x41, 0x43, 0x47, 0x4F, 0x41,
|
||||
0x41, 0x41, 0x41, 0x40, 0x40, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x3E, 0x73, 0x60,
|
||||
0x70, 0x3E, 0x07, 0x03, 0x67, 0x3E,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
|
||||
0x06, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
|
||||
0x36, 0x08, 0x08, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E,
|
||||
0x10, 0x1C, 0x12, 0x12, 0x12, 0x12,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x7F, 0x7F, 0x79, 0x79, 0x79,
|
||||
0x78, 0x79, 0x79, 0x79, 0x7C, 0x7F,
|
||||
0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F,
|
||||
0x7F, 0x7E, 0x7C, 0x78, 0x70, 0x7E,
|
||||
0x7E, 0x7E, 0x7E, 0x7F, 0x7F, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x03, 0x03, 0x03,
|
||||
0x03, 0x3F, 0x63, 0x63, 0x63, 0x3F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
|
||||
0x00, 0x00, 0x07, 0x1F, 0x3F, 0x0F,
|
||||
0x07, 0x0F, 0x3F, 0x3F, 0x0F, 0x00,
|
||||
0x03, 0x06, 0x00, 0xF0, 0xFB, 0xFB,
|
||||
};
|
822
keyboards/helix/rev2_latam/keymaps/froggy_106/keymap.c
Normal file
822
keyboards/helix/rev2_latam/keymaps/froggy_106/keymap.c
Normal file
@ -0,0 +1,822 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_jp.h"
|
||||
#include <string.h>
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
#define DELAY_TIME 75
|
||||
static uint16_t key_timer;
|
||||
static uint16_t tap_timer;
|
||||
static uint16_t delay_registered_code;
|
||||
static uint8_t delay_registered_layer;
|
||||
static uint8_t delay_mat_row;
|
||||
static uint8_t delay_mat_col;
|
||||
static bool delay_key_stat;
|
||||
static bool delay_key_pressed;
|
||||
static bool tapping_key;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_BASE = 0,
|
||||
_BASE_106,
|
||||
_OPT,
|
||||
_OPT_106,
|
||||
_SYM,
|
||||
_SYM_106,
|
||||
_NUM,
|
||||
_NUM_106,
|
||||
_FUNC,
|
||||
_LAYER_NUM,
|
||||
};
|
||||
bool RGBAnimation = false; //Flag for LED Layer color Refresh.
|
||||
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool mac_mode:1;
|
||||
};
|
||||
} user_config_t;
|
||||
user_config_t user_config;
|
||||
|
||||
#define IS_MODE_106() ((default_layer_state & (1UL << _BASE_106)) != 0)
|
||||
#define IS_MODE_MAC() (user_config.mac_mode)
|
||||
#ifndef MAX
|
||||
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
|
||||
#endif
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
EISU,
|
||||
KANA,
|
||||
RGBRST,
|
||||
RGBOFF,
|
||||
RGB1,
|
||||
RGB2,
|
||||
RGB3,
|
||||
OPT_TAP_SP,
|
||||
DESKTOP,
|
||||
MAC,
|
||||
WIN,
|
||||
L_SYM,
|
||||
L_NUM,
|
||||
TO_106,
|
||||
TO_101,
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
|
||||
#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Base
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | C+z | ; | [ | ( | < | { | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | KANA | P | K | R | A | F | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | BS | D | T | H | E | O | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Y | S | N | I | U |Space | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | Gui | Sym | Num | OPT | Ent | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BASE] = LAYOUT( \
|
||||
LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \
|
||||
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
|
||||
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
[_BASE_106] = LAYOUT( \
|
||||
LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LT, JP_LCBR, _______, _______, _______, _______, _______, _______, \
|
||||
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
|
||||
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Opt
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | : | ] | ) | > | } | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | EISU| J | M | B | ' | Tab | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | . | V | C | L | Z | Q | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | X | G | W | - | Del | Esc | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | , | DTOP | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_OPT] = LAYOUT( \
|
||||
KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \
|
||||
EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_X, KC_G, KC_W, KC_MINUS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
[_OPT_106] = LAYOUT( \
|
||||
KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_GT, JP_RCBR, _______, _______, _______, _______, _______, _______, \
|
||||
EISU, KC_J, KC_M, KC_B, JP_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_X, KC_G, KC_W, JP_MINS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Sym
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Ins | GRV | | PU | PD | ^ | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | \ | # | = | ? | % | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | $ | upA | @ | ! | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | CL | <- | dwA | -> | _ | & | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | PS | | ~ | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYM] = LAYOUT( \
|
||||
KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_UNDS, KC_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_PSCR, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
[_SYM_106] = LAYOUT( \
|
||||
KC_INS, JP_GRV, _______, KC_PGUP, KC_PGDN, JP_CIRC, _______, _______, _______, _______, _______, _______, \
|
||||
_______, JP_BSLS, JP_HASH, JP_EQL, JP_QUES, JP_PERC, _______, _______, _______, _______, _______, _______, \
|
||||
_______, JP_DLR, KC_UP, JP_AT, JP_EXLM, JP_PIPE, _______, _______, _______, _______, _______, _______, \
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,JP_UNDS, JP_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_PSCR, _______, JP_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | Func | home | End | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | * | 7 | 8 | 9 | - | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | . | / | 4 | 5 | 6 | + | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LN | 0 | 1 | 2 | 3 |C+S+F1| | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | . | , | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUM] = LAYOUT( \
|
||||
_______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \
|
||||
KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_PDOT, KC_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
[_NUM_106] = LAYOUT( \
|
||||
_______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, JP_ASTR, KC_P7, KC_P8, KC_P9, JP_MINS, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOT, JP_SLSH, KC_P4, KC_P5, KC_P6, JP_PLUS, _______, _______, _______, _______, _______, _______, \
|
||||
KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_PDOT, JP_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Func
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* |RGBRST| Hue |To101 | RST | Mac | Win | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | RGB1 | VAL+ | F7 | F8 | F9 |To106 | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | RGB2 | VAL- | F4 | F5 | F6 | F12 | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | RGB3 | F10 | F1 | F2 | F3 | F11 | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |RGBOFF| | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = LAYOUT( \
|
||||
RGBRST,RGB_HUI, TO_101, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \
|
||||
RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, TO_106, _______, _______, _______, _______, _______, _______, \
|
||||
RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \
|
||||
RGB3, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGBOFF,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
};
|
||||
#else
|
||||
#error "undefined keymaps"
|
||||
#endif
|
||||
|
||||
void set_mac_mode(bool enable) {
|
||||
if(enable){
|
||||
user_config.mac_mode = true;
|
||||
keymap_config.swap_lalt_lgui = false;
|
||||
keymap_config.swap_ralt_rgui = false;
|
||||
}else{
|
||||
user_config.mac_mode = false;
|
||||
keymap_config.swap_lalt_lgui = true;
|
||||
keymap_config.swap_ralt_rgui = true;
|
||||
}
|
||||
eeconfig_update_user(user_config.raw);
|
||||
}
|
||||
|
||||
void eeconfig_init_user(void) {
|
||||
user_config.raw = 0;
|
||||
eeconfig_update_user(user_config.raw);
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
user_config.raw = eeconfig_read_user();
|
||||
set_mac_mode(user_config.mac_mode);
|
||||
}
|
||||
|
||||
bool find_mairix(uint16_t keycode, uint8_t *row, uint8_t *col){
|
||||
int base_keymap = IS_MODE_106() ? _BASE_106 : _BASE;
|
||||
for(uint8_t i=0; i<MATRIX_ROWS; i++){
|
||||
for(uint8_t j=0; j<MATRIX_COLS; j++){
|
||||
if( pgm_read_word(&(keymaps[base_keymap][i][j]))==keycode){
|
||||
*row = i;
|
||||
*col = j;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void unregister_delay_code(void){
|
||||
if(delay_registered_code){
|
||||
unregister_code(delay_registered_code);
|
||||
if (delay_registered_code & QK_LSFT){
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
if (delay_registered_code & QK_LCTL){
|
||||
unregister_code(KC_LCTL);
|
||||
}
|
||||
if (delay_registered_code & QK_LALT){
|
||||
unregister_code(KC_LALT);
|
||||
}
|
||||
if (delay_registered_code & QK_LGUI){
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
delay_registered_code=0;
|
||||
delay_registered_layer=0;
|
||||
}
|
||||
}
|
||||
|
||||
void register_delay_code(uint8_t layer){
|
||||
if(delay_key_stat){
|
||||
unregister_delay_code();
|
||||
|
||||
uint16_t code = pgm_read_word(&(keymaps[layer][delay_mat_row][delay_mat_col]));
|
||||
if (code & QK_LSFT){
|
||||
register_code(KC_LSFT);
|
||||
}
|
||||
if (code & QK_LCTL){
|
||||
register_code(KC_LCTL);
|
||||
}
|
||||
if (code & QK_LALT){
|
||||
register_code(KC_LALT);
|
||||
}
|
||||
if (code & QK_LGUI){
|
||||
register_code(KC_LGUI);
|
||||
}
|
||||
register_code(code);
|
||||
delay_registered_code = code;
|
||||
delay_registered_layer = layer;
|
||||
delay_key_stat = false;
|
||||
tapping_key = true;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
struct keybuf {
|
||||
char col, row;
|
||||
char frame;
|
||||
};
|
||||
struct keybuf keybufs[256];
|
||||
unsigned char keybuf_begin, keybuf_end;
|
||||
|
||||
int col, row;
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
col = record->event.key.col;
|
||||
row = record->event.key.row;
|
||||
if (record->event.pressed && ((row < 5 && is_master) || (row >= 5 && !is_master))) {
|
||||
int end = keybuf_end;
|
||||
keybufs[end].col = col;
|
||||
keybufs[end].row = row % 5;
|
||||
keybufs[end].frame = 0;
|
||||
keybuf_end ++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(tap_timer&&keycode!=OPT_TAP_SP){
|
||||
tapping_key = true;
|
||||
}
|
||||
|
||||
if(keycode==delay_registered_code){
|
||||
if (!record->event.pressed){
|
||||
unregister_delay_code();
|
||||
}
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case KC_SCLN:
|
||||
case KC_LBRC:
|
||||
case KC_LPRN:
|
||||
case KC_LT:
|
||||
case KC_LCBR:
|
||||
case KC_P:
|
||||
case KC_K:
|
||||
case KC_R:
|
||||
case KC_A:
|
||||
case KC_F:
|
||||
case KC_BSPC:
|
||||
case KC_D:
|
||||
case KC_T:
|
||||
case KC_H:
|
||||
case KC_E:
|
||||
case KC_O:
|
||||
case KC_Y:
|
||||
case KC_S:
|
||||
case KC_N:
|
||||
case KC_I:
|
||||
case KC_U:
|
||||
case LCTL(KC_Z):
|
||||
case KC_SPC:
|
||||
//case JP_SCLN: // == KC_SCLN
|
||||
case JP_LBRC:
|
||||
case JP_LPRN:
|
||||
//case JP_LT: // == KC_LT
|
||||
case JP_LCBR:
|
||||
if (IS_MODE_106()) {
|
||||
if (keycode == KC_LBRC || keycode == KC_LPRN || keycode == KC_LCBR)
|
||||
break;
|
||||
}else{
|
||||
if (keycode == JP_LBRC || keycode == JP_LPRN || keycode == JP_LCBR)
|
||||
break;
|
||||
}
|
||||
if (record->event.pressed) {
|
||||
if (IS_MODE_106())
|
||||
register_delay_code(_BASE_106);
|
||||
else
|
||||
register_delay_code(_BASE);
|
||||
if(find_mairix(keycode, &delay_mat_row, &delay_mat_col)){
|
||||
key_timer = timer_read();
|
||||
delay_key_stat = true;
|
||||
delay_key_pressed = true;
|
||||
}
|
||||
}else{
|
||||
delay_key_pressed = false;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case L_SYM:
|
||||
if (record->event.pressed) {
|
||||
if (IS_MODE_106()) {
|
||||
register_delay_code(_SYM_106);
|
||||
layer_on(_SYM_106);
|
||||
}else{
|
||||
register_delay_code(_SYM);
|
||||
layer_on(_SYM);
|
||||
}
|
||||
}else{
|
||||
layer_off(_SYM);
|
||||
layer_off(_SYM_106);
|
||||
if(delay_registered_layer == _SYM || delay_registered_layer == _SYM_106) {
|
||||
unregister_delay_code();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case L_NUM:
|
||||
if (record->event.pressed) {
|
||||
if (IS_MODE_106()) {
|
||||
register_delay_code(_NUM_106);
|
||||
layer_on(_NUM_106);
|
||||
}else{
|
||||
register_delay_code(_NUM);
|
||||
layer_on(_NUM);
|
||||
}
|
||||
}else{
|
||||
layer_off(_NUM);
|
||||
layer_off(_NUM_106);
|
||||
if(delay_registered_layer == _NUM || delay_registered_layer == _NUM_106) {
|
||||
unregister_delay_code();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case OPT_TAP_SP:
|
||||
if (record->event.pressed) {
|
||||
tapping_key = false;
|
||||
if (IS_MODE_106()) {
|
||||
register_delay_code(_OPT_106);
|
||||
layer_on(_OPT_106);
|
||||
}else{
|
||||
register_delay_code(_OPT);
|
||||
layer_on(_OPT);
|
||||
}
|
||||
tap_timer = timer_read();
|
||||
}else{
|
||||
layer_off(_OPT);
|
||||
layer_off(_OPT_106);
|
||||
if(tapping_key==false && timer_elapsed(tap_timer) < TAPPING_TERM){
|
||||
SEND_STRING(" ");
|
||||
}else if(delay_registered_layer == _OPT || delay_registered_layer == _OPT_106) {
|
||||
unregister_delay_code();
|
||||
}
|
||||
tap_timer = 0;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
if(IS_MODE_MAC()){
|
||||
register_code(KC_LANG2);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
if(IS_MODE_MAC()){
|
||||
register_code(KC_LANG1);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DESKTOP:
|
||||
if (record->event.pressed) {
|
||||
if(IS_MODE_MAC()){
|
||||
register_code(KC_F11);
|
||||
}else{
|
||||
SEND_STRING(SS_LGUI("d"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_F11);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGBAnimation = false;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGBOFF:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_disable();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB1:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB2:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB3:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
RGBAnimation = true;
|
||||
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case MAC:
|
||||
if (record->event.pressed) {
|
||||
set_mac_mode(true);
|
||||
}
|
||||
break;
|
||||
case WIN:
|
||||
if (record->event.pressed) {
|
||||
set_mac_mode(false);
|
||||
}
|
||||
break;
|
||||
case TO_101:
|
||||
if (record->event.pressed) {
|
||||
if (IS_MODE_106()) {
|
||||
set_single_persistent_default_layer(_BASE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TO_106:
|
||||
if (record->event.pressed) {
|
||||
if (!IS_MODE_106()) {
|
||||
set_single_persistent_default_layer(_BASE_106);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//keyboard start-up code. Runs once when the firmware starts up.
|
||||
void matrix_init_user(void) {
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
// LED Effect
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
unsigned char rgb[7][5][3];
|
||||
void led_ripple_effect(char r, char g, char b) {
|
||||
static int scan_count = -10;
|
||||
static int keys[] = { 6, 6, 6, 7, 7 };
|
||||
static int keys_sum[] = { 0, 6, 12, 18, 25 };
|
||||
|
||||
if (scan_count == -1) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
} else if (scan_count >= 0 && scan_count < 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
// FIXME:
|
||||
|
||||
int y = scan_count;
|
||||
int dist_y = abs(y - keybufs[i].row);
|
||||
for (int x=0; x<keys[y]; x++) {
|
||||
int dist = abs(x - keybufs[i].col) + dist_y;
|
||||
if (dist <= keybufs[i].frame) {
|
||||
int elevation = MAX(0, (8 + dist - keybufs[i].frame)) << 2;
|
||||
if (elevation) {
|
||||
if ((rgb[x][y][0] != 255) && r) { rgb[x][y][0] = MIN(255, elevation + rgb[x][y][0]); }
|
||||
if ((rgb[x][y][1] != 255) && g) { rgb[x][y][1] = MIN(255, elevation + rgb[x][y][1]); }
|
||||
if ((rgb[x][y][2] != 255) && b) { rgb[x][y][2] = MIN(255, elevation + rgb[x][y][2]); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (scan_count == 5) {
|
||||
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
|
||||
int i = c;
|
||||
if (keybufs[i].frame < 18) {
|
||||
keybufs[i].frame ++;
|
||||
} else {
|
||||
keybuf_begin ++;
|
||||
}
|
||||
}
|
||||
} else if (scan_count >= 6 && scan_count <= 10) {
|
||||
int y = scan_count - 6;
|
||||
for (int x=0; x<keys[y]; x++) {
|
||||
int at = keys_sum[y] + ((y & 1) ? x : (keys[y] - x - 1));
|
||||
led[at].r = rgb[x][y][0];
|
||||
led[at].g = rgb[x][y][1];
|
||||
led[at].b = rgb[x][y][2];
|
||||
}
|
||||
rgblight_set();
|
||||
} else if (scan_count == 11) {
|
||||
memset(rgb, 0, sizeof(rgb));
|
||||
}
|
||||
scan_count++;
|
||||
if (scan_count >= 12) { scan_count = 0; }
|
||||
}
|
||||
#endif
|
||||
|
||||
layer_state_t layer_state_old;
|
||||
|
||||
//runs every scan cycle (a lot)
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
#endif
|
||||
|
||||
if(delay_key_stat && (timer_elapsed(key_timer) > DELAY_TIME)){
|
||||
if (IS_MODE_106())
|
||||
register_delay_code(_BASE_106);
|
||||
else
|
||||
register_delay_code(_BASE);
|
||||
if(!delay_key_pressed){
|
||||
unregister_delay_code();
|
||||
}
|
||||
}
|
||||
|
||||
if(layer_state_old != layer_state){
|
||||
for (int8_t i = _LAYER_NUM-1; i > _BASE_106; i--) {
|
||||
if(IS_LAYER_ON(i)){
|
||||
register_delay_code(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
layer_state_old = layer_state;
|
||||
}
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if(!RGBAnimation){
|
||||
if(IS_LAYER_ON(_FUNC)){
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(127,23,0);
|
||||
#else
|
||||
rgblight_setrgb(127,23,0);
|
||||
#endif
|
||||
}else if(IS_LAYER_ON(_NUM)||IS_LAYER_ON(_NUM_106)){
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(127,0,61);
|
||||
#else
|
||||
rgblight_setrgb(127,0,61);
|
||||
#endif
|
||||
}else if(IS_LAYER_ON(_SYM)||IS_LAYER_ON(_SYM_106)){
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(0,127,0);
|
||||
#else
|
||||
rgblight_setrgb(0,127,0);
|
||||
#endif
|
||||
}else if(IS_LAYER_ON(_OPT)||IS_LAYER_ON(_OPT_106)){
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(127,0,100);
|
||||
#else
|
||||
rgblight_setrgb(127,0,100);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef RGBLED_BACK
|
||||
led_ripple_effect(0,112,127);
|
||||
#else
|
||||
rgblight_setrgb(0,112,127);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Render to OLED
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
// froggy logo
|
||||
static char logo[4][17]=
|
||||
{
|
||||
{0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0},
|
||||
{0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0},
|
||||
{0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0},
|
||||
{0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0},
|
||||
};
|
||||
|
||||
static char modectl[4][2][4]=
|
||||
{
|
||||
{
|
||||
{0x65,0x66,0x67,0}, //WIN
|
||||
{0x85,0x86,0x87,0}, //WIN
|
||||
},
|
||||
{
|
||||
{0xa5,0xa6,0xa7,0}, //US(101)
|
||||
{0xc5,0xc6,0xc7,0}, //US(101)
|
||||
},
|
||||
{
|
||||
{0xbd,0xbe,0xbf,0}, //MAC
|
||||
{0xdd,0xde,0xdf,0}, //MAC
|
||||
},
|
||||
{
|
||||
{0xba,0xbb,0xbc,0}, //JP(106)
|
||||
{0xda,0xdb,0xdc,0}, //JP(106)
|
||||
},
|
||||
};
|
||||
|
||||
static char indctr[8][2][4]=
|
||||
{
|
||||
// white icon
|
||||
{
|
||||
{0x60,0x61,0x62,0}, //NUM
|
||||
{0x63,0x64,0} //FUNC
|
||||
},
|
||||
{
|
||||
{0x80,0x81,0x82,0}, //NUM
|
||||
{0x83,0x84,0} //FUNC
|
||||
},
|
||||
{
|
||||
{0xa0,0xa1,0xa2,0}, //CAPS
|
||||
{0xa3,0xa4,0} //SCLK
|
||||
},
|
||||
{
|
||||
{0xc0,0xc1,0xc2,0}, //CAPS
|
||||
{0xc3,0xc4,0} //SCLK
|
||||
},
|
||||
// Black icon
|
||||
{
|
||||
{0x75,0x76,0x77,0}, //NUM
|
||||
{0x78,0x79,0} //FUNC
|
||||
},
|
||||
{
|
||||
{0x95,0x96,0x97,0}, //NUM
|
||||
{0x98,0x99,0} //FUNC
|
||||
},
|
||||
{
|
||||
{0xb5,0xb6,0xb7,0}, //CAPS
|
||||
{0xb8,0xb9,0} //SCLK
|
||||
},
|
||||
{
|
||||
{0xd5,0xd6,0xd7,0}, //CAPS
|
||||
{0xd8,0xd9,0} //SCLK
|
||||
},
|
||||
};
|
||||
|
||||
int rown = 0;
|
||||
int rowf = 0;
|
||||
int rowa = 0;
|
||||
int rows = 0;
|
||||
int rowm = 0;
|
||||
int rowj = 1;
|
||||
|
||||
//Set Indicator icon
|
||||
if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { rown = 4; }
|
||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { rowa = 4; }
|
||||
if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) { rows = 4; }
|
||||
if (IS_LAYER_ON(_FUNC)) { rowf = 4; }
|
||||
|
||||
//Set Mode icon
|
||||
if (IS_MODE_MAC()) { rowm = 2; }
|
||||
if (IS_MODE_106()) { rowj = 3; }
|
||||
|
||||
matrix_write(matrix, indctr[rown] [0]);
|
||||
matrix_write(matrix, indctr[rowf] [1]);
|
||||
matrix_write(matrix, modectl[rowm] [0]);
|
||||
matrix_write(matrix, logo[0]);
|
||||
matrix_write(matrix, indctr[rown+1][0]);
|
||||
matrix_write(matrix, indctr[rowf+1][1]);
|
||||
matrix_write(matrix, modectl[rowm] [1]);
|
||||
matrix_write(matrix, logo[1]);
|
||||
matrix_write(matrix, indctr[rowa+2][0]);
|
||||
matrix_write(matrix, indctr[rows+2][1]);
|
||||
matrix_write(matrix, modectl[rowj] [0]);
|
||||
matrix_write(matrix, logo[2]);
|
||||
matrix_write(matrix, indctr[rowa+3][0]);
|
||||
matrix_write(matrix, indctr[rows+3][1]);
|
||||
matrix_write(matrix, modectl[rowj] [1]);
|
||||
matrix_write(matrix, logo[3]);
|
||||
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if(is_master){
|
||||
render_status(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Local Variables:
|
||||
// mode: c++
|
||||
// truncate-lines: t
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
85
keyboards/helix/rev2_latam/keymaps/froggy_106/readme.md
Normal file
85
keyboards/helix/rev2_latam/keymaps/froggy_106/readme.md
Normal file
@ -0,0 +1,85 @@
|
||||
Froggy -one hand Helix- with 106-key mode
|
||||
======
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
It is a one-handed keyboard with reference to Frogpad. Layout Designed by タクマ ([@humid](https://twitter.com/humid)).
|
||||
|
||||
This keymap has 106-key mode, This is usable when keyboard setting of OS is OADG 106/109 keyboard.
|
||||
|
||||
## Layout
|
||||
### Base
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| C+z | ; | [ | ( | < | { |
|
||||
|------+------+------+------+------+------|
|
||||
| KANA | P | K | R | A | F |
|
||||
|------+------+------+------+------+------|
|
||||
| BS | D | T | H | E | O |
|
||||
|------+------+------+------+------+------+------.
|
||||
| Shift| Y | S | N | I | U | Space|
|
||||
|------+------+------+------+------+------+------|
|
||||
| Ctrl | Alt | win | Sym | Num | OPT | Ent |
|
||||
`------------------------------------------------'
|
||||
```
|
||||
|
||||
### Opt
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| Esc | : | ] | ) | > | } |
|
||||
|------+------+------+------+------+------|
|
||||
| EISU | J | M | B | ' | Tab |
|
||||
|------+------+------+------+------+------|
|
||||
| . | V | C | L | Z | Q |
|
||||
|------+------+------+------+------+------+------.
|
||||
| | X | G | W | - | Del | Esc |
|
||||
|------+------+------+------+------+------+------|
|
||||
| | | | , | DTOP | | |
|
||||
`------------------------------------------------'
|
||||
```
|
||||
|
||||
### Num
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| | | Func | home | End | |
|
||||
|------+------+------+------+------+------|
|
||||
| | * | 7 | 8 | 9 | - |
|
||||
|------+------+------+------+------+------|
|
||||
| . | / | 4 | 5 | 6 | + |
|
||||
|------+------+------+------+------+------+------.
|
||||
| LN | 0 | 1 | 2 | 3 |C+S+F1| |
|
||||
|------+------+------+------+------+------+------|
|
||||
| | | | , | | | |
|
||||
`------------------------------------------------'
|
||||
```
|
||||
|
||||
### Sym
|
||||
```
|
||||
,-----------------------------------------.
|
||||
| Ins | GRV | | PU | PD | ^ |
|
||||
|------+------+------+------+------+------|
|
||||
| | \ | # | = | ? | % |
|
||||
|------+------+------+------+------+------|
|
||||
| | $ | upA | @ | ! | | |
|
||||
|------+------+------+------+------+------+------.
|
||||
| CL | <- | dwA | -> | _ | & | |
|
||||
|------+------+------+------+------+------+------|
|
||||
| | | PS | | ~ | | |
|
||||
`-----------------------------------------------'
|
||||
```
|
||||
|
||||
### Func
|
||||
```
|
||||
,-----------------------------------------.
|
||||
|RGBRST| Hue | to101| RST | Mac | Win |
|
||||
|------+------+------+------+------+------|
|
||||
| RGB1 | VAL+ | F7 | F8 | F9 | to106|
|
||||
|------+------+------+------+------+------|
|
||||
| RGB2 | VAL- | F4 | F5 | F6 | F12 |
|
||||
|------+------+------+------+------+------+------.
|
||||
| RGB3 | F10 | F1 | F2 | F3 | F11 | |
|
||||
|------+------+------+------+------+------+------|
|
||||
|RGBOFF| | | | | | |
|
||||
`------------------------------------------------'
|
||||
```
|
23
keyboards/helix/rev2_latam/keymaps/froggy_106/rules.mk
Normal file
23
keyboards/helix/rev2_latam/keymaps/froggy_106/rules.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
|
||||
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
27
keyboards/helix/rev2_latam/keymaps/led_test/README.md
Normal file
27
keyboards/helix/rev2_latam/keymaps/led_test/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# LED test Keymap
|
||||
|
||||
## Layout
|
||||
|
||||
The layout is the same as default.
|
||||
|
||||
## Feature
|
||||
|
||||
* OLED is enabled.
|
||||
* LED backlight is enabled and always lit.
|
||||
* The lighting color of LED changes periodically. Red, Green and Blue.
|
||||
|
||||
The user can check whether the LED is lit or not.
|
||||
|
||||
## Compile
|
||||
|
||||
```
|
||||
$ cd qmk_firmware
|
||||
$ make helix:led_test
|
||||
```
|
||||
|
||||
## Flash QMK Firmware
|
||||
|
||||
Execute the 'make' command and press the reset switch on the keyboard.
|
||||
```
|
||||
$ make helix:led_test:flash
|
||||
```
|
41
keyboards/helix/rev2_latam/keymaps/led_test/config.h
Normal file
41
keyboards/helix/rev2_latam/keymaps/led_test/config.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
// place overrides here
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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 // led_test keymap need only this.
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_USER_H */
|
1
keyboards/helix/rev2_latam/keymaps/led_test/keymap.c
Normal file
1
keyboards/helix/rev2_latam/keymaps/led_test/keymap.c
Normal file
@ -0,0 +1 @@
|
||||
#include "../default/keymap.c"
|
@ -0,0 +1,6 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
|
||||
}
|
25
keyboards/helix/rev2_latam/keymaps/led_test/rules.mk
Normal file
25
keyboards/helix/rev2_latam/keymaps/led_test/rules.mk
Normal file
@ -0,0 +1,25 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
# HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
LED_ANIMATIONS = yes # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
SRC += led_test_init.c
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
38
keyboards/helix/rev2_latam/keymaps/xulkal/config.h
Normal file
38
keyboards/helix/rev2_latam/keymaps/xulkal/config.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
69
keyboards/helix/rev2_latam/keymaps/xulkal/keymap.c
Normal file
69
keyboards/helix/rev2_latam/keymaps/xulkal/keymap.c
Normal file
@ -0,0 +1,69 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "xulkal.h"
|
||||
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
|
||||
#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |FN(CAPS)| A | S | D | F | G | | H | J | K | L | ; | Enter|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Sft[ | Z | X | C | V | B |RGBTOG|RGBRST| N | M | , | . | / | Sft] |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctl- | Win | LOWER| RAISE| Alt | Space|RGBRMOD|RGBMOD|Space| Left | Up | Down | Right| Ctl= |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = EXPAND_LAYOUT( \
|
||||
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \
|
||||
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \
|
||||
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \
|
||||
_________________QWERTY_L4_________________, KC_MINS, KC_EQL, _________________QWERTY_R4_________________, \
|
||||
_________________QWERTY_L5_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R5_________________ \
|
||||
),
|
||||
|
||||
#ifndef GAMELAYER_DISABLE
|
||||
[_GAME] = EXPAND_LAYOUT( \
|
||||
___________________GAME_L1_________________, ___________________GAME_R1_________________, \
|
||||
___________________GAME_L2_________________, ___________________GAME_R2_________________, \
|
||||
___________________GAME_L3_________________, ___________________GAME_R3_________________, \
|
||||
___________________GAME_L4_________________, KC_MINS, KC_EQL, ___________________GAME_R4_________________, \
|
||||
___________________GAME_L5_________________, KC_LBRC, KC_RBRC, ___________________GAME_R5_________________ \
|
||||
),
|
||||
#endif
|
||||
|
||||
[_LOWER] = EXPAND_LAYOUT( \
|
||||
__________________LOWER_L1_________________, __________________LOWER_R1_________________, \
|
||||
__________________LOWER_L2_________________, __________________LOWER_R2_________________, \
|
||||
__________________LOWER_L3_________________, __________________LOWER_R3_________________, \
|
||||
__________________LOWER_L4_________________, _______, _______, __________________LOWER_R4_________________, \
|
||||
__________________LOWER_L5_________________, _______, _______, __________________LOWER_R5_________________ \
|
||||
),
|
||||
|
||||
[_RAISE] = EXPAND_LAYOUT( \
|
||||
__________________RAISE_L1_________________, __________________RAISE_R1_________________, \
|
||||
__________________RAISE_L2_________________, __________________RAISE_R2_________________, \
|
||||
__________________RAISE_L3_________________, __________________RAISE_R3_________________, \
|
||||
__________________RAISE_L4_________________, _______, _______, __________________RAISE_R4_________________, \
|
||||
__________________RAISE_L5_________________, _______, _______, __________________RAISE_R5_________________ \
|
||||
),
|
||||
|
||||
#ifdef TRILAYER_ENABLED
|
||||
[_ADJUST] = EXPAND_LAYOUT( \
|
||||
_________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \
|
||||
_________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \
|
||||
_________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \
|
||||
_________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \
|
||||
_________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________ \
|
||||
),
|
||||
#endif
|
||||
};
|
13
keyboards/helix/rev2_latam/keymaps/xulkal/rules.mk
Normal file
13
keyboards/helix/rev2_latam/keymaps/xulkal/rules.mk
Normal file
@ -0,0 +1,13 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
# Enable RGBLIGHT Animations
|
||||
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
|
||||
# Helix specific define for correct RGBLED_NUM
|
||||
OPT_DEFS += -DRGBLED_BACK
|
||||
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
# Helix specific font file
|
||||
OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
|
||||
# Xulkal specific oled define
|
||||
OPT_DEFS += -DOLED_90ROTATION
|
||||
|
||||
SPLIT_KEYBOARD = yes
|
38
keyboards/helix/rev2_latam/keymaps/yshrsmz/config.h
Normal file
38
keyboards/helix/rev2_latam/keymaps/yshrsmz/config.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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
|
||||
|
||||
// If you need more program area, try select and reduce rgblight modes to use.
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_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
|
626
keyboards/helix/rev2_latam/keymaps/yshrsmz/keymap.c
Normal file
626
keyboards/helix/rev2_latam/keymaps/yshrsmz/keymap.c
Normal file
@ -0,0 +1,626 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "bootloader.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
BACKLIT,
|
||||
EISU,
|
||||
KANA,
|
||||
RGBRST
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
|
||||
#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||
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_LBRC, KC_RBRC, 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 \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_K, 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 \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
|
||||
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LBRC, KC_RBRC, KC_B, KC_M, KC_W, KC_V, KC_Z, 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 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | 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_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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, 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 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | 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_BSPC, \
|
||||
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_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| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | |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, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \
|
||||
)
|
||||
};
|
||||
|
||||
#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||
|
||||
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 \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT( \
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, 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 \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT( \
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
|
||||
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, 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 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | 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_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 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | 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_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)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | Reset|RGBRST| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
_______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \
|
||||
)
|
||||
};
|
||||
|
||||
#else
|
||||
#error "undefined keymaps"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
// Setting ADJUST layer RGB back to default
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode);
|
||||
#endif
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
|
||||
#endif
|
||||
}
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||
#endif
|
||||
TOG_STATUS = false;
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
|
||||
#endif
|
||||
}
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
TOG_STATUS = false;
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||
case RGB_MOD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG2);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG1);
|
||||
}else{
|
||||
SEND_STRING(SS_LALT("`"));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
#define L_LOWER (1<<_LOWER)
|
||||
#define L_RAISE (1<<_RAISE)
|
||||
#define L_ADJUST (1<<_ADJUST)
|
||||
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
|
||||
|
||||
static void render_logo(struct CharacterMatrix *matrix) {
|
||||
|
||||
static const char helix_logo[] PROGMEM ={
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||
0};
|
||||
matrix_write_P(matrix, helix_logo);
|
||||
//matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
|
||||
}
|
||||
|
||||
static void render_rgbled_status(bool full, struct CharacterMatrix *matrix) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
char buf[30];
|
||||
if (RGBLIGHT_MODES > 1 && rgblight_config.enable) {
|
||||
if (full) {
|
||||
snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ",
|
||||
rgblight_config.mode,
|
||||
rgblight_config.hue/RGBLIGHT_HUE_STEP,
|
||||
rgblight_config.sat/RGBLIGHT_SAT_STEP,
|
||||
rgblight_config.val/RGBLIGHT_VAL_STEP);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), "[%2d] ",rgblight_config.mode);
|
||||
}
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void render_layer_status(struct CharacterMatrix *matrix) {
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
char buf[10];
|
||||
matrix_write_P(matrix, PSTR("Layer: "));
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
matrix_write_P(matrix, PSTR("Default"));
|
||||
break;
|
||||
case L_RAISE:
|
||||
matrix_write_P(matrix, PSTR("Raise"));
|
||||
break;
|
||||
case L_LOWER:
|
||||
matrix_write_P(matrix, PSTR("Lower"));
|
||||
break;
|
||||
case L_ADJUST:
|
||||
case L_ADJUST_TRI:
|
||||
matrix_write_P(matrix, PSTR("Adjust"));
|
||||
break;
|
||||
default:
|
||||
matrix_write_P(matrix, PSTR("Undef-"));
|
||||
snprintf(buf,sizeof(buf), "%ld", layer_state);
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
// Render to mode icon
|
||||
static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
matrix_write_P(matrix, os_logo[0][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write_P(matrix, os_logo[0][1]);
|
||||
}else{
|
||||
matrix_write_P(matrix, os_logo[1][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write_P(matrix, os_logo[1][1]);
|
||||
}
|
||||
|
||||
matrix_write_P(matrix, PSTR(" "));
|
||||
render_layer_status(matrix);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
|
||||
// Host Keyboard LED Status
|
||||
matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ?
|
||||
PSTR("NUMLOCK") : PSTR(" "));
|
||||
matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ?
|
||||
PSTR("CAPS") : PSTR(" "));
|
||||
matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ?
|
||||
PSTR("SCLK") : PSTR(" "));
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
render_rgbled_status(true, matrix);
|
||||
}
|
||||
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if(is_master){
|
||||
render_status(&matrix);
|
||||
}else{
|
||||
render_logo(&matrix);
|
||||
render_rgbled_status(false, &matrix);
|
||||
render_layer_status(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
23
keyboards/helix/rev2_latam/keymaps/yshrsmz/rules.mk
Normal file
23
keyboards/helix/rev2_latam/keymaps/yshrsmz/rules.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# QMK Standard Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
|
||||
# See TOP/docs/config_options.md for more information.
|
||||
#
|
||||
LTO_ENABLE = no # if firmware size over limit, try this option
|
||||
|
||||
# Helix Spacific Build Options
|
||||
# you can uncomment and edit follows 7 Variables
|
||||
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
|
||||
# HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
# LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
# LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
||||
# LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
LED_ANIMATIONS = no # LED animations
|
||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
125
keyboards/helix/rev2_latam/local_features.mk
Normal file
125
keyboards/helix/rev2_latam/local_features.mk
Normal file
@ -0,0 +1,125 @@
|
||||
#
|
||||
# local_features.mk contains post-processing rules for the Helix keyboard.
|
||||
#
|
||||
# Post-processing rules convert keyboard-specific shortcuts (that represent
|
||||
# combinations of standard options) into QMK standard options.
|
||||
#
|
||||
|
||||
define HELIX_CUSTOMISE_MSG
|
||||
$(info Helix Spacific Build Options)
|
||||
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
||||
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
||||
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
||||
$(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
|
||||
$(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
|
||||
$(info )
|
||||
endef
|
||||
|
||||
ifneq ($(strip $(HELIX)),)
|
||||
### Helix keyboard keymap: convenient command line option
|
||||
## make HELIX=<options> helix:<keymap>
|
||||
## option= oled | back | under | na | ios
|
||||
## ex.
|
||||
## make HELIX=oled helix:<keymap>
|
||||
## make HELIX=oled,back helix:<keymap>
|
||||
## make HELIX=oled,under helix:<keymap>
|
||||
## make HELIX=oled,back,na helix:<keymap>
|
||||
## make HELIX=oled,back,ios helix:<keymap>
|
||||
##
|
||||
ifeq ($(findstring oled,$(HELIX)), oled)
|
||||
OLED_ENABLE = yes
|
||||
endif
|
||||
ifeq ($(findstring back,$(HELIX)), back)
|
||||
LED_BACK_ENABLE = yes
|
||||
else ifeq ($(findstring under,$(HELIX)), under)
|
||||
LED_UNDERGLOW_ENABLE = yes
|
||||
endif
|
||||
ifeq ($(findstring na,$(HELIX)), na)
|
||||
LED_ANIMATIONS = no
|
||||
endif
|
||||
ifeq ($(findstring no_ani,$(HELIX)), no_ani)
|
||||
LED_ANIMATIONS = no
|
||||
endif
|
||||
ifeq ($(findstring ios,$(HELIX)), ios)
|
||||
IOS_DEVICE_ENABLE = yes
|
||||
endif
|
||||
ifeq ($(findstring scan,$(HELIX)), scan)
|
||||
# use DEBUG_MATRIX_SCAN_RATE
|
||||
# see docs/newbs_testing_debugging.md
|
||||
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||
CONSOLE_ENABLE = yes
|
||||
SHOW_VERBOSE_INFO = yes
|
||||
endif
|
||||
ifeq ($(findstring verbose,$(HELIX)), verbose)
|
||||
SHOW_VERBOSE_INFO = yes
|
||||
endif
|
||||
SHOW_HELIX_OPTIONS = yes
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
SRC += local_drivers/serial.c
|
||||
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||
|
||||
# A workaround until #7089 is merged.
|
||||
# serial.c must not be compiled with the -lto option.
|
||||
# The current LIB_SRC has a side effect with the -fno-lto option, so use it.
|
||||
LIB_SRC += local_drivers/serial.c
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
SRC += rev2/matrix.c
|
||||
SRC += rev2/split_util.c
|
||||
SRC += rev2/split_scomm.c
|
||||
endif
|
||||
|
||||
########
|
||||
# convert Helix-specific options (that represent combinations of standard options)
|
||||
# into QMK standard options.
|
||||
|
||||
ifneq ($(strip $(HELIX_ROWS)), 4)
|
||||
ifneq ($(strip $(HELIX_ROWS)), 5)
|
||||
$(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value)
|
||||
endif
|
||||
endif
|
||||
OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS))
|
||||
|
||||
ifeq ($(strip $(LED_BACK_ENABLE)), yes)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_BACK
|
||||
ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
|
||||
$(eval $(call HELIX_CUSTOMISE_MSG))
|
||||
$(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
|
||||
endif
|
||||
else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DIOS_DEVICE_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
SRC += local_drivers/i2c.c
|
||||
SRC += local_drivers/ssd1306.c
|
||||
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||
OPT_DEFS += -DOLED_ENABLE
|
||||
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
||||
OPT_DEFS += -DLOCAL_GLCDFONT
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
|
||||
$(eval $(call HELIX_CUSTOMISE_MSG))
|
||||
ifneq ($(strip $(SHOW_VERBOSE_INFO)),)
|
||||
$(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
|
||||
$(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE))
|
||||
$(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE))
|
||||
$(info -- OPT_DEFS = $(OPT_DEFS))
|
||||
$(info -- LTO_ENABLE = $(LTO_ENABLE))
|
||||
$(info )
|
||||
endif
|
||||
endif
|
356
keyboards/helix/rev2_latam/matrix.c
Normal file
356
keyboards/helix/rev2_latam/matrix.c
Normal file
@ -0,0 +1,356 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* scan matrix
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "split_util.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
# include "i2c.h"
|
||||
#else // USE_SERIAL
|
||||
# include "split_scomm.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
#endif
|
||||
|
||||
#define ERROR_DISCONNECT_COUNT 5
|
||||
|
||||
static uint8_t debouncing = DEBOUNCE;
|
||||
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
||||
static uint8_t error_count = 0;
|
||||
|
||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
static matrix_row_t read_cols(void);
|
||||
static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
static uint8_t matrix_master_scan(void);
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void)
|
||||
{
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void)
|
||||
{
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
split_keyboard_setup();
|
||||
|
||||
// initialize row and col
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
setPinOutput(B0);
|
||||
setPinOutput(D5);
|
||||
writePinHigh(B0);
|
||||
writePinHigh(D5);
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t _matrix_scan(void)
|
||||
{
|
||||
// Right hand is stored after the left in the matirx so, we need to offset it
|
||||
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||
|
||||
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||
select_row(i);
|
||||
_delay_us(30); // without this wait read unstable value.
|
||||
matrix_row_t cols = read_cols();
|
||||
if (matrix_debouncing[i+offset] != cols) {
|
||||
matrix_debouncing[i+offset] = cols;
|
||||
debouncing = DEBOUNCE;
|
||||
}
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
if (debouncing) {
|
||||
if (--debouncing) {
|
||||
_delay_ms(1);
|
||||
} else {
|
||||
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||
matrix[i+offset] = matrix_debouncing[i+offset];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
|
||||
// Get rows from other half over i2c
|
||||
int i2c_transaction(void) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
|
||||
int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
// start of matrix stored at 0x00
|
||||
err = i2c_master_write(0x00);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
// Start read
|
||||
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
if (!err) {
|
||||
int i;
|
||||
for (i = 0; i < ROWS_PER_HAND-1; ++i) {
|
||||
matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
|
||||
}
|
||||
matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
|
||||
i2c_master_stop();
|
||||
} else {
|
||||
i2c_error: // the cable is disconnceted, or something else went wrong
|
||||
i2c_reset_state();
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else // USE_SERIAL
|
||||
|
||||
int serial_transaction(int master_changed) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int ret=serial_update_buffers(master_changed);
|
||||
#else
|
||||
int ret=serial_update_buffers();
|
||||
#endif
|
||||
if (ret ) {
|
||||
if(ret==2) writePinLow(B0);
|
||||
return 1;
|
||||
}
|
||||
writePinHigh(B0);
|
||||
memcpy(&matrix[slaveOffset],
|
||||
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
if (is_helix_master()) {
|
||||
matrix_master_scan();
|
||||
}else{
|
||||
matrix_slave_scan();
|
||||
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
|
||||
memcpy(&matrix[offset],
|
||||
(void *)serial_master_buffer, sizeof(serial_master_buffer));
|
||||
matrix_scan_quantum();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
uint8_t matrix_master_scan(void) {
|
||||
|
||||
int ret = _matrix_scan();
|
||||
int mchanged = 1;
|
||||
|
||||
#ifndef KEYBOARD_helix_rev1
|
||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
// for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
/* i2c_slave_buffer[i] = matrix[offset+i]; */
|
||||
// i2c_slave_buffer[i] = matrix[offset+i];
|
||||
// }
|
||||
#else // USE_SERIAL
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
mchanged = memcmp((void *)serial_master_buffer,
|
||||
&matrix[offset], sizeof(serial_master_buffer));
|
||||
#endif
|
||||
memcpy((void *)serial_master_buffer,
|
||||
&matrix[offset], sizeof(serial_master_buffer));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
if( i2c_transaction() ) {
|
||||
#else // USE_SERIAL
|
||||
if( serial_transaction(mchanged) ) {
|
||||
#endif
|
||||
// turn on the indicator led when halves are disconnected
|
||||
writePinLow(D5);
|
||||
|
||||
error_count++;
|
||||
|
||||
if (error_count > ERROR_DISCONNECT_COUNT) {
|
||||
// reset other half if disconnected
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// turn off the indicator led on no error
|
||||
writePinHigh(D5);
|
||||
error_count = 0;
|
||||
}
|
||||
matrix_scan_quantum();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void matrix_slave_scan(void) {
|
||||
_matrix_scan();
|
||||
|
||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
/* i2c_slave_buffer[i] = matrix[offset+i]; */
|
||||
i2c_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#else // USE_SERIAL
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
int change = 0;
|
||||
#endif
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
if( serial_slave_buffer[i] != matrix[offset+i] )
|
||||
change = 1;
|
||||
#endif
|
||||
serial_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
slave_buffer_change_count += change;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
if (debouncing) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 0123456789ABCDEF\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
pbin_reverse16(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop16(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static void init_cols(void)
|
||||
{
|
||||
for(int x = 0; x < MATRIX_COLS; x++) {
|
||||
_SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
|
||||
_SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
static matrix_row_t read_cols(void)
|
||||
{
|
||||
matrix_row_t result = 0;
|
||||
for(int x = 0; x < MATRIX_COLS; x++) {
|
||||
result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(int x = 0; x < ROWS_PER_HAND; x++) {
|
||||
_SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
|
||||
_SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row)
|
||||
{
|
||||
_SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
|
||||
_SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
|
||||
}
|
1
keyboards/helix/rev2_latam/oled/back/rules.mk
Normal file
1
keyboards/helix/rev2_latam/oled/back/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
LED_BACK_ENABLE = yes
|
1
keyboards/helix/rev2_latam/oled/rules.mk
Normal file
1
keyboards/helix/rev2_latam/oled/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
OLED_ENABLE = yes
|
1
keyboards/helix/rev2_latam/oled/under/rules.mk
Normal file
1
keyboards/helix/rev2_latam/oled/under/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
LED_UNDERGLOW_ENABLE = yes
|
7
keyboards/helix/rev2_latam/post_config.h
Normal file
7
keyboards/helix/rev2_latam/post_config.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(SPLIT_KEYBOARD) /* if use split_common */
|
||||
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_SPLIT)
|
||||
# define RGBLIGHT_SPLIT /* helix hardware need this */
|
||||
# endif
|
||||
#endif
|
41
keyboards/helix/rev2_latam/rev2.c
Normal file
41
keyboards/helix/rev2_latam/rev2.c
Normal file
@ -0,0 +1,41 @@
|
||||
#include "helix.h"
|
||||
|
||||
// Each keymap.c should use is_keyboard_master() instead of 'is_master'.
|
||||
// But keep 'is_master' for a while for backwards compatibility
|
||||
// for the old keymap.c.
|
||||
uint8_t is_master = false;
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_gfx(keycode,record) && process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
//led_set_user(usb_led);
|
||||
}
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// Each keymap.c should use is_keyboard_master() instead of is_master.
|
||||
// But keep is_master for a while for backwards compatibility
|
||||
// for the old keymap.c.
|
||||
is_master = is_keyboard_master();
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void keyboard_post_init_kb(void) {
|
||||
#if defined(DEBUG_MATRIX_SCAN_RATE)
|
||||
debug_enable = true;
|
||||
#endif
|
||||
keyboard_post_init_user();
|
||||
}
|
||||
|
||||
#if defined(SPLIT_KEYBOARD) && defined(SSD1306OLED)
|
||||
void matrix_slave_scan_user(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
#endif
|
127
keyboards/helix/rev2_latam/rev2.h
Normal file
127
keyboards/helix/rev2_latam/rev2.h
Normal file
@ -0,0 +1,127 @@
|
||||
#pragma once
|
||||
|
||||
#include "helix.h"
|
||||
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
extern bool is_helix_master(void);
|
||||
#define is_keyboard_master() is_helix_master()
|
||||
#endif
|
||||
|
||||
// Each keymap.c should use is_keyboard_master() instead of 'is_master', 'has_usb()'.
|
||||
// But keep 'is_master' for a while for backwards compatibility
|
||||
// for the old keymap.c.
|
||||
extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to use 'is_keyboard_master ()' instead.
|
||||
#define has_usb() is_keyboard_master()
|
||||
|
||||
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||
#ifndef FLIP_HALF
|
||||
// Standard Keymap
|
||||
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
|
||||
) { \
|
||||
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
|
||||
{ L10, L11, L12, L13, L14, L15, KC_NO }, \
|
||||
{ L20, L21, L22, L23, L24, L25, KC_NO }, \
|
||||
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
||||
{ R05, R04, R03, R02, R01, R00, KC_NO }, \
|
||||
{ R15, R14, R13, R12, R11, R10, KC_NO }, \
|
||||
{ R25, R24, R23, R22, R21, R20, KC_NO }, \
|
||||
{ R35, R34, R33, R32, R31, R30, R36 } \
|
||||
}
|
||||
#else
|
||||
// Keymap with right side flipped
|
||||
// (TRRS jack on both halves are to the right)
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
|
||||
) { \
|
||||
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
|
||||
{ L10, L11, L12, L13, L14, L15, KC_NO }, \
|
||||
{ L20, L21, L22, L23, L24, L25, KC_NO }, \
|
||||
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
||||
{ KC_NO, R00, R01, R02, R03, R04, R05 }, \
|
||||
{ KC_NO, R10, R11, R12, R13, R14, R15 }, \
|
||||
{ KC_NO, R20, R21, R22, R23, R24, R25 }, \
|
||||
{ R36, R30, R31, R32, R33, R34, R35 } \
|
||||
}
|
||||
#endif
|
||||
#else // HELIX_ROWS == 5
|
||||
#ifndef FLIP_HALF
|
||||
// Standard Keymap
|
||||
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
|
||||
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
|
||||
) { \
|
||||
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
|
||||
{ L10, L11, L12, L13, L14, L15, KC_NO }, \
|
||||
{ L20, L21, L22, L23, L24, L25, KC_NO }, \
|
||||
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
||||
{ L40, L41, L42, L43, L44, L45, L46 }, \
|
||||
{ R05, R04, R03, R02, R01, R00, KC_NO }, \
|
||||
{ R15, R14, R13, R12, R11, R10, KC_NO }, \
|
||||
{ R25, R24, R23, R22, R21, R20, KC_NO }, \
|
||||
{ R35, R34, R33, R32, R31, R30, R36 }, \
|
||||
{ R45, R44, R43, R42, R41, R40, R46 } \
|
||||
}
|
||||
#else
|
||||
// Keymap with right side flipped
|
||||
// (TRRS jack on both halves are to the right)
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
|
||||
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
|
||||
) { \
|
||||
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
|
||||
{ L10, L11, L12, L13, L14, L15, KC_NO }, \
|
||||
{ L20, L21, L22, L23, L24, L25, KC_NO }, \
|
||||
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
||||
{ L40, L41, L42, L43, L44, L45, L46 }, \
|
||||
{ KC_NO, R00, R01, R02, R03, R04, R05 }, \
|
||||
{ KC_NO, R10, R11, R12, R13, R14, R15 }, \
|
||||
{ KC_NO, R20, R21, R22, R23, R24, R25 }, \
|
||||
{ R36, R30, R31, R32, R33, R34, R35 }, \
|
||||
{ R46, R40, R41, R42, R43, R44, R45 } \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
|
||||
#define LAYOUT_kc( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
|
||||
) LAYOUT( \
|
||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
|
||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||
)
|
||||
#else // HELIX_ROWS == 5
|
||||
#define LAYOUT_kc( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
|
||||
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
|
||||
) LAYOUT( \
|
||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
|
||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
|
||||
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
|
||||
)
|
||||
#endif
|
11
keyboards/helix/rev2_latam/rules.mk
Normal file
11
keyboards/helix/rev2_latam/rules.mk
Normal file
@ -0,0 +1,11 @@
|
||||
KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk
|
||||
|
||||
# Helix Spacific Build Options default values
|
||||
HELIX_ROWS = 5 # Helix Rows is 4 or 5
|
||||
OLED_ENABLE = no # OLED_ENABLE
|
||||
LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
|
||||
LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
|
||||
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||
LED_ANIMATIONS = yes # LED animations
|
||||
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
1
keyboards/helix/rev2_latam/sc/back/rules.mk
Normal file
1
keyboards/helix/rev2_latam/sc/back/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
LED_BACK_ENABLE = yes
|
1
keyboards/helix/rev2_latam/sc/oled/rules.mk
Normal file
1
keyboards/helix/rev2_latam/sc/oled/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
OLED_ENABLE = yes
|
2
keyboards/helix/rev2_latam/sc/oledback/rules.mk
Normal file
2
keyboards/helix/rev2_latam/sc/oledback/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
OLED_ENABLE = yes
|
||||
LED_BACK_ENABLE = yes
|
2
keyboards/helix/rev2_latam/sc/oledunder/rules.mk
Normal file
2
keyboards/helix/rev2_latam/sc/oledunder/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
OLED_ENABLE = yes
|
||||
LED_UNDERGLOW_ENABLE = yes
|
1
keyboards/helix/rev2_latam/sc/rules.mk
Normal file
1
keyboards/helix/rev2_latam/sc/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
SPLIT_KEYBOARD = yes
|
1
keyboards/helix/rev2_latam/sc/under/rules.mk
Normal file
1
keyboards/helix/rev2_latam/sc/under/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
LED_UNDERGLOW_ENABLE = yes
|
8
keyboards/helix/rev2_latam/serial_config_simpleapi.h
Normal file
8
keyboards/helix/rev2_latam/serial_config_simpleapi.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef SERIAL_CONFIG_SIMPLEAPI_H
|
||||
#define SERIAL_CONFIG_SIMPLEAPI_H
|
||||
|
||||
#undef SERIAL_USE_MULTI_TRANSACTION
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
|
||||
#endif // SERIAL_CONFIG_SIMPLEAPI_H
|
92
keyboards/helix/rev2_latam/split_scomm.c
Normal file
92
keyboards/helix/rev2_latam/split_scomm.c
Normal file
@ -0,0 +1,92 @@
|
||||
#ifdef USE_SERIAL
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE flexible API (using multi-type transaction function) --- */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <split_scomm.h>
|
||||
#include "serial.h"
|
||||
#ifdef CONSOLE_ENABLE
|
||||
#include <print.h>
|
||||
#endif
|
||||
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile status_com = 0;
|
||||
uint8_t volatile status1 = 0;
|
||||
uint8_t slave_buffer_change_count = 0;
|
||||
uint8_t s_change_old = 0xff;
|
||||
uint8_t s_change_new = 0xff;
|
||||
|
||||
SSTD_t transactions[] = {
|
||||
#define GET_SLAVE_STATUS 0
|
||||
/* master buffer not changed, only recive slave_buffer_change_count */
|
||||
{ (uint8_t *)&status_com,
|
||||
0, NULL,
|
||||
sizeof(slave_buffer_change_count), &slave_buffer_change_count,
|
||||
},
|
||||
#define PUT_MASTER_GET_SLAVE_STATUS 1
|
||||
/* master buffer changed need send, and recive slave_buffer_change_count */
|
||||
{ (uint8_t *)&status_com,
|
||||
sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
|
||||
sizeof(slave_buffer_change_count), &slave_buffer_change_count,
|
||||
},
|
||||
#define GET_SLAVE_BUFFER 2
|
||||
/* recive serial_slave_buffer */
|
||||
{ (uint8_t *)&status1,
|
||||
0, NULL,
|
||||
sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
|
||||
}
|
||||
};
|
||||
|
||||
void serial_master_init(void)
|
||||
{
|
||||
soft_serial_initiator_init(transactions, TID_LIMIT(transactions));
|
||||
}
|
||||
|
||||
void serial_slave_init(void)
|
||||
{
|
||||
soft_serial_target_init(transactions, TID_LIMIT(transactions));
|
||||
}
|
||||
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
// 2 => checksum error
|
||||
int serial_update_buffers(int master_update)
|
||||
{
|
||||
int status, smatstatus;
|
||||
static int need_retry = 0;
|
||||
|
||||
if( s_change_old != s_change_new ) {
|
||||
smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER);
|
||||
if( smatstatus == TRANSACTION_END ) {
|
||||
s_change_old = s_change_new;
|
||||
#ifdef CONSOLE_ENABLE
|
||||
uprintf("slave matrix = %b %b %b %b %b\n",
|
||||
serial_slave_buffer[0], serial_slave_buffer[1],
|
||||
serial_slave_buffer[2], serial_slave_buffer[3],
|
||||
serial_slave_buffer[4] );
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// serial_slave_buffer dosen't change
|
||||
smatstatus = TRANSACTION_END; // dummy status
|
||||
}
|
||||
|
||||
if( !master_update && !need_retry) {
|
||||
status = soft_serial_transaction(GET_SLAVE_STATUS);
|
||||
} else {
|
||||
status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS);
|
||||
}
|
||||
if( status == TRANSACTION_END ) {
|
||||
s_change_new = slave_buffer_change_count;
|
||||
need_retry = 0;
|
||||
} else {
|
||||
need_retry = 1;
|
||||
}
|
||||
return smatstatus;
|
||||
}
|
||||
|
||||
#endif // SERIAL_USE_MULTI_TRANSACTION
|
||||
#endif /* USE_SERIAL */
|
24
keyboards/helix/rev2_latam/split_scomm.h
Normal file
24
keyboards/helix/rev2_latam/split_scomm.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef SPLIT_COMM_H
|
||||
#define SPLIT_COMM_H
|
||||
|
||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
||||
/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
|
||||
#include "serial.h"
|
||||
|
||||
#else
|
||||
/* --- USE flexible API (using multi-type transaction function) --- */
|
||||
// Buffers for master - slave communication
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
extern uint8_t slave_buffer_change_count;
|
||||
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(int master_changed);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* SPLIT_COMM_H */
|
109
keyboards/helix/rev2_latam/split_util.c
Normal file
109
keyboards/helix/rev2_latam/split_util.c
Normal file
@ -0,0 +1,109 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include "split_util.h"
|
||||
#include "matrix.h"
|
||||
#include "keyboard.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
# include "i2c.h"
|
||||
#else
|
||||
# include "split_scomm.h"
|
||||
#endif
|
||||
|
||||
#ifdef EE_HANDS
|
||||
# include "eeconfig.h"
|
||||
#endif
|
||||
|
||||
#ifndef SPLIT_USB_TIMEOUT
|
||||
# define SPLIT_USB_TIMEOUT 2000
|
||||
#endif
|
||||
|
||||
#ifndef SPLIT_USB_TIMEOUT_POLL
|
||||
# define SPLIT_USB_TIMEOUT_POLL 10
|
||||
#endif
|
||||
|
||||
volatile bool isLeftHand = true;
|
||||
|
||||
bool waitForUsb(void) {
|
||||
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) {
|
||||
// This will return true if a USB connection has been established
|
||||
if (UDADDR & _BV(ADDEN)) {
|
||||
return true;
|
||||
}
|
||||
wait_ms(SPLIT_USB_TIMEOUT_POLL);
|
||||
}
|
||||
|
||||
// Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
|
||||
(USBCON &= ~(_BV(USBE) | _BV(OTGPADE)));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool is_keyboard_left(void) {
|
||||
#if defined(SPLIT_HAND_PIN)
|
||||
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
|
||||
setPinInput(SPLIT_HAND_PIN);
|
||||
return readPin(SPLIT_HAND_PIN);
|
||||
#elif defined(EE_HANDS)
|
||||
return eeconfig_read_handedness();
|
||||
#elif defined(MASTER_RIGHT)
|
||||
return !is_helix_master();
|
||||
#endif
|
||||
|
||||
return is_helix_master();
|
||||
}
|
||||
|
||||
bool is_helix_master(void) {
|
||||
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
|
||||
|
||||
// only check once, as this is called often
|
||||
if (usbstate == UNKNOWN) {
|
||||
#if defined(SPLIT_USB_DETECT)
|
||||
usbstate = waitForUsb() ? MASTER : SLAVE;
|
||||
#elif defined(__AVR__)
|
||||
USBCON |= (1 << OTGPADE); // enables VBUS pad
|
||||
wait_us(5);
|
||||
|
||||
usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS
|
||||
#else
|
||||
usbstate = MASTER;
|
||||
#endif
|
||||
}
|
||||
|
||||
return (usbstate == MASTER);
|
||||
}
|
||||
|
||||
static void keyboard_master_setup(void) {
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
i2c_master_init();
|
||||
#else
|
||||
serial_master_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void keyboard_slave_setup(void) {
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||
#else
|
||||
serial_slave_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void split_keyboard_setup(void) {
|
||||
isLeftHand = is_keyboard_left();
|
||||
|
||||
if (is_helix_master()) {
|
||||
keyboard_master_setup();
|
||||
} else {
|
||||
keyboard_slave_setup();
|
||||
}
|
||||
sei();
|
||||
}
|
19
keyboards/helix/rev2_latam/split_util.h
Normal file
19
keyboards/helix/rev2_latam/split_util.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef SPLIT_KEYBOARD_UTIL_H
|
||||
#define SPLIT_KEYBOARD_UTIL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "eeconfig.h"
|
||||
|
||||
#define SLAVE_I2C_ADDRESS 0x32
|
||||
|
||||
extern volatile bool isLeftHand;
|
||||
|
||||
// slave version of matix scan, defined in matrix.c
|
||||
void matrix_slave_scan(void);
|
||||
|
||||
void split_keyboard_setup(void);
|
||||
bool is_helix_master(void);
|
||||
|
||||
void matrix_master_OLED_init (void);
|
||||
|
||||
#endif
|
1
keyboards/helix/rev2_latam/under/oled/rules.mk
Normal file
1
keyboards/helix/rev2_latam/under/oled/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
OLED_ENABLE = yes
|
1
keyboards/helix/rev2_latam/under/rules.mk
Normal file
1
keyboards/helix/rev2_latam/under/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
LED_UNDERGLOW_ENABLE = yes
|
Loading…
Reference in New Issue
Block a user