Manual user keymap removal (#23104)

This commit is contained in:
Joel Challis 2024-02-19 09:48:06 +00:00 committed by GitHub
parent db1df185c9
commit e26e12402b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
209 changed files with 0 additions and 14964 deletions

View file

@ -1,64 +0,0 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
Copyright 2021 Franco Rosi <fraanrosi@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/>.
*/
#pragma once
// place overrides here
// If you need more program area, try select and reduce rgblight modes to use.
#ifndef LED_ANIMATIONS
# define LED_ANIMATIONS
#endif
// 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
#define RGBLIGHT_EFFECT_TWINKLE
#endif
#undef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 4
#ifdef MOUSEKEY_ENABLE
#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 20
#undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 40
#undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 6
#undef MOUSEKEY_MOVE_DELTA
#define MOUSEKEY_MOVE_DELTA 5
#undef MOUSEKEY_DELAY
#define MOUSEKEY_DELAY 0
#endif

View file

@ -1,288 +0,0 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
Copyright 2021 Franco Rosi <fraanrosi@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/>.
*/
#include QMK_KEYBOARD_H
// Following line allows macro to read current RGB settings
#ifdef RGBLIGHT_ENABLE
uint8_t RGB_current_mode;
HSV CURRENT_COLOR;
bool caps_is_active = false;
/*Here I set the first rgb mode*/
void keyboard_post_init_user(void) {
rgblight_enable(); // Enables RGB, without saving settings
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 3);
RGB_current_mode = rgblight_get_mode();
rgblight_sethsv(HSV_RED);
CURRENT_COLOR = rgblight_get_hsv();
}
#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,
_LOWER,
_RAISE
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
RGBRST,
RGB_1,
RGB_2,
RGB_3,
RGB_4,
RGB_5,
RGB_6,
RGB_7,
RGB_8,
RGB_9
};
#define LOWER MO(1)
#define RAISE MO(2)
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 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | CAPS | A | S | D | F | G | | H | J | K | L | Ñ |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* |Shift | Z | X | C | V | B | { | } | N | M | , | . | - |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Esc | Win | Alt |Raise |Lower |Space |Space |Alt Gr| Left | Up | Down |Right | Ctrl |
* `-------------------------------------------------------------------------------------------------'
*/
[_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
* ,-----------------------------------------. ,-----------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | Mute | Play |Mouse1|Mouse2| | |Print | |Insert|' ? \ | ¿ ¡ | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | |Shine+|Shine-| Vol -| Vol +| | | |Mouse| | ´ ¨ |+ * ~ | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | < > | | | | | | |Mouse|Mouse|Mouse| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | Home |PageUp|PageDn| End | |
* `-------------------------------------------------------------------------------------------------'
*/
[_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_MUTE, KC_MPLY, KC_BTN1, KC_BTN2, KC_TRNS, KC_PSCR, KC_TRNS, KC_INS, KC_MINS, KC_EQL, KC_TRNS,
KC_NO, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_MS_U, 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_MS_L, KC_MS_D, KC_MS_R, 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
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | RGB1 | RGB2 | RGB3 | RGB4 |RGB ON| | | | MODE+| MODE-| | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | RGB5 | RGB6 | RGB7 | RGB8 | RGB9 | | | | HUE+ | HUE- | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | MODE+| MODE-| HUE+ | HUE- | | Reset| | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_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_1, RGB_2, RGB_3, RGB_4, RGB_TOG, KC_NO, KC_NO, RGB_MOD, RGB_RMOD,KC_NO, KC_NO, KC_NO,
RGB_5, RGB_6, RGB_7, RGB_8, RGB_9, KC_NO, KC_NO, RGB_HUI, RGB_HUD, KC_NO, KC_NO, KC_NO,
KC_NO, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, KC_NO, QK_BOOT, 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;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
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
if (!caps_is_active) {
RGB_current_mode = rgblight_get_mode();
CURRENT_COLOR = rgblight_get_hsv();
}
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_sethsv(HSV_BLUE);
#endif
}
layer_on(_LOWER);
} else {
#ifdef RGBLIGHT_ENABLE
if (!caps_is_active) {
rgblight_mode(RGB_current_mode);
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
} else {
rgblight_mode(RGBLIGHT_MODE_ALTERNATING);
rgblight_sethsv(HSV_WHITE);
}
#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
if (!caps_is_active) {
RGB_current_mode = rgblight_get_mode();
CURRENT_COLOR = rgblight_get_hsv();
}
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_sethsv(HSV_RED);
#endif
}
layer_on(_RAISE);
} else {
#ifdef RGBLIGHT_ENABLE
if (!caps_is_active) {
rgblight_mode(RGB_current_mode);
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
} else {
rgblight_mode(RGBLIGHT_MODE_ALTERNATING);
rgblight_sethsv(HSV_WHITE);
}
#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_1 ... RGB_9:
if (record->event.pressed) {
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
//this to have each custom mode separately, but sharing logic
switch(keycode){
case RGB_1:
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD + 1);
break;
case RGB_2:
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
break;
case RGB_3:
rgblight_mode(RGBLIGHT_MODE_SNAKE);
break;
case RGB_4:
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 3);
break;
case RGB_5:
rgblight_mode(RGBLIGHT_MODE_TWINKLE + 5);
break;
case RGB_6:
rgblight_mode(RGBLIGHT_MODE_BREATHING + 3);
break;
case RGB_7:
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
break;
case RGB_8:
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 5);
break;
case RGB_9:
rgblight_mode(RGBLIGHT_MODE_CHRISTMAS);
break;
}
RGB_current_mode = rgblight_get_mode();
CURRENT_COLOR = rgblight_get_hsv();
}
return false;
break;
case RGB_TOG ... RGB_HUD:
if (record->event.pressed) {
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
rgblight_mode(RGB_current_mode);
process_rgb(keycode, record);
RGB_current_mode = rgblight_get_mode();
CURRENT_COLOR = rgblight_get_hsv();
}
return false;
break;
case KC_CAPS:
if (record->event.pressed) {
register_code(KC_CAPS);
caps_is_active = !caps_is_active;
if (caps_is_active) {
CURRENT_COLOR = rgblight_get_hsv();
rgblight_mode(RGBLIGHT_MODE_ALTERNATING);
rgblight_sethsv(HSV_WHITE);
} else if (!caps_is_active) {
unregister_code(KC_CAPS);
rgblight_mode(RGB_current_mode);
rgblight_sethsv(CURRENT_COLOR.h, CURRENT_COLOR.s, CURRENT_COLOR.v);
}
}
return false;
break;
case RGBRST:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
RGB_current_mode = rgblight_get_mode();
}
#endif
break;
}
return true;
}
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
RGB_current_mode = rgblight_get_mode();
CURRENT_COLOR = rgblight_get_hsv();
#endif
}

View file

@ -1,40 +0,0 @@
<!---Copyright 2021 Franco Rosi <fraanrosi@gmail.com> -->
## Fraanrosi
A **Latin American Spanish** keymap for Helix/rev2/under, 5 rows.
Designed to be as simple and more touch typing oriented as possible.
It was inspired by a DELL Latitude E5470.
## Layers
The Helix obviously does not have enough keys compared to a typical keyboard.
The keymap has multiple layers, moving extra keys to different layers.
|Priority|Layer ID|Layer Name|Contents|
| ---- | ---- | --- | --- |
||0|Qwerty|Qwerty layout (Base)|
||1|Lower|Symbols, media, function keys and mouse.(Blue)|
||2|Raise|Underglow RGB config(Red)|
Keymap : http://www.keyboard-layout-editor.com/#/gists/4cd7b4ccda1de5cf9edc56d29b64da30
### First layer (qwerty).
It contains the "**Ñ**" letter.
"Caps Lock" key toggle an RGB mode, to alert.
@ is typed with AltGr+q
![first-layer](https://i.imgur.com/BaVDVdB.png)
### Second layer (Lower).
While "Lower" key is pressed, the RBG mode remains BLUE.
It has the "Symbols, media, function keys and mouse" features.
It completes the rest of the needed qwerty and F keys.
![second-layer](https://i.imgur.com/HbDVTfp.png)
### Third layer (Raise).
While "Raise" key is pressed, the RBG mode remains RED.
This is the underglow RGB's layer , where can be controlled the modes and hue.
With reset button for the micros.
![third-layer](https://i.imgur.com/MF8jjbu.png)
### All the layers.
![all-the-layers](https://i.imgur.com/jn1VI4V.png)
<!---![Keyboard](https://i.imgur.com/Onwmsss.png) -->

View file

@ -1,24 +0,0 @@
# 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.
#
SPLIT_KEYBOARD = yes
LTO_ENABLE = yes # if firmware size over limit, try this option
MOUSEKEY_ENABLE = yes # Mouse keys
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つの変数を必要に応じて編集し、コメントアウトをはずします。
# 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)
LED_BACK_ENABLE = no
LED_UNDERGLOW_ENABLE = yes

View file

@ -1,50 +0,0 @@
/*
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 */
// the froggy keymap does not use the right hand side, so sync_timer is not needed
#define DISABLE_SYNC_TIMER
// For the same reason, the following are also not needed
#undef SPLIT_LAYER_STATE_ENABLE
#undef SPLIT_LED_STATE_ENABLE
// 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 */

View file

@ -1,235 +0,0 @@
// 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
};

View file

@ -1,696 +0,0 @@
#include QMK_KEYBOARD_H
#include <string.h>
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define LAYOUT_half( \
L00, L01, L02, L03, L04, L05, \
L10, L11, L12, L13, L14, L15, \
L20, L21, L22, L23, L24, L25, \
L30, L31, L32, L33, L34, L35, L36, \
L40, L41, L42, L43, L44, L45, L46 \
) { \
{ 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 }, \
{ _______, _______, _______, _______, _______, _______, KC_NO }, \
{ _______, _______, _______, _______, _______, _______, KC_NO }, \
{ _______, _______, _______, _______, _______, _______, _______ }, \
{ _______, _______, _______, _______, _______, _______, _______ } \
}
#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)
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_half(
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_half(
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_half(
RGBRST,RGB_HUI, _______, QK_BOOT, 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_half(
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_half(
_______, _______, 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_NUM, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______,
_______, _______, KC_PDOT, KC_COMM, _______, _______, _______
)
};
#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);
#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_keyboard_master()) || (row >= 5 && !is_keyboard_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_LNG2);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LNG2);
}
return false;
break;
case KANA:
if (record->event.pressed) {
if(keymap_config.swap_lalt_lgui==false){
register_code(KC_LNG1);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LNG1);
}
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_get_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_get_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_get_mode();
}
#endif
break;
case RGB3:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
RGB_current_mode = rgblight_get_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 RGBLIGHT_ENABLE
RGB_current_mode = rgblight_get_mode();
#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) {
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
}
//OLED update loop
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_0;
}
// Render to OLED
void render_status(void) {
// 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
led_t led_state = host_keyboard_led_state();
if (led_state.num_lock) { rown = 4; } else { rown = 0; }
if (led_state.caps_lock) { rowa = 4; } else { rowa = 0; }
if (led_state.scroll_lock) { rows = 4; } else { rows = 0; }
if (layer_state == L_FUNC) { rowf = 4; }
oled_write(indctr[rown] [0], false);
oled_write(indctr[rowf] [1], false);
oled_write(logo [0] [0], false);
oled_write(indctr[rown+1][0], false);
oled_write(indctr[rowf+1][1], false);
oled_write(logo [1] [0], false);
oled_write(indctr[rowa+2][0], false);
oled_write(indctr[rows+2][1], false);
oled_write(logo [2] [0], false);
oled_write(indctr[rowa+3][0], false);
oled_write(indctr[rows+3][1], false);
oled_write(logo [3] [0], false);
}
bool oled_task_user(void) {
#if DEBUG_TO_SCREEN
if (debug_enable) {
return;
}
#endif
if (is_keyboard_master()) {
render_status();
}
return false;
}
#endif // end of OLED_ENABLE

View file

@ -1,83 +0,0 @@
Froggy -one hand Helix-
======
![Imgur](https://i.imgur.com/S1Dw3XW.jpg)
## 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| | | | | | |
`------------------------------------------------'
```

View file

@ -1,27 +0,0 @@
# 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
SPLIT_KEYBOARD = yes
# Helix Spacific Build Options
# you can uncomment and edit follows 7 Variables
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
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)
# OLED_ENABLE が yes のとき
# OLED_SELECT が core ならば QMK 標準の oled_dirver.c を使用します。
# OLED_SELECT が core 以外ならば従来どおり helix/local_drivers/ssd1306.c を使用します。
# If OLED_ENABLE is 'yes'
# If OLED_SELECT is 'core', use QMK standard oled_dirver.c.
# If OLED_SELECT is other than 'core', use helix/local_drivers/ssd1306.c.
OLED_SELECT = core

View file

@ -1,47 +0,0 @@
/*
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 */
// the froggy keymap does not use the right hand side, so sync_timer is not needed
#define DISABLE_SYNC_TIMER
// For the same reason, the following are also not needed
#undef SPLIT_LAYER_STATE_ENABLE
#undef SPLIT_LED_STATE_ENABLE
// 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

View file

@ -1,235 +0,0 @@
// 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,
};

View file

@ -1,810 +0,0 @@
#include QMK_KEYBOARD_H
#include "keymap_japanese.h"
#include <string.h>
#define LAYOUT_half( \
L00, L01, L02, L03, L04, L05, \
L10, L11, L12, L13, L14, L15, \
L20, L21, L22, L23, L24, L25, \
L30, L31, L32, L33, L34, L35, L36, \
L40, L41, L42, L43, L44, L45, L46 \
) { \
{ 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 }, \
{ _______, _______, _______, _______, _______, _______, KC_NO }, \
{ _______, _______, _______, _______, _______, _______, KC_NO }, \
{ _______, _______, _______, _______, _______, _______, _______ }, \
{ _______, _______, _______, _______, _______, _______, _______ } \
}
#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)
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_half(
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_half(
LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LABK, 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_half(
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_half(
KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_RABK, 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_half(
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_half(
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_half(
_______, _______, 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_NUM, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______,
_______, _______, KC_PDOT, KC_COMM, _______, _______, _______
),
[_NUM_106] = LAYOUT_half(
_______, _______, 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_NUM, 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_half(
RGBRST,RGB_HUI, TO_101, QK_BOOT, 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,_______, _______, _______, _______, _______, _______
)
};
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_keyboard_master()) || (row >= 5 && !is_keyboard_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_LABK: // == 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_LNG2);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LNG2);
}
return false;
break;
case KANA:
if (record->event.pressed) {
if(IS_MODE_MAC()){
register_code(KC_LNG1);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LNG1);
}
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;
}
// 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) {
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
}
//OLED update loop
#ifdef OLED_ENABLE
// Render to OLED
void render_status(void) {
// 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
led_t led_state = host_keyboard_led_state();
if (led_state.num_lock) { rown = 4; }
if (led_state.caps_lock) { rowa = 4; }
if (led_state.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; }
oled_write(indctr[rown] [0], false);
oled_write(indctr[rowf] [1], false);
oled_write(modectl[rowm] [0], false);
oled_write(logo[0], false);
oled_write(indctr[rown+1][0], false);
oled_write(indctr[rowf+1][1], false);
oled_write(modectl[rowm] [1], false);
oled_write(logo[1], false);
oled_write(indctr[rowa+2][0], false);
oled_write(indctr[rows+2][1], false);
oled_write(modectl[rowj] [0], false);
oled_write(logo[2], false);
oled_write(indctr[rowa+3][0], false);
oled_write(indctr[rows+3][1], false);
oled_write(modectl[rowj] [1], false);
oled_write(logo[3], false);
}
bool oled_task_user(void) {
#if DEBUG_TO_SCREEN
if (debug_enable) {
return;
}
#endif
if (is_keyboard_master()) {
render_status();
}
return false;
}
#endif // end of OLED_ENABLE
// Local Variables:
// mode: c++
// truncate-lines: t
// indent-tabs-mode: nil
// End:

View file

@ -1,85 +0,0 @@
Froggy -one hand Helix- with 106-key mode
======
![Imgur](https://i.imgur.com/S1Dw3XW.jpg)
## 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| | | | | | |
`------------------------------------------------'
```

View file

@ -1,27 +0,0 @@
# 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 = yes # if firmware size over limit, try this option
SPLIT_KEYBOARD = yes
# Helix Spacific Build Options
# you can uncomment and edit follows 7 Variables
# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。
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)
# OLED_ENABLE が yes のとき
# OLED_SELECT が core ならば QMK 標準の oled_dirver.c を使用します。
# OLED_SELECT が core 以外ならば従来どおり helix/local_drivers/ssd1306.c を使用します。
# If OLED_ENABLE is 'yes'
# If OLED_SELECT is 'core', use QMK standard oled_dirver.c.
# If OLED_SELECT is other than 'core', use helix/local_drivers/ssd1306.c.
OLED_SELECT = core