[Keymap Removal] keyboard with most keymaps (#23081)

* splitkb/kyria

* lily58

* gmmk/pro/rev1/ansi

* lets_split
master
Joel Challis 2024-02-15 08:23:23 +00:00 committed by GitHub
parent a9f1105f98
commit 4a128c6062
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
260 changed files with 0 additions and 25415 deletions

View File

@ -1,67 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2021 alexmarmon
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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Alt_L Win_L SPACE Ct_R Alt_R FN Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
[0] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, RGB_MODE_FORWARD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
_______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, _______, KC_MEDIA_NEXT_TRACK
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}

View File

@ -1,7 +0,0 @@
![Layout Image](https://i.imgur.com/MizMvsI.jpg)
# Simple MacOS like keymap with RGB
* Working basic RGB thanks to https://github.com/qmk/qmk_firmware/pull/13430
* Restore working rotary knob volume control
* Add media_previous and media_next to FN+left and FN+right

View File

@ -1,81 +0,0 @@
/* Copyright 2022 Andre Brait
*
* 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
#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms)
# define RGB_MATRIX_SLEEP
#endif
// A debounce of 8 represents a minimum key press time of just under 1 refresh at 120Hz
// Slightly higher than the default because we are using sym_eager_pk
#ifdef DEBOUNCE
# undef DEBOUNCE
#endif
#define DEBOUNCE 8
// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
// #define ENABLE_RGB_MATRIX_BAND_SAT
// #define ENABLE_RGB_MATRIX_BAND_VAL
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// #define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
// #define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define ENABLE_RGB_MATRIX_SPLASH
// #define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View File

@ -1,510 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2022 Andre Brait <andrebrait@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
enum layers { WIN_BASE = 0, WIN_FN, MAC_BASE, MAC_FN };
enum custom_keycodes {
CMDQ_TOG = QK_KB_2 // TECH DEBT: Starts at QK_KB_2 to maintain ordering with VIA definitions. See #19884. Revert to QK_KB_0 when VIA catches up with QMK.
};
#define KC_TASK LWIN(KC_TAB) // Open Task Manager
#define KC_FLXP LWIN(KC_E) // Open File Explorer
#define DF_WINB DF(WIN_BASE) // Switch to WIN_BASE layer
#define MO_WINF MO(WIN_FN) // Toggle to WIN_FN layer
#define DF_MACB DF(MAC_BASE) // Switch to MAX_BASE layer
#define MO_MACF MO(MAC_FN) // Toggle to MAC_FN layer
// clang-format off
uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// The GMMK Pro default layout is:
//
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Play/Pause)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
//
// This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO).
// Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience.
// Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts.
//
// RGB and function keys are inspired by the Keychron Q1 layouts instead of using the default keys.
// To clean the EEPROM, hold the ESC key while connecting the keyboard.
[WIN_BASE] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO_WINF, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[WIN_FN] = LAYOUT(
EE_CLR, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, KC_SCRL,
DF_MACB, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
[MAC_BASE] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO_MACF, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[MAC_FN] = LAYOUT(
EE_CLR, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BRMU,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, KC_BRMD,
DF_WINB, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN,
XXXXXXX, XXXXXXX, CMDQ_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
)
};
// clang-format on
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_FN] = {ENCODER_CCW_CW(XXXXXXX, XXXXXXX)},
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[MAC_FN] = {ENCODER_CCW_CW(XXXXXXX, XXXXXXX)},
};
#endif
/* To record user preferences */
typedef union {
uint32_t raw; // set to 32-bit of size
struct {
bool rgb_enabled : 1; // Artificial RGB ON/OFF flag (1 bit)
bool cmd_q_delay_enabled : 1; // Toggle CMD+Q delay (1 bit)
};
} user_config_t;
user_config_t user_config;
/* Delayed keypresses variables and functions */
static fast_timer_t delayed_press_delay = 0;
static uint16_t delayed_press_keycode = KC_NO;
static fast_timer_t delayed_press_start_time = 0;
static uint16_t delayed_press_sent_keycode = KC_NO;
static void start_delayed_press(fast_timer_t delay, uint16_t keycode);
static void mark_delayed_press_sent(void);
static void mark_delayed_release_sent(void);
static void cancel_delayed_press(void);
#define IS_ANY_DELAYED_PRESS_PENDING() (delayed_press_start_time > 0 && delayed_press_keycode != KC_NO)
#define IS_DELAYED_PRESS_PENDING(keycode) (delayed_press_start_time > 0 && delayed_press_keycode == (keycode))
#define IS_DELAYED_PRESS_SENT(keycode) (delayed_press_sent_keycode != KC_NO && delayed_press_sent_keycode == (keycode))
/* CMD+Q delay */
#ifndef CMD_Q_DELAY
# define CMD_Q_DELAY 1000
#endif
#if CMD_Q_DELAY <= 0 || CMD_Q_DELAY >= UINT16_MAX / 2
# error "CMD_Q_DELAY must be a positive integer smaller than UINT16_MAX / 2"
#endif
#ifdef RGB_MATRIX_ENABLE
# define CAPS_LOCK_COLOR RGB_RED
# define WIN_BASE_COLOR RGB_BLUE
# define WIN_FN_COLOR RGB_BLUE
# define MAC_BASE_COLOR RGB_WHITE
# define MAC_FN_COLOR RGB_WHITE
# define UNKNOWN_LAYER_COLOR RGB_PINK
/* The maximum effects duration */
# ifndef EFFECTS_DURATION
# define EFFECTS_DURATION 2000
# endif
# if EFFECTS_DURATION <= 0 || EFFECTS_DURATION >= UINT16_MAX / 2
# error "EFFECTS_DURATION must be a positive integer smaller than UINT16_MAX / 2"
# endif
/* The interval for the flashing effect */
# ifndef FLASHING_EFFECT_INTERVAL
# define FLASHING_EFFECT_INTERVAL 250
# endif
# if FLASHING_EFFECT_INTERVAL <= 0 || FLASHING_EFFECT_INTERVAL >= UINT16_MAX / 2
# error "FLASHING_EFFECT_INTERVAL must be a positive integer smaller than UINT16_MAX / 2"
# endif
static void set_rgb_layer_winfn(void);
static void set_rgb_layer_macfn(void);
/* Effects functions */
static float flashing_effect(fast_timer_t delta_time);
static float static_effect(fast_timer_t delta_time);
static float increasing_effect(fast_timer_t delta_time);
/* Effect variables and functions */
static fast_timer_t effect_started_time = 0;
static fast_timer_t effect_max_duration = EFFECTS_DURATION;
static uint8_t effect_r = 0x0, effect_g = 0x0, effect_b = 0x0;
static float (*effect_multiplier)(fast_timer_t) = static_effect;
static void start_effects(fast_timer_t max_duration, uint8_t r_color, uint8_t g_color, uint8_t b_color, float (*multiplier)(fast_timer_t));
static void stop_effects(void);
/* Delayed keypresses variables with RGB variant */
static void start_delayed_press_with_effects(fast_timer_t delay, uint16_t keycode, uint8_t r_color, uint8_t g_color, uint8_t b_color);
#endif // RGB_MATRIX_ENABLE
void eeconfig_init_user(void) { // EEPROM is getting reset!
user_config.raw = 0;
user_config.rgb_enabled = true; // We want this enabled by default
user_config.cmd_q_delay_enabled = true; // We want this enabled by default
eeconfig_update_user(user_config.raw); // Write default value to EEPROM now
}
void keyboard_post_init_user(void) {
#ifdef RGB_MATRIX_ENABLE
// Enable the RGB matrix, if not enabled
if (!rgb_matrix_is_enabled()) {
rgb_matrix_enable();
}
// Set the flags to ALL, if not already set
if (rgb_matrix_get_flags() != LED_FLAG_ALL) {
rgb_matrix_set_flags(LED_FLAG_ALL);
}
#endif
// Read the user config from EEPROM
user_config.raw = eeconfig_read_user();
}
void matrix_scan_user(void) {
if (IS_ANY_DELAYED_PRESS_PENDING()) {
if (timer_elapsed_fast(delayed_press_start_time) > delayed_press_delay) {
register_code(delayed_press_keycode);
mark_delayed_press_sent();
}
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (IS_DELAYED_PRESS_SENT(keycode)) {
if (!record->event.pressed) {
/* Send key-up event and clear the keycode and stop processing */
unregister_code(keycode);
mark_delayed_release_sent();
return false;
}
} else if (IS_DELAYED_PRESS_PENDING(keycode)) {
if (!record->event.pressed) {
/* Cancel the pending press and stop processing */
cancel_delayed_press();
return false;
}
} else if (IS_ANY_DELAYED_PRESS_PENDING()) {
/* Cancel the pending press and resume processing */
cancel_delayed_press();
}
switch (keycode) {
case QK_DEF_LAYER ... QK_DEF_LAYER_MAX:
if (record->event.pressed) {
/* Set the default layout on the EEPROM, let the default layer change callback handle the rest */
set_single_persistent_default_layer(QK_DEF_LAYER_GET_LAYER(keycode));
}
return false;
case CMDQ_TOG:
if (record->event.pressed) {
#ifdef RGB_MATRIX_ENABLE
if (user_config.cmd_q_delay_enabled) {
/* Turning delay OFF */
start_effects(EFFECTS_DURATION, RGB_RED, flashing_effect);
} else {
/* Turning delay ON */
start_effects(EFFECTS_DURATION, RGB_GREEN, flashing_effect);
}
#endif
user_config.cmd_q_delay_enabled = !user_config.cmd_q_delay_enabled;
eeconfig_update_user(user_config.raw);
}
return false;
case KC_Q:
if (user_config.cmd_q_delay_enabled) {
if (layer_state_is(MAC_BASE)) {
uint8_t mods = get_mods();
if (mods == MOD_BIT(KC_LCMD) || mods == MOD_BIT(KC_RCMD)) {
if (record->event.pressed) {
#ifdef RGB_MATRIX_ENABLE
start_delayed_press_with_effects(CMD_Q_DELAY, KC_Q, RGB_ORANGE);
#else
start_delayed_press(CMD_Q_DELAY, KC_Q);
#endif
}
return false;
}
}
}
break;
#ifdef RGB_MATRIX_ENABLE
# ifdef NKRO_ENABLE
case NK_TOGG:
if (record->event.pressed) {
if (keymap_config.nkro) {
/* Turning NKRO OFF */
start_effects(EFFECTS_DURATION, RGB_RED, flashing_effect);
} else {
/* Turning NKRO ON */
start_effects(EFFECTS_DURATION, RGB_GREEN, flashing_effect);
}
}
break;
# endif // NKRO_ENABLE
case RGB_TOG:
if (record->event.pressed) {
user_config.rgb_enabled = !user_config.rgb_enabled;
eeconfig_update_user(user_config.raw);
}
return false;
case RGB_MODE_FORWARD ... RGB_MODE_TWINKLE:
if (!user_config.rgb_enabled) {
/* Ignore changes to RGB settings while only it's supposed to be OFF */
return false; // Skip all further processing of this key
}
break;
#endif // RGB_MATRIX_ENABLE
}
return true;
}
static void start_delayed_press(fast_timer_t delay, uint16_t keycode) {
delayed_press_delay = delay;
delayed_press_keycode = keycode;
delayed_press_start_time = timer_read_fast();
delayed_press_sent_keycode = KC_NO;
}
static void mark_delayed_press_sent(void) {
delayed_press_sent_keycode = delayed_press_keycode;
cancel_delayed_press();
}
static void mark_delayed_release_sent(void) {
delayed_press_sent_keycode = KC_NO;
}
static void cancel_delayed_press(void) {
delayed_press_delay = 0;
delayed_press_keycode = KC_NO;
delayed_press_start_time = 0;
#ifdef RGB_MATRIX_ENABLE
stop_effects();
#endif
}
#ifdef RGB_MATRIX_ENABLE
static void start_delayed_press_with_effects(fast_timer_t delay, uint16_t keycode, uint8_t r_color, uint8_t g_color, uint8_t b_color) {
start_delayed_press(delay, keycode);
start_effects(delay, r_color, g_color, b_color, increasing_effect);
}
/*
Effects when switching layers
*/
static uint8_t previous_layer = UINT8_MAX;
layer_state_t default_layer_state_set_user(layer_state_t state) {
uint8_t current_layer = get_highest_layer(state);
if (previous_layer != current_layer) {
// For some reason, setting the default layer alone doesn't change it fully
layer_move(current_layer);
switch (current_layer) {
case WIN_BASE:
start_effects(EFFECTS_DURATION, WIN_BASE_COLOR, flashing_effect);
break;
case MAC_BASE:
start_effects(EFFECTS_DURATION, MAC_BASE_COLOR, flashing_effect);
break;
default:
// This should not ever happen, but let's display something if it does!
start_effects(EFFECTS_DURATION, UNKNOWN_LAYER_COLOR, static_effect);
break;
}
previous_layer = current_layer;
}
return state;
}
static void start_effects(fast_timer_t max_duration, uint8_t r_color, uint8_t g_color, uint8_t b_color, float (*multiplier)(fast_timer_t)) {
effect_r = r_color;
effect_g = g_color;
effect_b = b_color;
effect_multiplier = multiplier;
effect_max_duration = max_duration;
effect_started_time = timer_read_fast();
}
static void stop_effects(void) {
effect_r = 0x0;
effect_g = 0x0;
effect_b = 0x0;
effect_multiplier = static_effect;
effect_max_duration = EFFECTS_DURATION;
effect_started_time = 0;
}
static float flashing_effect(fast_timer_t delta_time) {
return ((delta_time / FLASHING_EFFECT_INTERVAL) + 1) & 0x01;
}
static float static_effect(fast_timer_t delta_time) {
return 1.0;
}
static float increasing_effect(fast_timer_t delta_time) {
return ((float)delta_time) / effect_max_duration;
}
bool rgb_matrix_indicators_user(void) {
if (effect_started_time > 0) {
fast_timer_t delta_time = timer_elapsed_fast(effect_started_time);
if (delta_time <= effect_max_duration) {
/* Render effect */
float multiplier = effect_multiplier(delta_time);
uint8_t val_r = multiplier * effect_r;
uint8_t val_g = multiplier * effect_g;
uint8_t val_b = multiplier * effect_b;
rgb_matrix_set_color_all(val_r, val_g, val_b);
return false;
} else {
/* Effect duration is finished */
stop_effects();
}
}
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color_all(CAPS_LOCK_COLOR);
} else if (!user_config.rgb_enabled) {
rgb_matrix_set_color_all(RGB_OFF);
}
switch (get_highest_layer(layer_state)) {
case WIN_BASE:
case MAC_BASE:
break;
case WIN_FN:
set_rgb_layer_winfn();
return false;
case MAC_FN:
set_rgb_layer_macfn();
return false;
default:
// This should never happen, but if it does, let's display something!
rgb_matrix_set_color_all(UNKNOWN_LAYER_COLOR);
return false;
}
return true;
}
// RGB led number layout, function of the key
// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12
// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13
// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14
// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15
// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16
// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17
// 87, led 07 88, led 18
// 91, led 08 92, led 19
static void set_rgb_layer_winfn(void) {
rgb_matrix_set_color(0, WIN_FN_COLOR);
rgb_matrix_set_color(6, WIN_FN_COLOR);
rgb_matrix_set_color(12, WIN_FN_COLOR);
rgb_matrix_set_color(18, WIN_FN_COLOR);
rgb_matrix_set_color(23, WIN_FN_COLOR);
rgb_matrix_set_color(28, WIN_FN_COLOR);
rgb_matrix_set_color(34, WIN_FN_COLOR);
rgb_matrix_set_color(39, WIN_FN_COLOR);
rgb_matrix_set_color(44, WIN_FN_COLOR);
rgb_matrix_set_color(50, WIN_FN_COLOR);
rgb_matrix_set_color(56, WIN_FN_COLOR);
rgb_matrix_set_color(61, WIN_FN_COLOR);
rgb_matrix_set_color(66, WIN_FN_COLOR);
rgb_matrix_set_color(2, WIN_FN_COLOR);
rgb_matrix_set_color(3, WIN_FN_COLOR);
rgb_matrix_set_color(8, WIN_FN_COLOR);
rgb_matrix_set_color(9, WIN_FN_COLOR);
rgb_matrix_set_color(14, WIN_FN_COLOR);
rgb_matrix_set_color(15, WIN_FN_COLOR);
rgb_matrix_set_color(20, WIN_FN_COLOR);
rgb_matrix_set_color(21, WIN_FN_COLOR);
rgb_matrix_set_color(25, WIN_FN_COLOR);
rgb_matrix_set_color(26, WIN_FN_COLOR);
rgb_matrix_set_color(38, WIN_FN_COLOR);
rgb_matrix_set_color(93, WIN_FN_COLOR);
rgb_matrix_set_color(72, WIN_FN_COLOR);
rgb_matrix_set_color(75, WIN_FN_COLOR);
rgb_matrix_set_color(86, WIN_FN_COLOR);
rgb_matrix_set_color(82, WIN_FN_COLOR);
}
static void set_rgb_layer_macfn(void) {
rgb_matrix_set_color(0, MAC_FN_COLOR);
rgb_matrix_set_color(6, MAC_FN_COLOR);
rgb_matrix_set_color(12, MAC_FN_COLOR);
rgb_matrix_set_color(18, MAC_FN_COLOR);
rgb_matrix_set_color(23, MAC_FN_COLOR);
rgb_matrix_set_color(28, MAC_FN_COLOR);
rgb_matrix_set_color(34, MAC_FN_COLOR);
rgb_matrix_set_color(39, MAC_FN_COLOR);
rgb_matrix_set_color(44, MAC_FN_COLOR);
rgb_matrix_set_color(50, MAC_FN_COLOR);
rgb_matrix_set_color(56, MAC_FN_COLOR);
rgb_matrix_set_color(61, MAC_FN_COLOR);
rgb_matrix_set_color(66, MAC_FN_COLOR);
rgb_matrix_set_color(2, MAC_FN_COLOR);
rgb_matrix_set_color(3, MAC_FN_COLOR);
rgb_matrix_set_color(8, MAC_FN_COLOR);
rgb_matrix_set_color(9, MAC_FN_COLOR);
rgb_matrix_set_color(14, MAC_FN_COLOR);
rgb_matrix_set_color(15, MAC_FN_COLOR);
rgb_matrix_set_color(20, MAC_FN_COLOR);
rgb_matrix_set_color(21, MAC_FN_COLOR);
rgb_matrix_set_color(25, MAC_FN_COLOR);
rgb_matrix_set_color(26, MAC_FN_COLOR);
rgb_matrix_set_color(38, MAC_FN_COLOR);
rgb_matrix_set_color(93, MAC_FN_COLOR);
rgb_matrix_set_color(72, MAC_FN_COLOR);
rgb_matrix_set_color(75, MAC_FN_COLOR);
rgb_matrix_set_color(86, MAC_FN_COLOR);
rgb_matrix_set_color(82, MAC_FN_COLOR);
rgb_matrix_set_color(17, MAC_FN_COLOR);
}
#endif // RGB_MATRIX_ENABLE

View File

@ -1,32 +0,0 @@
# andrebrait's GMMK Pro layout
This is pretty much the stock layout with a few things moved around.
It basically reflects my needs for both Delete and Insert being readily available for coding, as well as a full Home/PgUp/PgDwn/End column.
The differences are as follows:
- Dedicated MacOS and Windows/Linux layers
- Switching between them by pressing Fn + CAPS LOCK
- VIA support
- Disabled Mouse Keys (to fix issues with KVM switches and also because they're not used here anyway)
- RGB turns off after 20 minutes of inactivity
- RGB turns off when USB is suspended
- Layer 0:
- Delete -> Insert
- Page Up -> Delete
- Page Down -> Home
- Layer 1 (accessed by pressing Fn):
- Fn + Insert -> Pause
- Fn + Delete -> Scroll Lock
- Fn + Esc -> Clear EEPROM
- Fn + (Left) CMD (macOS layout) -> Toggle the CMD + Q delay
On the Mac layer, pressing CMD + Q will not immediately send the combination.\
There's a configurable delay (defaults to 1 second) to send it.\
This is done mainly to prevent hitting CMD + Q by mistake when alternating between applications with CMD + Tab.
This keymap also includes CAPS LOCK ON indicator.\
All left and right side LEDs, and the Caps key LED will turn solid red while CAPS LOCK is ON.
No other changes have been made. \
The other keys on each layer have been kept intact.

View File

@ -1,30 +0,0 @@
# Enable additional features.
# Disabling MouseKey because it breaks my KVM switch
MOUSEKEY_ENABLE = no
# Use sym_eager_pk for better latency when gaming.
#
# Previous issues with sym_defer_pk (and sym_eager_pk and debounce times
# shorter than 8ms) were due to Glorious' horrible hot-swap sockets.
# These issues were 100% resolved after I replaced them with Gateron hot-swap sockets.
#
# The old sockets apparently didn't hold onto the legs of the switches at all.
#
# Using eager might not be a good idea with other switch types, but I only use
# linears now, so this should be ok.
#
# asym_eager_defer_pk also works well and it is more resistant to chatter at
# the cost of delay when releasing a key being slightly higher.
DEBOUNCE_TYPE = sym_eager_pk
# Useful for debugging
# CONSOLE_ENABLE = yes
# DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
# DEBUG_MATRIX_SCAN_RATE = yes
# Encoder Map support
ENCODER_MAP_ENABLE = yes
# Enables VIA
VIA_ENABLE = yes

View File

@ -1,24 +0,0 @@
/* Copyright 2021 Andrew Charnley
*
* 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
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT
#define RGBLIGHT_DEFAULT_SAT 0
#define RGB_MATRIX_SLEEP
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR

View File

@ -1,88 +0,0 @@
/* Copyright 2021 Andrew Charnley
*
* 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
// Windows key changed to second FN key. Use KC_LGUI to revert.
enum userspace_layers {
QWERTY,
FNLAYER
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
[QWERTY] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, MO(FNLAYER), KC_LALT, KC_SPC, KC_RALT, MO(FNLAYER),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[FNLAYER] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PLAY_PAUSE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if(IS_LAYER_ON(FNLAYER)) {
if (clockwise) {
tap_code(KC_MEDIA_NEXT_TRACK);
} else {
tap_code(KC_MEDIA_PREV_TRACK);
}
} else {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
return false;
}
static uint8_t val;
void keyboard_post_init_user(void) {
val = rgb_matrix_get_val();
}
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color_all(val,0,0);
} else {
rgb_matrix_set_color_all(val, val, val);
val = rgb_matrix_get_val();
}
return false;
}

View File

@ -1,18 +0,0 @@
# Description
A keymap designed to be functional for development purposes - no flashing lights or gimmicks. PRTSC and DEL key in the top right corner.
Solid backlight that changes red if CAPS is on and reverts back afterwards. Brightness retained in both cases.
Backlight is disabled on suspend and restored upon wake-up.
The 'Windows' key is a second FN key. This makes it more natural to use the encoder wheel (good luck trying to do it with one hand).
Compile using `qmk compile -kb gmmk/pro/ansi -km andrewcharnley`
# Encoder
FN + Encoder scroll = media next/prev
FN + Encoder press = media pause
default encoder behavior = volume up/down
# Function Layer
FN + Up = increase brightness
FN + Down = decrease brightness
FN + Backslash = bootloader

View File

@ -1,50 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.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
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_BRID, KC_BRIU, RGB_VAD, RGB_VAI, RGB_RMOD, RGB_MOD, KC_F9, KC_MPRV, KC_MPLY, KC_MNXT, KC_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F10, KC_F12, _______, KC_MUTE,
_______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI
),
};
// clang-format on
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return false;
}
#endif

View File

@ -1,128 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.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
enum userspace_layers {
QWERTY,
FNLAYER,
POPTAB,
};
//custom keycodes
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)) // Make ALT layer for encoder use
#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)) // Make CTRL layer for encoder use
#define SWAP_L SGUI(KC_LEFT) // Swap application to left display
#define SWAP_R SGUI(KC_RGHT) // Swap application to right display
#define MINI LGUI(KC_DOWN) // Shrink window
#define MAXI LGUI(KC_UP) // Maximize window
#define CLOSEAPPLICATION LALT(KC_F4) // Kill application
#define CLOSETAB LCTL(KC_W) // Kill current tab
#define POPOUT LCTL(LSFT(KC_K))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
[QWERTY] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FNLAYER), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[FNLAYER] = LAYOUT(
CLOSEAPPLICATION, CLOSETAB,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PLAY_PAUSE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, SWAP_L , MAXI , SWAP_R , _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, _______, MINI , _______, POPOUT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_TRNS, _______, _______, _______
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (get_mods() & MODS_ALT_MASK) {
if (clockwise) {
tap_code(KC_TAB);
} else {
tap_code16(S(KC_TAB));
}
} else if (get_mods() & MODS_CTRL_MASK) {
if (clockwise) {
tap_code(KC_TAB);
} else {
tap_code16(S(KC_TAB));
}
} else if(IS_LAYER_ON(FNLAYER)) {
if (clockwise) {
tap_code(KC_MEDIA_NEXT_TRACK);
} else {
tap_code(KC_MEDIA_PREV_TRACK);
}
} else {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
return false;
}
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
switch(get_highest_layer(layer_state)) {
// special handling per layer
case 0: //layer one
if (host_keyboard_led_state().caps_lock)
rgb_matrix_set_color_all(255,0,0);
else
rgb_matrix_set_color_all(0,255,56);
break;
case 1:
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_INDICATOR_SET_COLOR(i,0,0,0);
}
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 255) //esc
RGB_MATRIX_INDICATOR_SET_COLOR(6, 0, 0, 255) //f1
RGB_MATRIX_INDICATOR_SET_COLOR(8, 0, 0, 255) //q
RGB_MATRIX_INDICATOR_SET_COLOR(14, 0, 0, 255) //w
RGB_MATRIX_INDICATOR_SET_COLOR(20, 0, 0, 255) //e
RGB_MATRIX_INDICATOR_SET_COLOR(15, 0, 0, 255) //s
RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 0, 255) //f
RGB_MATRIX_INDICATOR_SET_COLOR(49, 0, 0, 255) //R_Alt
break;
default:
break;
}
return false;
}

View File

@ -1,19 +0,0 @@
# Description
Pretty simple keymap with a few handy tools on a 2nd layer and rotary encoder.
# Encoder
Holding tab and scrolling encoder will allow scrolling through applications, as if using alt + tab
Holding ctrl and scrolling encoder will allow scrolling through chrome tabs
FN + Encoder scroll is media next/prev
FN + Encoder press is media pause
default encoder behavior is volume up/down
# Function Layer
FN + \ is used to put keyboard into bootloader mode
FN + ESC is the same as alt F4, for closing applications
FN + F1 is to close current browser tab
FN + Q moves current application one monitor to the left
FN + W maximizes current application
FN + E moves current application one monitor to the right
FN + S minimizes current application
FN + F is used in junction with the "Popout tab" extension to chrome (https://chrome.google.com/webstore/detail/popout-tab/pcfcieidiaaobigemjnkclebhnmgfbco) to pop out current tab to its own window

View File

@ -1,25 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2021 Cory Ginsberg (@coryginsberg)
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
// #define TAPPING_TOGGLE 2
// TT set to two taps
#define TAPPING_TERM 250
#define RGBLIGHT_DEFAULT_MODE SOLID_WHITE
#define DYNAMIC_KEYMAP_LAYER_COUNT 5

View File

@ -1,104 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2021 Cory Ginsberg (@coryginsberg)
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
void dance_media(tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_MPLY);
} else if (state->count == 2) {
tap_code(KC_MNXT);
} else if (state->count == 3) {
tap_code(KC_MPRV);
} else {
reset_tap_dance(state);
}
}
tap_dance_action_t tap_dance_actions[] = {
// Tap once for shift, twice for Caps Lock
[0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
[1] = ACTION_TAP_DANCE_FN(dance_media)};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Alt_L Win_L SPACE Ct_R Alt_R FN Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
[0] = LAYOUT(
KC_ESC, 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_PSCR, TO(1),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(4), TO(2), KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TD(1), TO(0),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(4), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[2] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TD(1), TO(0),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(4), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[3] = LAYOUT(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PPLS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, KC_PENT, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, KC_0, KC_DOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
[4] = LAYOUT(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TD(1), _______,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, XXXXXXX, XXXXXXX, QK_BOOT, RGB_MODE_FORWARD,
XXXXXXX, XXXXXXX, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MODE_REVERSE,
_______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, RGB_TOG,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK
)
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
}
else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}

View File

@ -1,15 +0,0 @@
# Description
Mac and Windows profiles with special touches for the Mac profile.
## Windows Profile
Should be nearly identical to the default profile for GMMK Pro. Only major difference is the button next to F12 is now PrintScreen and clicking the rotary dial switches profiles instead of muting.
## Mac Profile
Besides the usual swapping of the alt and windows/cmd placement also changes the following:
* Double press shift to activate caps lock
* Capslock is escape
* Button next to F12:
* 1 press: play/pause
* 2 presses: skip
* 3 presses: previous
* Clicking Rotary Dial switches profiles

View File

@ -1,5 +0,0 @@
VIA_ENABLE = yes
MOUSEKEY_ENABLE = no
TAP_DANCE_ENABLE = yes
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
UNICODE_ENABLE = yes

View File

@ -1,6 +0,0 @@
// Copyright 2021 Jasper Chan (@Gigahawk)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_SPD 0

View File

@ -1,76 +0,0 @@
// Copyright 2021 Jasper Chan (@Gigahawk)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
enum layers {
_BASE,
_GAME,
_TRAN,
};
#define _BASE_COLOR_RGB 156, 123, 85
#define _GAME_COLOR_RGB 147, 21, 21
#define _TRAN_COLOR_RGB 45, 89, 24
#define _CAPS_COLOR_RGB 146, 140, 16
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_GAME] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_TRAN] = LAYOUT(
KC_CAPS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_INS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_MPLY, _______, _______, _______, KC_MPRV, _______, KC_MNXT
),
};
// clang-format on
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}
bool rgb_matrix_indicators_user(void) {
if (IS_LAYER_ON(_TRAN)) {
rgb_matrix_set_color_all(_TRAN_COLOR_RGB);
} else if (IS_LAYER_ON(_GAME)) {
rgb_matrix_set_color_all(_GAME_COLOR_RGB);
} else if (IS_LAYER_ON(_BASE)) {
rgb_matrix_set_color_all(_BASE_COLOR_RGB);
}
if (host_keyboard_led_state().caps_lock) {
for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; ++i) {
if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) {
rgb_matrix_set_color(i, _CAPS_COLOR_RGB);
}
}
}
return false;
}

View File

@ -1,22 +0,0 @@
/* Copyright 2021 Andre Brait
*
* 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
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms)
#define RGB_MATRIX_SLEEP
#endif

View File

@ -1,309 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2021 Andre Brait <andrebrait@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
#ifdef RGB_MATRIX_ENABLE
#ifndef RGB_CONFIRMATION_BLINKING_TIME
#define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds
#endif
#endif // RGB_MATRIX_ENABLE
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Play/Pause)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
//
// This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO).
// Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience.
// Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts.
[0] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_INS, _______,
_______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR,
_______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______,
_______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI
),
};
// clang-format on
const key_override_t up_key_override = ko_make_basic(MOD_MASK_CTRL, KC_UP, KC_PGUP);
const key_override_t dn_key_override = ko_make_basic(MOD_MASK_CTRL, KC_DOWN, KC_PGDN);
// This globally defines all key overrides to be used
const key_override_t **key_overrides = (const key_override_t *[]){
&up_key_override,
&dn_key_override,
NULL // Null terminate the array of overrides!
};
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}
#endif // ENCODER_ENABLE
#ifdef RGB_MATRIX_ENABLE
/* Renaming those to make the purpose on this keymap clearer */
#define LED_FLAG_CAPS LED_FLAG_NONE
#define LED_FLAG_EFFECTS LED_FLAG_INDICATOR
static void set_rgb_caps_leds(void);
#if RGB_CONFIRMATION_BLINKING_TIME > 0
static uint16_t effect_started_time = 0;
static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0;
static void start_effects(void);
/* The higher this is, the slower the blinking will be */
#ifndef TIME_SELECTED_BIT
#define TIME_SELECTED_BIT 8
#endif
#if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16
#error "TIME_SELECTED_BIT must be a positive integer smaller than 16"
#endif
#define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0
#define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
if (!rgb_matrix_is_enabled()) {
/* Turn ON the RGB Matrix for CAPS LOCK */
rgb_matrix_set_flags(LED_FLAG_CAPS);
rgb_matrix_enable();
}
} else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) {
/* RGB Matrix was only ON because of CAPS LOCK. Turn it OFF. */
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_disable();
}
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
#ifdef NKRO_ENABLE
#if RGB_CONFIRMATION_BLINKING_TIME > 0
case NK_TOGG:
if (record->event.pressed) {
if (keymap_config.nkro) {
/* Turning NKRO OFF */
effect_red();
} else {
/* Turning NKRO ON */
effect_green();
}
start_effects();
}
break;
case NK_ON:
if (record->event.pressed) {
if (!keymap_config.nkro) {
/* Turning NKRO ON */
effect_green();
start_effects();
}
}
break;
case NK_OFF:
if (record->event.pressed) {
if (keymap_config.nkro) {
/* Turning NKRO OFF */
effect_red();
start_effects();
}
}
break;
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
#endif // NKRO_ENABLE
case RGB_MOD:
case RGB_RMOD:
case RGB_HUI:
case RGB_HUD:
case RGB_SAI:
case RGB_SAD:
case RGB_VAI:
case RGB_VAD:
case RGB_SPI:
case RGB_SPD:
if (record->event.pressed) {
if (rgb_matrix_get_flags() != LED_FLAG_ALL) {
/* Ignore changes to RGB settings while only it's supposed to be OFF */
return false;
}
}
break;
case RGB_TOG:
if (record->event.pressed) {
if (rgb_matrix_is_enabled()) {
switch (rgb_matrix_get_flags()) {
#if RGB_CONFIRMATION_BLINKING_TIME > 0
case LED_FLAG_EFFECTS:
#endif
case LED_FLAG_CAPS:
/* Turned ON because of EFFECTS or CAPS, is actually OFF */
/* Change to LED_FLAG_ALL to signal it's really ON */
rgb_matrix_set_flags(LED_FLAG_ALL);
/* Will be re-enabled by the processing of the toggle */
rgb_matrix_disable_noeeprom();
break;
case LED_FLAG_ALL:
/* Is actually ON */
#if RGB_CONFIRMATION_BLINKING_TIME > 0
if (effect_started_time > 0) {
/* Signal EFFECTS */
rgb_matrix_set_flags(LED_FLAG_EFFECTS);
/* Will be re-enabled by the processing of the toggle */
rgb_matrix_disable_noeeprom();
} else
#endif
if (host_keyboard_led_state().caps_lock) {
/* Signal CAPS */
rgb_matrix_set_flags(LED_FLAG_CAPS);
/* Will be re-enabled by the processing of the toggle */
rgb_matrix_disable_noeeprom();
}
break;
}
}
}
break;
}
return true;
}
bool rgb_matrix_indicators_user(void) {
#if RGB_CONFIRMATION_BLINKING_TIME > 0
if (effect_started_time > 0) {
/* Render blinking EFFECTS */
const uint16_t deltaTime = sync_timer_elapsed(effect_started_time);
if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) {
const uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01;
const uint8_t val_r = led_state * r_effect;
const uint8_t val_g = led_state * g_effect;
const uint8_t val_b = led_state * b_effect;
rgb_matrix_set_color_all(val_r, val_g, val_b);
if (host_keyboard_led_state().caps_lock) {
set_rgb_caps_leds();
}
return false;
} else {
/* EFFECTS duration is finished */
effect_started_time = 0;
if (rgb_matrix_get_flags() == LED_FLAG_EFFECTS) {
/* It was turned ON because of EFFECTS */
if (host_keyboard_led_state().caps_lock) {
/* CAPS is still ON. Demote to CAPS */
rgb_matrix_set_flags(LED_FLAG_CAPS);
} else {
/* There is nothing else keeping RGB enabled. Reset flags and turn if off. */
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_disable_noeeprom();
}
}
}
}
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
if (rgb_matrix_get_flags() == LED_FLAG_CAPS) {
rgb_matrix_set_color_all(0x0, 0x0, 0x0);
}
if (host_keyboard_led_state().caps_lock) {
set_rgb_caps_leds();
}
return false;
}
#if RGB_CONFIRMATION_BLINKING_TIME > 0
static void start_effects(void) {
effect_started_time = sync_timer_read();
if (!rgb_matrix_is_enabled()) {
/* Turn it ON, signal the cause (EFFECTS) */
rgb_matrix_set_flags(LED_FLAG_EFFECTS);
rgb_matrix_enable_noeeprom();
} else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) {
/* It's already ON, promote the cause from CAPS to EFFECTS */
rgb_matrix_set_flags(LED_FLAG_EFFECTS);
}
}
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
// RGB led number layout, function of the key
// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12
// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13
// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14
// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15
// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16
// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17
// 87, led 07 88, led 18
// 91, led 08 92, led 19
static void set_rgb_caps_leds(void) {
rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1
rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1
rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2
rgb_matrix_set_color(71, 0xFF, 0x0, 0x0); // Right side LED 2
rgb_matrix_set_color(73, 0xFF, 0x0, 0x0); // Left side LED 3
rgb_matrix_set_color(74, 0xFF, 0x0, 0x0); // Right side LED 3
rgb_matrix_set_color(76, 0xFF, 0x0, 0x0); // Left side LED 4
rgb_matrix_set_color(77, 0xFF, 0x0, 0x0); // Right side LED 4
rgb_matrix_set_color(80, 0xFF, 0x0, 0x0); // Left side LED 5
rgb_matrix_set_color(81, 0xFF, 0x0, 0x0); // Right side LED 5
rgb_matrix_set_color(83, 0xFF, 0x0, 0x0); // Left side LED 6
rgb_matrix_set_color(84, 0xFF, 0x0, 0x0); // Right side LED 6
rgb_matrix_set_color(87, 0xFF, 0x0, 0x0); // Left side LED 7
rgb_matrix_set_color(88, 0xFF, 0x0, 0x0); // Right side LED 7
rgb_matrix_set_color(91, 0xFF, 0x0, 0x0); // Left side LED 8
rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); // Right side LED 8
rgb_matrix_set_color(3, 0xFF, 0x0, 0x0); // CAPS LED
}
#endif // RGB_MATRIX_ENABLE

View File

@ -1,26 +0,0 @@
# hachetmans's GMMK Pro layout
This is pretty much the stock layout with a few things moved around.
It basically reflects my needs for both Delete and Insert being readily available for coding, as well as a full Home/PgUp/PgDwn/End column.
The differences are as follows:
- Disabled Mouse Keys (to fix issues with KVM switches and also because they're not used here anyway)
- Short DEBOUNCE time (5 ms)
- Per-key debounce algorithm (sym_defer_pk)
- RGB turns off after 20 minutes of inactivity
- RGB turns off when USB is suspended
- Layer 0:
- Print Screen (default) -> Delete
- Delete (default) -> Home
- Layer 1 (accessed by pressing Fn):
- Fn + Delete -> Insert
- Fn + Home -> Print Screen
- override CTRL + UP -> PGUP
- override CTRL + DOWN -> PGDN
This keymap also includes CAPS LOCK ON indicator.\
All left and right side LEDs, and the Caps key LED will turn solid red while CAPS LOCK is ON.
No other changes have been made. \
The other keys on each layer have been kept intact.

View File

@ -1,5 +0,0 @@
# Enable additional features.
DEBOUNCE_TYPE = sym_defer_pk
MOUSEKEY_ENABLE = no
KEY_OVERRIDE_ENABLE = yes

View File

@ -1,67 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
[0] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, QK_BOOT, KC_RGUI, _______, _______, _______, _______, _______
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
}
else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}

View File

@ -1,19 +0,0 @@
/* Copyright 2021 Lalit Maganti
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
#define RGB_MATRIX_SLEEP

View File

@ -1,92 +0,0 @@
/* Copyright 2021 Lalit Maganti
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
#ifdef PROGRAMMABLE_BUTTON_ENABLE
#define L1_NUM1 QK_PROGRAMMABLE_BUTTON_1
#define L1_NUM2 QK_PROGRAMMABLE_BUTTON_2
#define L1_NUM3 QK_PROGRAMMABLE_BUTTON_3
#define L1_NUM4 QK_PROGRAMMABLE_BUTTON_4
#define L1_NUM5 QK_PROGRAMMABLE_BUTTON_5
#define L1_NUM6 QK_PROGRAMMABLE_BUTTON_6
#define L1_NUM7 QK_PROGRAMMABLE_BUTTON_7
#define L1_NUM8 QK_PROGRAMMABLE_BUTTON_8
#define L1_NUM9 QK_PROGRAMMABLE_BUTTON_9
#else
#define L1_NUM1 _______
#define L1_NUM2 _______
#define L1_NUM3 _______
#define L1_NUM4 _______
#define L1_NUM5 _______
#define L1_NUM6 _______
#define L1_NUM7 _______
#define L1_NUM8 _______
#define L1_NUM9 _______
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, RGB_TOG, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code_delay(KC_VOLU, 10);
} else {
tap_code_delay(KC_VOLD, 10);
}
return false;
}
#ifdef RGB_MATRIX_ENABLE
static void set_rgb_side_leds(void);
static void set_rgb_side_leds(void) {
rgb_matrix_set_color(67, RGB_WHITE); // Left side LED 1
rgb_matrix_set_color(68, RGB_WHITE); // Right side LED 1
rgb_matrix_set_color(91, RGB_WHITE); // Left side LED 8
rgb_matrix_set_color(92, RGB_WHITE); // Right side LED 8
}
bool rgb_matrix_indicators_user(void) {
rgb_matrix_set_color_all(0x0, 0x0, 0x0);
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(3, RGB_WHITE); // CAPS
}
set_rgb_side_leds();
return false;
}
#endif

View File

@ -1 +0,0 @@
MOUSEKEY_ENABLE = no

View File

@ -1,80 +0,0 @@
/* Copyright 2021 zvuc <https://github.com/zvuc>
*
* 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
// At the time of this, there are 41 effects! That may be a bit too many to cycle through - keeping what I believe is the best.
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms)
// #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
// Below added per: https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#suspended-state-id-suspended-state
#define RGB_MATRIX_SLEEP
// Effects
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain
#define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes
// Disable effects you don't like.
// Soon, you'll have to explicitly enable effects you want: https://github.com/qmk/qmk_firmware/pull/13758
// #define DISABLE_RGB_MATRIX_SOLID_COLOR, // Static single hue, no speed support
// #define DISABLE_RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue
// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
// #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT, // Static gradient left to right, speed controls how much gradient changes
// #define DISABLE_RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
// #define DISABLE_RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right
// #define DISABLE_RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right
// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation
// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness
// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation
// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness
// #define DISABLE_RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard
// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard
// #define DISABLE_RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
// #define DISABLE_RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
// #define DISABLE_RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back
// #define DISABLE_RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left
// #define DISABLE_RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right
// Framebuffer effects
// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
// Reactive effects
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
// #define DISABLE_RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out
// #define DISABLE_RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out
// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out
#endif

View File

@ -1,431 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
GMMK Pro Standard keymap for macOS
by zvuc <https://github.com/zvuc>
with code snippets from
Andre Brait <andrebrait@gmail.com>, stickandgum
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
enum my_keycodes {
LED_TLDE = SAFE_RANGE,
LED_1,
LED_2,
LED_3,
LED_4,
LED_5,
LED_6,
LED_7,
LED_8,
LED_9,
LED_0,
LED_MINS,
LED_EQL
};
#ifdef RGB_MATRIX_ENABLE
#ifndef RGB_CONFIRMATION_BLINKING_TIME
#define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds
#endif
#endif // RGB_MATRIX_ENABLE
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Eject Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up F13
// Ct_L Opt_L Cmd_L SPACE Cmd_R Opt_R FN Left Down Right
// The FN key by default maps to a momentary toggle to layer 1 to provide access to the QK_BOOT key (to put the board into bootloader mode). Without
// this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB
// cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI
// if that's your preference.
//
// To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and
// it'll be back to normal when you plug it back in.
//
// This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO).
// Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience.
// Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts.
[0] = LAYOUT(
KC_ESC, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, KC_F7, KC_F8, KC_MRWD, KC_MPLY, KC_MFFD, KC_F12, KC_EJCT, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_F13,
KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, KC_ROPT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = 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, _______, RGB_TOG,
LED_TLDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, _______, KC_PSCR,
_______, RGB_HUI, RGB_VAI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, RGB_HUD, RGB_VAD, RGB_SAD, TG(2), _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG,
_______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI
),
// This is an alternative togglable layer to change default function row to standard F keys
[2] = 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_F24, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
// clang-format on
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// https://beta.docs.qmk.fm/using-qmk/simple-keycodes/feature_advanced_keycodes#alt-escape-for-alt-tab-id-alt-escape-for-alt-tab
if (get_mods() & MOD_MASK_CTRL) { // If CTRL is held
uint8_t mod_state = get_mods(); // Store all modifiers that are held
unregister_mods(MOD_MASK_CTRL); // Immediately unregister the CRTL key (don't send CTRL-PgDn) - del_mods doesn't work here (not immediate)
if (clockwise) {
rgblight_increase_hue();
} else {
rgblight_decrease_hue();
}
set_mods(mod_state); // Add back in the CTRL key - so ctrl-key will work if ctrl was never released after paging.
} else if (get_mods() & MOD_MASK_ALT) {
uint8_t mod_state = get_mods();
unregister_mods(MOD_MASK_ALT);
if (clockwise) {
rgblight_increase_sat();
} else {
rgblight_decrease_sat();
}
set_mods(mod_state);
} else if (get_mods() & MOD_MASK_GUI) {
uint8_t mod_state = get_mods();
unregister_mods(MOD_MASK_GUI);
if (clockwise) {
rgblight_increase_val();
} else {
rgblight_decrease_val();
}
set_mods(mod_state);
} else if (get_mods() & MOD_MASK_SHIFT) {
uint8_t mod_state = get_mods();
unregister_mods(MOD_MASK_SHIFT);
if (clockwise) {
rgblight_increase_speed();
} else {
rgblight_decrease_speed();
}
set_mods(mod_state);
} else if (clockwise) { // All else volume.
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}
#endif //ENCODER_ENABLE
#ifdef RGB_MATRIX_ENABLE
// Called on powerup and is the last _init that is run.
void keyboard_post_init_user(void) {
int mods[35] = {0,2,3,4,5,11,17,33,49,55,65,95,97,79,94,85,93,96,90,69,92,67,76,80,91,75,86,68,77,81,92,28,34,39,44};
int j;
/* output each array element's value */
for (j = 0; j < 35; j++ ) {
g_led_config.flags[mods[j]] = LED_FLAG_MODIFIER;
}
if (!rgb_matrix_is_enabled()) {
rgb_matrix_enable();
#ifdef CONSOLE_ENABLE
uprintf("ERROR! RGB Matrix Enabled and wrote to EEPROM! -How was the RGB Matrix Disabled?");
#endif
}
}
/* Renaming those to make the purpose on this keymap clearer */
#define LED_FLAG_CAPS LED_FLAG_NONE
#define LED_FLAG_EFFECTS LED_FLAG_INDICATOR
static void set_rgb_caps_leds(void);
#if RGB_CONFIRMATION_BLINKING_TIME > 0
static uint16_t effect_started_time = 0;
static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0;
static void start_effects(void);
/* The higher this is, the slower the blinking will be */
#ifndef TIME_SELECTED_BIT
#define TIME_SELECTED_BIT 8
#endif
#if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16
#error "TIME_SELECTED_BIT must be a positive integer smaller than 16"
#endif
#define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0
#define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
if (!rgb_matrix_is_enabled()) {
/* Turn ON the RGB Matrix for CAPS LOCK */
rgb_matrix_set_flags(LED_FLAG_CAPS);
rgb_matrix_enable();
}
} else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) {
/* RGB Matrix was only ON because of CAPS LOCK. Turn it OFF. */
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_disable();
}
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
#ifdef NKRO_ENABLE
#if RGB_CONFIRMATION_BLINKING_TIME > 0
case NK_TOGG:
if (record->event.pressed) {
if (keymap_config.nkro) {
/* Turning NKRO OFF */
effect_red();
} else {
/* Turning NKRO ON */
effect_green();
}
start_effects();
}
break;
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
#endif // NKRO_ENABLE
#if RGB_CONFIRMATION_BLINKING_TIME > 0
case TG(2):
if (record->event.pressed) {
if (IS_LAYER_OFF(2)) {
effect_red();
} else {
effect_green();
}
start_effects();
}
break;
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
/* LED quick preset keys assignments */
case LED_TLDE:
rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); // Can use RGB_M_P built-in keycode instead.
break;
case LED_1:
rgb_matrix_mode(RGB_MATRIX_ALPHAS_MODS);
break;
case LED_2:
rgb_matrix_mode(RGB_MATRIX_GRADIENT_UP_DOWN);
break;
case LED_3:
rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS);
break;
case LED_4:
rgb_matrix_mode(RGB_MATRIX_BAND_SAT);
break;
case LED_5:
rgb_matrix_mode(RGB_MATRIX_BAND_VAL);
break;
case LED_6:
rgb_matrix_mode(RGB_MATRIX_BAND_SPIRAL_VAL);
break;
case LED_7:
rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); // Can use RGB_M_R built-in keycode instead.
break;
case LED_8:
rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); // Can use RGB_M_SW built-in keycode instead.
break;
case LED_9:
rgb_matrix_mode(RGB_MATRIX_BREATHING); // Can use RGB_M_B built-in keycode instead.
break;
#ifdef RGB_MATRIX_KEYPRESSES // Reactive effects require RGB_MATRIX_KEYPRESSES in config.h
case LED_0:
rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE_WIDE);
break;
#endif //RGB_MATRIX_KEYPRESSES
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap and Rain require #define RGB_MATRIX_FRAMEBUFFER_EFFECTS in config.h
case LED_MINS:
rgb_matrix_mode(RGB_MATRIX_DIGITAL_RAIN);
break;
case LED_EQL:
rgb_matrix_mode(RGB_MATRIX_TYPING_HEATMAP);
break;
#endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS
// case RGB_MOD:
// case RGB_RMOD:
// case RGB_HUI:
// case RGB_HUD:
// case RGB_SAI:
// case RGB_SAD:
// case RGB_VAI:
// case RGB_VAD:
// case RGB_SPI:
case RGB_SPD:
if (record->event.pressed) {
if (rgb_matrix_get_flags() != LED_FLAG_ALL) {
/* Ignore changes to RGB settings while only it's supposed to be OFF */
return false;
}
}
break;
case RGB_TOG:
// if (record->event.pressed) {
// if (rgb_matrix_get_flags() == LED_FLAG_ALL) {
// rgb_matrix_set_flags(LED_FLAG_NONE);
// rgb_matrix_set_color_all(0, 0, 0);
// } else {
// rgb_matrix_set_flags(LED_FLAG_ALL);
// }
// }
// return false;
if (record->event.pressed) {
if (rgb_matrix_is_enabled()) {
switch (rgb_matrix_get_flags()) {
#if RGB_CONFIRMATION_BLINKING_TIME > 0
case LED_FLAG_EFFECTS:
#endif
case LED_FLAG_CAPS:
/* Turned ON because of EFFECTS or CAPS, is actually OFF */
/* Change to LED_FLAG_ALL to signal it's really ON */
rgb_matrix_set_flags(LED_FLAG_ALL);
/* Will be re-enabled by the processing of the toggle */
rgb_matrix_disable_noeeprom();
break;
case LED_FLAG_ALL:
/* Is actually ON */
#if RGB_CONFIRMATION_BLINKING_TIME > 0
if (effect_started_time > 0) {
/* Signal EFFECTS */
rgb_matrix_set_flags(LED_FLAG_EFFECTS);
/* Will be re-enabled by the processing of the toggle */
rgb_matrix_disable_noeeprom();
} else
#endif
if (host_keyboard_led_state().caps_lock) {
/* Signal CAPS */
rgb_matrix_set_flags(LED_FLAG_CAPS);
/* Will be re-enabled by the processing of the toggle */
rgb_matrix_disable_noeeprom();
}
break;
}
}
}
break;
}
return true;
}
bool rgb_matrix_indicators_user(void) {
#if RGB_CONFIRMATION_BLINKING_TIME > 0
if (effect_started_time > 0) {
/* Render blinking EFFECTS */
uint16_t deltaTime = sync_timer_elapsed(effect_started_time);
if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) {
uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01;
uint8_t val_r = led_state * r_effect;
uint8_t val_g = led_state * g_effect;
uint8_t val_b = led_state * b_effect;
rgb_matrix_set_color_all(val_r, val_g, val_b);
if (host_keyboard_led_state().caps_lock) {
set_rgb_caps_leds();
}
return false;
} else {
/* EFFECTS duration is finished */
effect_started_time = 0;
if (rgb_matrix_get_flags() == LED_FLAG_EFFECTS) {
/* It was turned ON because of EFFECTS */
if (host_keyboard_led_state().caps_lock) {
/* CAPS is still ON. Demote to CAPS */
rgb_matrix_set_flags(LED_FLAG_CAPS);
} else {
/* There is nothing else keeping RGB enabled. Reset flags and turn if off. */
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_disable_noeeprom();
}
}
}
}
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
if (rgb_matrix_get_flags() == LED_FLAG_CAPS) {
rgb_matrix_set_color_all(0x0, 0x0, 0x0);
}
if (host_keyboard_led_state().caps_lock) {
set_rgb_caps_leds();
}
return false;
}
#if RGB_CONFIRMATION_BLINKING_TIME > 0
static void start_effects(void) {
effect_started_time = sync_timer_read();
if (!rgb_matrix_is_enabled()) {
/* Turn it ON, signal the cause (EFFECTS) */
rgb_matrix_set_flags(LED_FLAG_EFFECTS);
rgb_matrix_enable_noeeprom();
} else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) {
/* It's already ON, promote the cause from CAPS to EFFECTS */
rgb_matrix_set_flags(LED_FLAG_EFFECTS);
}
}
#endif // RGB_CONFIRMATION_BLINKING_TIME > 0
static void set_rgb_caps_leds(void) {
rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1
rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1
rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2
rgb_matrix_set_color(71, 0xFF, 0x0, 0x0); // Right side LED 2
rgb_matrix_set_color(73, 0xFF, 0x0, 0x0); // Left side LED 3
rgb_matrix_set_color(74, 0xFF, 0x0, 0x0); // Right side LED 3
rgb_matrix_set_color(76, 0xFF, 0x0, 0x0); // Left side LED 4
rgb_matrix_set_color(77, 0xFF, 0x0, 0x0); // Right side LED 4
rgb_matrix_set_color(80, 0xFF, 0x0, 0x0); // Left side LED 5
rgb_matrix_set_color(81, 0xFF, 0x0, 0x0); // Right side LED 5
rgb_matrix_set_color(83, 0xFF, 0x0, 0x0); // Left side LED 6
rgb_matrix_set_color(84, 0xFF, 0x0, 0x0); // Right side LED 6
rgb_matrix_set_color(87, 0xFF, 0x0, 0x0); // Left side LED 7
rgb_matrix_set_color(88, 0xFF, 0x0, 0x0); // Right side LED 7
rgb_matrix_set_color(91, 0xFF, 0x0, 0x0); // Left side LED 8
rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); // Right side LED 8
rgb_matrix_set_color(3, 0xFF, 0x0, 0x0); // CAPS LED
}
#endif // RGB_MATRIX_ENABLE

View File

@ -1,85 +0,0 @@
# GMMK Pro Standard Layout for macOS by zvuc
As you may know, Glorious does not (yet) provide their Glorious Core software for macOS; so with stock firmware, there aren't any ways to customize layouts on the hardware level unless you turn to software-based override solutions such as [Karabiner Elements](https://karabiner-elements.pqrs.org/). This is my attempt to try to create the most macOS-like experience on the GMMK Pro, taking close notes from Apple's Magic Keyboard, also referencing code from other community keymaps.
## Keymap
Layer 0
<img width="1092" alt="Layer0" src="https://user-images.githubusercontent.com/2870726/132235505-64ac1c89-ecf9-49b5-a030-1d94389fc66d.png">
Layer 1 (Hold <kbd>Fn</kbd>)
<img width="1088" alt="Layer1" src="https://user-images.githubusercontent.com/2870726/133090831-5e84fb69-a8bf-463e-a8f6-f1f38a5901d6.png">
Layer 2 (Togglable alternative function row layout by pressing <kbd>Fn</kbd>+<kbd>F</kbd>)
<img width="1094" alt="Layer2" src="https://user-images.githubusercontent.com/2870726/133090841-0c6a8b16-bf46-4e6c-b8fa-79f213f95765.png">
## Notable differences from stock key layout for Windows:
- <kbd>Delete</kbd> key placed right next to backspace (under rotary encoder)
- <kbd>F13</kbd> key for the bottommost row (Assign it to a shortcut you like in macOS preferences! [For example: "Emoji & Symbols" to bring up the emoji input popup instantly](https://user-images.githubusercontent.com/2870726/132237211-7e13c156-96a8-4a91-b215-28d310228feb.png))
- <kbd>Eject</kbd> key for the last key in function row: Needed for macOS native global "Sleep" hotkey (<kbd></kbd><kbd></kbd><kbd>Eject</kbd>)
## Notable Features
- VIA support
- Rotary Encoder support (Defaults to stock behavior Volume Up/Down)
- Standard order for macOS modifier keys:
* Left: <kbd>⌃ Control</kbd><kbd>⌥ Option</kbd><kbd>⌘ Command</kbd>
* Right: <kbd>⌘ Command</kbd><kbd>⌥ Option</kbd><kbd>Fn</kbd>
- Apple Magic Keyboard-like Function Row Mode (Toggle with <kbd>Fn</kbd>+<kbd>F</kbd>)
* <kbd>F1</kbd>: Decrease display brightness
* <kbd>F2</kbd>: Increase display brightness
* <kbd>F3</kbd>: Mission Control
* <kbd>F4</kbd>: Launchpad
* <kbd>F5</kbd>: Decrease keyboard backlight brightness
* <kbd>F6</kbd>: Increase keyboard backlight brightness
* <kbd>F7</kbd>: (none)
* <kbd>F8</kbd>: (none)
* <kbd>F9</kbd>: Media Rewind
* <kbd>F10</kbd>: Media Play/Pause
* <kbd>F11</kbd>: Media Fast Forward
* <kbd>F12</kbd>: (none)
> #### NOTE
> - Media key mappings follow Apple Magic Keyboard except <kbd>F8</kbd> thru <kbd>F12</kbd>, where keys have been shifted by one to the right. It's because I wanted to get over the awkward gap between <kbd>F8</kbd> and <kbd>F9</kbd> that the GMMK Pro has—and also because we don't need dedicated keys for volume control when we have the more convenient rotary knob.
> - To access standard <kbd>F1</kbd> - <kbd>F12</kbd> keys, press the Function keys while holding <kbd>Fn</kbd>.
> - If you're planning to use Karabiner Elements, use the standard Function row mode (<kbd>F1</kbd> - <kbd>F12</kbd>) because Karabiner Elements always overrides function keys even if you want to just use simple or complex modifications, and it doesn't catch custom keys like Mission Control, Launchpad or <kbd>Eject</kbd>. (<kbd>Eject</kbd> is mapped as <kbd>F24</kbd> so you can replace it with 'Eject' within Karabiner.)
## RGB Lighting
- Retains Glorious stock firmware key mappings for control
* <kbd>Fn</kbd><kbd>Up</kbd> / <kbd>Fn</kbd><kbd>Down</kbd>: Cycle presets
* <kbd>Fn</kbd><kbd>Left</kbd> / <kbd>Fn</kbd><kbd>Right</kbd>: Adjust speed
* <kbd>Fn</kbd><kbd>W</kbd> / <kbd>Fn</kbd><kbd>S</kbd>: Adjust brightness
- Quickly switch to popular presets:
* <kbd>Fn</kbd><kbd>`</kbd> : Solid color (no animation)
* <kbd>Fn</kbd><kbd>1</kbd> : Solid duotone (no animation) - <kbd>Shift</kbd><kbd>Knob</kbd> to change secondary color.
* <kbd>Fn</kbd><kbd>2</kbd> : Vertical gradient - <kbd>Shift</kbd><kbd>Knob</kbd> to change secondary color.
* <kbd>Fn</kbd><kbd>3</kbd> : "Jellybean Raindrops"
* <kbd>Fn</kbd><kbd>4</kbd> : Horizontal wipe with white backlight
* <kbd>Fn</kbd><kbd>5</kbd> : Horizontal wipe
* <kbd>Fn</kbd><kbd>6</kbd> : Single color pinwheel
* <kbd>Fn</kbd><kbd>7</kbd> : Horizontal rainbow
* <kbd>Fn</kbd><kbd>8</kbd> : Rainbow pinwheel
* <kbd>Fn</kbd><kbd>9</kbd> : Breathing
* <kbd>Fn</kbd><kbd>0</kbd> : Reactive (light up on keypress)
* <kbd>Fn</kbd><kbd>-</kbd> : "Digital Rain"
* <kbd>Fn</kbd><kbd>=</kbd> : "Heatmap"
- RGB turns off after 20 minutes of inactivity
- RGB turns off when USB is suspended / enters sleep
- <kbd>Caps Lock</kbd> toggle indicator (<kbd>Caps Lock</kbd> key and side lights will turn red)
- Easy RGB control using Rotary Encoder
- <kbd>Control</kbd>+<kbd>Rotate Knob</kbd>: Adjust hue
- <kbd>Option</kbd>+<kbd>Rotate Knob</kbd>: Adjust saturation
- <kbd>Command</kbd>+<kbd>Rotate Knob</kbd>: Adjust brightness
> All latest QMK effects [(41 as of now)](https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#rgb-matrix-effects-id-rgb-matrix-effects) are enabled by default and will apply in order when cycling through using <kbd>Fn</kbd><kbd>Up</kbd> / <kbd>Fn</kbd><kbd>Down</kbd>. You can disable specific effects by uncommenting (remove the `//` at the beginning of line) respective lines (ex: `#define DISABLE_RGB_MATRIX_BREATHING`) in `qmk_firmware/keyboards/gmmk/pro/ansi/keymaps/zvuc/config.h` then recompiling the firmware.
## Other Features
- 1000hz polling rate
- Short DEBOUNCE time (5 ms)
- Per-key debounce algorithm (`sym_defer_pk`)
- NKRO toggle (<kbd>Fn</kbd>+<kbd>N</kbd>)
## Warning regarding VIA support
When observing this keyboard firmware in VIA, some custom-implemented keys such as Mission Control/Launchpad and RGB preset shortcuts appear as keycodes such as `0x5d62`. **These must not be modified!** There is no way to get their default functionality back unless you re-flash the firmware through QMK Toolbox.
## Download pre-compiled firmware binary file
[Download BIN file from here](https://github.com/zvuc/qmk_firmware/releases/tag/zvuc-1.0.1)

View File

@ -1,4 +0,0 @@
# Enable additional features.
DEBOUNCE_TYPE = sym_defer_pk
VIA_ENABLE = yes

View File

@ -1 +0,0 @@
secrets.h

View File

@ -1,19 +0,0 @@
QMK layout for gmmk/pro
=======================
## Secrets
The format is the same as [drashna's](../../../../users/drashna/readme_secrets.md) secrets implementation. Create a `secret.h` and define your secrets like this:
```c
static const char* secrets[] = {"secret1", "secret2", "secret3", "secret4", "secret5"};
```
## Rotary encoder knob
You can hookup your encoder functions by defining new encoder states in [encoder.h](./encoder.h), then in [encoder.c](./encoder.c) assign static variable `state` your new state depending on your desired condition and add callbacks to `encoder_mapping` array.
## RGB Matrix Ledmaps
RGB Matrix ledmaps is the future allowing you assign colors to individual keys on every keymap layer.
You can see some examples of my usage in the bottom of [keymap.c](./keymap.c).
Color defines are just HSV colors wrapped in curly braces, like `#define RED { HSV_RED }`.

View File

@ -1,30 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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/>.
*/
#define COMBO_TERM 100
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_SLEEP
#define RGB_MATRIX_TIMEOUT 90000
#define MACRO_TIMER 5
#define TAPPING_TOGGLE 3
#define WPM_SMOOTHING 0.1
// this is for macOS so keyboard can work after sleep
#define NO_USB_STARTUP_CHECK

View File

@ -1,112 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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 "encoder.h"
#include "mike1808.h"
#include "print.h"
#include "utils.h"
#include "process_record.h"
#include "rgb_matrix_ledmaps.h"
static uint8_t state = ENCODER_DEFAULT;
// clang-format off
const encoder_callback encoder_mapping[][2] = {
[ENCODER_VOLUME] = {&volume_up, &volume_down},
#ifdef RGB_MATRIX_ENABLE
[ENCODER_RGB_HUE] = {&rgb_matrix_increase_hue_noeeprom, &rgb_matrix_decrease_hue_noeeprom},
[ENCODER_RGB_SAT] = {&rgb_matrix_increase_sat_noeeprom, &rgb_matrix_decrease_sat_noeeprom},
[ENCODER_RGB_VAL] = {&rgb_matrix_increase_val_noeeprom, &rgb_matrix_decrease_val_noeeprom},
[ENCODER_RGB_EFFECT] = {&rgb_matrix_step_noeeprom, &rgb_matrix_step_reverse_noeeprom},
[ENCODER_RGB_EFFECT_SPEED] = {&rgb_matrix_increase_speed_noeeprom, &rgb_matrix_decrease_speed_noeeprom},
#endif // RGB_MATRIX_ENABLE
};
// clang-format on
void volume_up(void) { tap_code(KC_VOLU); }
void volume_down(void) { tap_code(KC_VOLD); }
bool encoder_update_user(uint8_t index, bool clockwise) {
dprintf("current encoder state is: %d\n", state);
if (clockwise) {
(*encoder_mapping[state][0])();
} else {
(*encoder_mapping[state][1])();
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}
void handle_rgb_key(bool pressed) {
dprintf("handle_rgb_key %d\f", pressed);
if (pressed) {
rgb_matrix_layers_disable();
} else {
rgb_matrix_layers_enable();
}
}
static KeyPressState *rgb_state;
void keyboard_post_init_encoder(void) {
rgb_state = NewKeyPressState(handle_rgb_key);
}
bool process_record_encoder(uint16_t keycode, keyrecord_t *record) {
#ifdef RGB_MATRIX_ENABLE
switch (keycode) {
case KC_RGB_ENC_HUE ... KC_RGB_ENC_EFFECT:
if (record->event.pressed) {
# ifdef RGB_MATRIX_LEDMAPS_ENABLED
// disable layers so we can adjust RGB effects
rgb_state->press(rgb_state);
# endif // RGB_MATRIX_LEDMAPS_ENABLED
switch (keycode) {
case KC_RGB_ENC_HUE:
state = ENCODER_RGB_HUE;
break;
case KC_RGB_ENC_SAT:
state = ENCODER_RGB_SAT;
break;
case KC_RGB_ENC_VAL:
state = ENCODER_RGB_VAL;
break;
case KC_RGB_ENC_EFFECT_SPEED:
state = ENCODER_RGB_EFFECT_SPEED;
break;
case KC_RGB_ENC_EFFECT:
state = ENCODER_RGB_EFFECT;
break;
}
} else {
# ifdef RGB_MATRIX_LEDMAPS_ENABLED
rgb_state->release(rgb_state);
# endif // RGB_MATRIX_LEDMAPS_ENABLED
state = ENCODER_DEFAULT;
store_rgb_state_to_eeprom();
}
return false;
}
#endif // RGB_MATRIX_ENABLE
return true;
}

View File

@ -1,35 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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/>.
*/
// To add a new functionality define a new state here and then assign
// the handler to the `encoder_callback`
#include "quantum.h"
enum encoder_state {
ENCODER_VOLUME = 0,
ENCODER_RGB_HUE,
ENCODER_RGB_SAT,
ENCODER_RGB_VAL,
ENCODER_RGB_EFFECT_SPEED,
ENCODER_RGB_EFFECT,
};
typedef void (*encoder_callback)(void);
#define ENCODER_DEFAULT ENCODER_VOLUME
void volume_up(void);
void volume_down(void);

View File

@ -1,50 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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 "mike1808.h"
#include "print.h"
static bool wpm_rgb_enabled = false;
static uint8_t rgb_mode;
bool rgb_matrix_indicators_keymap(void) {
if (wpm_rgb_enabled && rgb_matrix_is_enabled()) {
uint8_t wpm = get_current_wpm();
dprintf("WPM = %d\n", wpm);
HSV hsv = rgb_matrix_get_hsv();
hsv.h = wpm;
RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b);
}
return false;
}
bool process_record_fun(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed && keycode == KC_WPM_RGB) {
if (wpm_rgb_enabled) {
wpm_rgb_enabled = false;
rgb_matrix_mode(rgb_mode);
} else {
wpm_rgb_enabled = true;
rgb_mode = rgb_matrix_get_mode();
rgb_matrix_enable();
rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR);
}
return false;
}
return true;
}

View File

@ -1,127 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>, Mikael Manukyan <arm.localhost@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 "mike1808.h"
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
combo_t key_combos[] = {
[JK_ESC] = COMBO(jk_combo, KC_ESC),
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
[LINUX] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TT_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[WINDOWS] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[MACOS] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, _______
),
[FUNCTIONS] = LAYOUT(
_______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_PSCR, _______,
_______, KC_LINX, KC_MAC, KC_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, _______,
KC_CAPS, _______, _______, _______, _______, OS_GIT, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_RGBH, KC_RGBS, KC_RGBV, KC_RGBE, KC_RGBP, KC_WRGB, _______, _______, _______, _______, _______, KC_PGUP, _______,
_______, _______, _______, RGB_TOG, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[GIT] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, G_DIFF, _______, _______, _______, _______, _______, _______, G_PULL, G_PUSH, _______, _______, _______,
_______, G_ADD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, G_CHECK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
#ifdef RGB_MATRIX_LEDMAPS_ENABLED
#define ______ {0, 0, 0}
const ledmap PROGMEM ledmaps[] = {
// LU = Left Underglow, RU = Right Underglow
// LU_1 ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) RU_1
// LU_2 ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del RU_2
// LU_3 Tab Q W E R T Y U I O P [ ] \ PgUp RU_3
// LU_4 Caps A S D F G H J K L ; " Enter PgDn RU_4
// LU_5 Sh_L Z X C V B N M , . ? Sh_R Up End RU_5
// LU_6 Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right RU_6
[LINUX] = RGB_MATRIX_LAYOUT_LEDMAP(
PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
PURPLE, ______, RED, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE
),
[WINDOWS] = RGB_MATRIX_LAYOUT_LEDMAP(
GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
GREEN, ______, RED, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE
),
[MACOS] = RGB_MATRIX_LAYOUT_LEDMAP(
YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
YELLOW, ______, ______, RED, ______, ______, ______, ______, ______, ______, ______, PURPLE
),
[FUNCTIONS] = RGB_MATRIX_LAYOUT_LEDMAP(
CYAN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, ______, ______, ______, ______, GREEN, GREEN, GREEN, GREEN, ______, PURPLE,
CYAN, ______, GOLD, GOLD, GOLD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, GOLD, PURPLE,
CYAN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, TEAL, ______, PURPLE,
CYAN, TURQ, ______, ______, ______, ______, TURQ, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE,
CYAN, ______, RED, RED, RED, RED, RED, RED, ______, ______, ______, ______, ______, RED, ______, PURPLE,
CYAN, ______, ______, BLUE, ______, ______, ______, ______, ______, ______, ______, PURPLE
),
};
#endif // RGB_MATRIX_LEDMAPS_ENABLED
// clang-format on

View File

@ -1,69 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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 "mike1808.h"
#if (__has_include("secrets.h") && !defined(NO_SECRETS))
# include "secrets.h"
#else
// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware
// And I'm not familiar enough to know which is better or why...
static const char *const secrets[] = {"test1", "test2", "test3", "test4", "test5"};
#endif
// userspace_config_t userspace_config;
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo
if (!record->event.pressed) {
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
send_string_with_delay(secrets[keycode - KC_SECRET_1], MACRO_TIMER);
}
return false;
break;
}
return true;
}
void suspend_power_down_user(void) {
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_suspend_state(true);
#endif // RGB_MATRIX_ENABLE
}
void suspend_wakeup_init_user(void) {
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_suspend_state(false);
#endif // RGB_MATRIX_ENABLE
}
#ifdef RGB_MATRIX_ENABLE
bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) {
// Turn on sideglow when CAPS LOCK is activated
if (host_keyboard_led_state().caps_lock) {
HSV hsv = {CAPS_LOCK_COLOR};
hsv.v = rgb_matrix_get_val();
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) {
RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
}
}
}
return false;
}
#endif // RGB_MATRIX_ENABLE

View File

@ -1,111 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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
#include QMK_KEYBOARD_H
#include "rgb_matrix_ledmaps.h"
enum layout_names {
LINUX = 0, // Base Layout: The main keyboard layout that has all the characters
WINDOWS, // Base ayout for Windows
MACOS, // Base Layout for MacOS
FUNCTIONS, // Function Layout: The function key activated layout with default functions and
// some added ones
GIT, // GIT Layout: GIT shortcuts and macros
SECRETS, // Layer with secrets
};
enum custom_keycodes {
KC_CCCV = SAFE_RANGE, // Hold to copy, tap to paste
KC_LINUX,
KC_MAC,
KC_WIN,
KC_SECRET_1,
KC_SECRET_2,
KC_SECRET_3,
KC_SECRET_4,
KC_SECRET_5,
KC_RGB_ENC_HUE,
KC_RGB_ENC_SAT,
KC_RGB_ENC_VAL,
KC_RGB_ENC_EFFECT_SPEED,
KC_RGB_ENC_EFFECT,
KC_WPM_RGB,
};
enum git_macros {
// The start of this enum should always be equal to end of ctrl_keycodes + 1
G_INIT = KC_WPM_RGB + 1, // git init
G_CLONE, // git clone
G_CONF, // git config --global
G_ADD, // git add
G_DIFF, // git diff
G_QK_BOOT, // git reset
G_REBAS, // git rebase
G_BRANH, // git branch
G_CHECK, // git checkout
G_MERGE, // git merge
G_REMTE, // git remote add
G_FETCH, // git fetch
G_PULL, // git pull
G_PUSH, // git push
G_COMM, // git commit
G_STAT, // git status
G_LOG, // git log
NEW_SAFE_RANGE,
};
enum combos {
JK_ESC, // jk to ESC for Vim
};
#define KC_SEC1 KC_SECRET_1
#define KC_SEC2 KC_SECRET_2
#define KC_SEC3 KC_SECRET_3
#define KC_SEC4 KC_SECRET_4
#define KC_SEC5 KC_SECRET_5
#define KC_RGBH KC_RGB_ENC_HUE
#define KC_RGBS KC_RGB_ENC_SAT
#define KC_RGBV KC_RGB_ENC_VAL
#define KC_RGBE KC_RGB_ENC_EFFECT
#define KC_RGBP KC_RGB_ENC_EFFECT_SPEED
#define KC_WRGB KC_WPM_RGB
#define KC_LINX KC_LINUX
#define KC_RESET QK_BOOT
#define KC_RST KC_RESET
#define OS_GIT OSL(GIT)
#define TT_FN TT(FUNCTIONS)
#define OS_LGUI OSM(MOD_LGUI)
#define OS_RGUI OSM(MOD_RGUI)
#define OS_LSFT OSM(MOD_LSFT)
#define OS_RSFT OSM(MOD_RSFT)
#define OS_LCTL OSM(MOD_LCTL)
#define OS_RCTL OSM(MOD_RCTL)
#define OS_LALT OSM(MOD_LALT)
#define OS_RALT OSM(MOD_RALT)
#define OS_MEH OSM(MOD_MEH)
#define OS_HYPR OSM(MOD_HYPR)
#define CAPS_LOCK_COLOR HSV_RED

View File

@ -1,119 +0,0 @@
/* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>,
Mikael Manukyan <arm.localhost@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 "mike1808.h"
#include "print.h"
#include "process_record.h"
uint16_t copy_paste_timer;
__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__((weak)) bool process_record_encoder(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__((weak)) bool process_record_fun(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__((weak)) void keyboard_post_init_encoder(void) { return; }
static const char *git_commands[] = {
"git init ", "git clone ", "git config --global ", "git add ",
"git diff ", "git reset ", "git rebase ", "git branch -b \"",
"git checkout ", "git merge ", "git remote add ", "git fetch ",
"git pull ", "git push ", "git commit ", "git status ",
"git log ",
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef KEYLOGGER_ENABLE
uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n",
keycode, record->event.key.col, record->event.key.row, record->event.pressed,
record->event.time, record->tap.interrupted, record->tap.count);
#endif // KEYLOGGER_ENABLE
switch (keycode) {
case KC_LINUX ... KC_WIN:
if (record->event.pressed) {
dprintf("set_single_persistent_default_layer %d\n", keycode - KC_LINUX + LINUX);
set_single_persistent_default_layer(keycode - KC_LINUX + LINUX);
return false;
}
break;
case KC_CCCV: // One key copy/paste
if (record->event.pressed) {
copy_paste_timer = timer_read();
} else {
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
if (layer_state_is(MACOS)) {
tap_code16(LGUI(KC_C));
} else {
tap_code16(LCTL(KC_C));
}
} else { // Tap, paste
if (layer_state_is(MACOS)) {
tap_code16(LGUI(KC_V));
} else {
tap_code16(LCTL(KC_V));
}
}
}
break;
case G_INIT ... G_LOG:
if (record->event.pressed) {
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
send_string_with_delay(git_commands[keycode - G_INIT], MACRO_TIMER);
return false;
}
break;
#ifdef RGB_MATRIX_ENABLE
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
rgb_matrix_set_color_all(0, 0, 0);
} break;
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
} break;
case LED_FLAG_UNDERGLOW: {
// This line is for LED idle timer. It disables the toggle so you can turn
// off LED completely if you like
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable();
} break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable();
} break;
}
}
return false;
#endif // RGB_MATRIX_ENABLE
}
return process_record_encoder(keycode, record) && process_record_secrets(keycode, record) &&
process_record_fun(keycode, record);
}
void keyboard_post_init_user(void) { keyboard_post_init_encoder(); }

View File

@ -1,26 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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
#include "mike1808.h"
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
bool process_record_encoder(uint16_t keycode, keyrecord_t *record);
bool process_record_fun(uint16_t keycode, keyrecord_t *record);
void keyboard_post_init_encoder(void);

View File

@ -1,71 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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 "rgb_matrix_ledmaps.h"
__attribute__((weak)) bool rgb_matrix_indicators_keymap(void) { return true; }
__attribute__((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) {
return true;
}
#ifdef RGB_MATRIX_LEDMAPS_ENABLED
static bool enabled = true;
#endif // RGB_MATRIX_LEDMAPS_ENABLED
bool rgb_matrix_indicators_user(void) { return rgb_matrix_indicators_keymap(); }
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
#ifdef RGB_MATRIX_LEDMAPS_ENABLED
if (rgb_matrix_is_enabled() && enabled) {
set_layer_rgb(led_min, led_max, get_highest_layer(layer_state | default_layer_state));
}
#endif // RGB_MATRIX_LEDMAPS_ENABLED
return rgb_matrix_indicators_advanced_keymap(led_min, led_max);
}
#ifdef RGB_MATRIX_LEDMAPS_ENABLED
void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) {
const ledmap *l = &(ledmaps[layer]);
uint8_t val = rgb_matrix_get_val();
for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
HSV hsv = {
.h = (*l)[i][0],
.s = (*l)[i][1],
.v = val,
};
if (hsv.h || hsv.s) {
RGB rgb = hsv_to_rgb(hsv);
RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
}
}
}
void rgb_matrix_layers_enable(void) {
dprintf("ledmaps are enabled\n");
enabled = true;
}
void rgb_matrix_layers_disable(void) {
dprintf("ledmaps are disabled\n");
enabled = false;
}
#endif // RGB_MATRIX_LEDMAPS_ENABLED

View File

@ -1,100 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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
#include "quantum.h"
#ifdef RGB_MATRIX_LEDMAPS_ENABLED
// no association keycode
# define XXX \
{ 0, 0, 0 }
// clang-format off
# define RGB_MATRIX_LAYOUT_LEDMAP( \
ul1, k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, ur1, \
ul2, k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, ur2, \
ul3, k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, ka2, k15, ur3, \
ul4, k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, ka4, k25, ur4, \
ul5, k00, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, ur5, \
ul6, k06, k90, k93, k94, k95, k92, k04, k03, k73, k05, ur6 \
) \
{ \
k13, k16, k11, k21, k00, k06, k26, k17, \
k10, k12, k14, k90, k36, k27, k20, k22, \
k24, k93, k31, k37, k30, k32, k34, k33, \
k47, k40, k42, k44, k07, k46, k41, k43, \
k45, k94, k63, k56, k51, k53, k55, k71, \
k57, k50, k52, k54, k76, k67, k60, k62, \
k64, k95, ka6, k77, k70, k72, k74, k92, \
ka7, k87, k80, k82, k85, ka3, k86, k81, \
k83, k04, ka5, ul1, ur1, k97, ul2, ur2, \
k65, ul2, ur2, k15, ul3, ur3, k66, k05, \
ul3, ur3, k75, ul4, ur4, ka1, k25, ul5, \
ur5, k61, k91, ul6, ur6, ka2, k35, k03, \
ka4, k73 \
}
// clang-format on
typedef uint8_t ledmap[RGB_MATRIX_LED_COUNT][3];
extern const ledmap ledmaps[];
void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer);
void rgb_matrix_layers_enable(void);
void rgb_matrix_layers_disable(void);
// Just a handy defines to make our ledmaps look better
# define RED \
{ HSV_RED }
# define CORAL \
{ HSV_CORAL }
# define ORANGE \
{ HSV_ORANGE }
# define GOLDEN \
{ HSV_GOLDENROD }
# define GOLD \
{ HSV_GOLD }
# define YELLOW \
{ HSV_YELLOW }
# define CHART \
{ HSV_CHARTREUSE }
# define GREEN \
{ HSV_GREEN }
# define SPRING \
{ HSV_SPRINGGREEN }
# define TURQ \
{ HSV_TURQUOISE }
# define TEAL \
{ HSV_TEAL }
# define CYAN \
{ HSV_CYAN }
# define AZURE \
{ HSV_AZURE }
# define BLUE \
{ HSV_BLUE }
# define PURPLE \
{ HSV_PURPLE }
# define MAGENT \
{ HSV_MAGENTA }
# define PINK \
{ HSV_PINK }
# define BLACK \
{ HSV_BLACK }
#endif // RGB_MATRIX_LEDMAPS_ENABLED
bool rgb_matrix_indicators_keymap(void);
bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max);

View File

@ -1,25 +0,0 @@
VIA_ENABLE = no
COMBO_ENABLE = yes
COMMAND_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RAW_ENABLE = no
CONSOLE_ENABLE = yes
WPM_ENABLE = no
RGB_MATRIX_LEDMAPS = yes
SRC += utils.c
SRC += mike1808.c
SRC += process_record.c
SRC += encoder.c
ifeq ($(strip $(WPM_ENABLE)), yes)
SRC += fun.c
endif
ifeq ($(strip $(RGB_MATRIX_LEDMAPS)), yes)
SRC += rgb_matrix_ledmaps.c
OPT_DEFS += -DRGB_MATRIX_LEDMAPS_ENABLED
endif

View File

@ -1,64 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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 "utils.h"
void store_rgb_state_to_eeprom(void) {
uint8_t mode = rgb_matrix_get_mode();
uint8_t speed = rgb_matrix_get_speed();
HSV color = rgb_matrix_get_hsv();
rgb_matrix_mode(mode);
rgb_matrix_set_speed(speed);
rgb_matrix_sethsv(color.h, color.s, color.v);
}
void press(KeyPressState *self) {
self->_count++;
dprintf("KPS: press: %d\n", self->_count);
// pressed the first time
if (self->_count == 1) {
self->hander(true);
}
}
void release(KeyPressState *self) {
self->_count--;
dprintf("KPS: release: %d\n", self->_count);
// all keys are relased
if (self->_count == 0) {
self->hander(false);
}
}
void reset(KeyPressState *self) {
self->_count = 0;
}
KeyPressState *NewKeyPressState(key_press_handler handler) {
KeyPressState *kps = (KeyPressState *)(malloc(sizeof(KeyPressState)));
kps->_count = 0;
kps->press = press;
kps->release = release;
kps->reset = reset;
kps->hander = handler;
return kps;
}

View File

@ -1,32 +0,0 @@
/* Copyright 2021 Mikael Manukyan <arm.localhost@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
#include "quantum.h"
void store_rgb_state_to_eeprom(void);
typedef void (*key_press_handler)(bool);
typedef struct KeyPressState KeyPressState;
struct KeyPressState {
int _count;
void (*press)(KeyPressState *self);
void (*release)(KeyPressState *self);
void (*reset)(KeyPressState *self);
key_press_handler hander;
};
KeyPressState *NewKeyPressState(key_press_handler);

View File

@ -1,24 +0,0 @@
/* Copyright 2021 Tomas Guinan
*
* 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
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
# define RGB_MATRIX_SLEEP
#endif
#define FORCE_NKRO

View File

@ -1,475 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2021 Tomas Guinan
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
#include "rgb_matrix_map.h"
#include "paddlegame.h"
#include <math.h>
enum custom_layers {
_BASE,
_FN1,
_MO2,
_MO3,
};
enum custom_keycodes {
KC_00 = SAFE_RANGE,
KC_WINLK, //Toggles Win key on and off
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_00:
if (record->event.pressed) {
// when keycode KC_00 is pressed
SEND_STRING("00");
} else {
// when keycode KC_00 is released
}
break;
case KC_WINLK:
if (record->event.pressed) {
if(!keymap_config.no_gui) {
keymap_config.no_gui = true;
} else {
keymap_config.no_gui = false;
}
} else unregister_code16(keycode);
break;
}
return true;
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
[_BASE] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_FN1] = LAYOUT(
KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SCRL, KC_PAUS, _______, KC_INS, _______,
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, QK_BOOT, RGB_M_B,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW,
_______, KC_WINLK, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
),
[_MO2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, TG(_MO2), _______, _______, _______, _______
),
[_MO3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
#ifdef ENCODER_ENABLE // Encoder Functionality
bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)) {
case _FN1:
if ( clockwise ) {
tap_code16(KC_PGDN);
} else {
tap_code16(KC_PGUP);
}
break;
case _MO2:
// Game: Paddle movement
if (damage_count == 0) {
if ( clockwise ) {
if (paddle_pos_full < 15) ++paddle_pos_full;
} else {
if (paddle_pos_full > 0) --paddle_pos_full;
}
}
break;
case _BASE:
default:
if ( clockwise ) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
break;
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}
#endif
#ifdef RGB_MATRIX_ENABLE
void init_ball(uint8_t i) {
i &= 1;
ball[i].on = true;
ball[i].up = false;
ball[i].y = 0;
ball[i].x = rand() % 16;
// Set initial ball state
if (ball[i].x < 8) {
ball[i].left = false;
} else {
ball[i].x -= 4;
ball[i].left = true;
}
// 1/4 chance of being an enemy ball after level 6
if (level_number > 3) {
ball[i].enemy = ((rand() % 4) == 0);
} else {
ball[i].enemy = false;
}
}
void hurt_paddle(void) {
if (paddle_lives > 0) {
--paddle_lives;
}
damage_timer = timer_read();
damage_count = 10;
// Reset board
init_ball(0);
ball[1].on = false;
}
// Capslock, Scroll lock and Numlock indicator on Left side lights.
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
switch(get_highest_layer(layer_state)) {
case _FN1:
// Light up FN layer keys
if (!fn_active) {
fn_active = true;
rgb_value.r = 0xff;
rgb_value.g = 0x00;
rgb_value.b = 0x00;
}
if (rgb_value.r == 0xff && rgb_value.g < 0xff) {
if (rgb_value.b > 0) { --rgb_value.b; }
else { ++rgb_value.g; }
} else if (rgb_value.g == 0xff && rgb_value.b < 0xff) {
if (rgb_value.r > 0) { --rgb_value.r; }
else { ++rgb_value.b; }
} else if (rgb_value.b == 0xff && rgb_value.r < 0xff) {
if (rgb_value.g > 0) { --rgb_value.g; }
else { ++rgb_value.r; }
}
for (uint8_t i=0; i<ARRAY_SIZE(LED_RGB); i++) {
rgb_matrix_set_color(LED_RGB[i], rgb_value.r, rgb_value.g, rgb_value.b);
}
for (uint8_t i=0; i<ARRAY_SIZE(LED_WHITE); i++) {
rgb_matrix_set_color(LED_WHITE[i], RGB_WHITE);
}
for (uint8_t i=0; i<ARRAY_SIZE(LED_GREEN); i++) {
rgb_matrix_set_color(LED_GREEN[i], RGB_GREEN);
}
rgb_matrix_set_color(LED_ESC, RGB_RED);
rgb_matrix_set_color(LED_LWIN, RGB_BLUE);
break;
case _MO2:
// Paddle game
if (!game_start) {
srand((unsigned int)timer_read());
// Store user light settings
last_hsv = rgb_matrix_get_hsv();
rgb_matrix_sethsv_noeeprom(0, 0, 0);
rgb_value.r = 0xff;
rgb_value.g = 0x00;
rgb_value.b = 0x00;
paddle_pos_full = 8;
paddle_lives = 4;
bounce_count = 0;
level_number = 0;
damage_count = 0;
init_ball(0);
ball[1].on = false;
ball_timer = timer_read();
game_start = true;
}
// Set level indicator
if (level_number < 12) {
rgb_matrix_set_color(GAME_R0[level_number], RGB_BLUE);
}
// Set life bar
for (uint8_t i=0; i < paddle_lives ; i++) {
rgb_matrix_set_color(GAME_LIVES[i], RGB_GREEN);
}
uint8_t paddle_pos = paddle_pos_full >> 1;
if (damage_count > 0) {
// Flash paddle when receiving damage
if (timer_elapsed(damage_timer) > 500) {
--damage_count;
damage_timer = timer_read();
}
if ((damage_count & 1) == 0) {
for (uint8_t i=0; i < 3 ; i++) {
rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_RED);
}
}
if (damage_count == 0) {
ball_timer = timer_read();
}
} else if (paddle_lives == 0) {
// Game over
for (uint8_t i=0; i<ARRAY_SIZE(LED_GAME_OVER); i++) {
rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED);
}
} else if (level_number >= 12) {
// You win
if (rgb_value.r == 0xff && rgb_value.g < 0xff) {
if (rgb_value.b > 0) { --rgb_value.b; }
else { ++rgb_value.g; }
} else if (rgb_value.g == 0xff && rgb_value.b < 0xff) {
if (rgb_value.r > 0) { --rgb_value.r; }
else { ++rgb_value.b; }
} else if (rgb_value.b == 0xff && rgb_value.r < 0xff) {
if (rgb_value.g > 0) { --rgb_value.g; }
else { ++rgb_value.r; }
}
for (uint8_t i=0; i < 3 ; i++) {
rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], rgb_value.r, rgb_value.g, rgb_value.b);
}
rgb_matrix_set_color(GAME_SMILE1[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b);
rgb_matrix_set_color(GAME_SMILE1[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b);
rgb_matrix_set_color(GAME_SMILE2[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b);
rgb_matrix_set_color(GAME_SMILE2[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b);
} else {
// normal game loop
// Set paddle position
for (uint8_t i=0; i < 3 ; i++) {
rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_GREEN);
}
// Ball movement logic happens at intervals
if (timer_elapsed(ball_timer) > GAME_TIMER[level_number]) {
for (int i=0; i<2; ++i) {
if (ball[i].on) {
// Ball movement
if (ball[i].up) {
if (ball[i].y > 0) {
--ball[i].y;
if (!ball[i].left) ++ball[i].x;
} else {
// Count reflections. If > 10, increase level
++bounce_count;
if (bounce_count >= 10) {
bounce_count = 0;
++level_number;
}
ball[i].on = false;
}
} else {
++ball[i].y;
if (ball[i].left) --ball[i].x;
if (ball[i].y > 4) {
// Remove a life if ball isn't returned and isn't enemy
if (!ball[i].enemy) {
hurt_paddle();
i = 2;
} else {
ball[i].on = false;
}
}
}
}
}
if (ball[0].y == 4 && !ball[1].on) {
init_ball(1);
}
if (ball[1].y == 4 && !ball[0].on) {
init_ball(0);
}
if (!ball[0].on && !ball[1].on) {
init_ball(0);
}
ball_timer = timer_read();
}
// Other ball stuff
for (int i=0; i<2; ++i) {
if (ball[i].on) {
// Ball deflection logic
if (!ball[i].up && ball[i].y == 4 && (ball[i].x == paddle_pos || ball[i].x == paddle_pos - 1 || ball[i].x == paddle_pos + 1)) {
if (!ball[i].enemy) {
--ball[i].y;
if (!ball[i].left) { ++ball[i].x; }
ball[i].up = true;
} else {
hurt_paddle();
i = 2;
}
}
// Ball display
switch (ball[i].y) {
case 0:
if (ball[i].enemy) {
rgb_matrix_set_color(GAME_R0[ball[i].x], RGB_RED);
} else {
rgb_matrix_set_color(GAME_R0[ball[i].x], RGB_WHITE);
}
break;
case 1:
if (ball[i].enemy) {
rgb_matrix_set_color(GAME_R1[ball[i].x], RGB_RED);
} else {
rgb_matrix_set_color(GAME_R1[ball[i].x], RGB_WHITE);
}
break;
case 2:
if (ball[i].enemy) {
rgb_matrix_set_color(GAME_R2[ball[i].x], RGB_RED);
} else {
rgb_matrix_set_color(GAME_R2[ball[i].x], RGB_WHITE);
}
break;
case 3:
if (ball[i].enemy) {
rgb_matrix_set_color(GAME_R3[ball[i].x], RGB_RED);
} else {
rgb_matrix_set_color(GAME_R3[ball[i].x], RGB_WHITE);
}
break;
case 4:
if (ball[i].enemy) {
rgb_matrix_set_color(GAME_R4[ball[i].x], RGB_RED);
} else {
rgb_matrix_set_color(GAME_R4[ball[i].x], RGB_WHITE);
}
break;
}
}
}
}
break;
default:
fn_active = false;
if (game_start) {
// Reset lighting settings
game_start = false;
rgb_matrix_sethsv_noeeprom(last_hsv.h, last_hsv.s, last_hsv.v);
}
break;
}
led_t led_state = host_keyboard_led_state();
if (led_state.caps_lock) {
if (!caps_active) {
caps_active = true;
caps_flash_on = true;
caps_flasher = timer_read();
}
if (timer_elapsed(caps_flasher) > 500) {
caps_flasher = timer_read();
caps_flash_on = !caps_flash_on;
}
rgb_matrix_set_color(LED_CAPS, RGB_WHITE);
if (caps_flash_on) {
for (uint8_t i=0; i<ARRAY_SIZE(LED_SIDE_LEFT); i++) {
rgb_matrix_set_color(LED_SIDE_LEFT[i], RGB_RED);
rgb_matrix_set_color(LED_SIDE_RIGHT[i], RGB_RED);
}
} else {
for (uint8_t i=0; i<ARRAY_SIZE(LED_SIDE_LEFT); i++) {
rgb_matrix_set_color(LED_SIDE_LEFT[i], 0, 0, 0);
rgb_matrix_set_color(LED_SIDE_RIGHT[i], 0, 0, 0);
}
}
} else {
caps_active = false;
}
if (led_state.scroll_lock) {
rgb_matrix_set_color(LED_F10, RGB_WHITE);
}
if (keymap_config.no_gui) {
rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled
}
return false;
}
#endif
void keyboard_post_init_user(void) {
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED); // Default startup colour
#endif
}

View File

@ -1,46 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
Copyright 2021 Tomas Guinan
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/>.
*/
const uint16_t GAME_TIMER[] = {
400, 350, 300, 250, 400, 350, 300, 250, 225, 200, 175, 150
};
bool game_start = false;
HSV last_hsv;
static uint8_t paddle_pos_full;
static uint8_t paddle_lives;
static uint8_t level_number;
static uint8_t bounce_count;
static uint8_t damage_count;
static uint16_t damage_timer;
static uint16_t ball_timer;
struct BallStruct
{
uint8_t x;
uint8_t y;
bool on;
bool up;
bool left;
bool enemy;
};
struct BallStruct ball[2];
void init_ball(uint8_t i);
void hurt_paddle(void);

View File

@ -1,18 +0,0 @@
![GMMK Pro Paddle Game zLayout Image](https://i.imgur.com/RYcKyOj.png)
# Paddle Game GMMK Pro layout by Tomas Guinan
- Add Print Screen, Scroll Lock, Pause/Break, Insert to Fn layer
- Toggle backlight using Fn+`
- If you don't like using a backlight but wnat to play the paddle game or
use other RGB features, turn RGB on and set brightness to 0
- Usable Fn layer keys are backlit
- Implement Win key lock using Fn+Win like in Glorious Core firmware
- Caps Lock and Scroll Lock keys light up white when active
- Caps Lock has red flashing side lights like in Glorious Core firmware
- Layer 2 includes Paddle Game, playable by pressing Fn+P
- Use rotary encoder to control paddle
- Contains 12 levels, indicated by blue LED on F row
- Player has 4 lives, indicated by nav cluster
- Deflect white balls while avoiding red ones
- Press Fn to quit game

View File

@ -1,181 +0,0 @@
/* Copyright 2021 Tomas Guinan
*
* 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/>.
*/
#ifdef RGB_MATRIX_ENABLE
bool fn_active = false;
bool caps_active = false;
bool caps_flash_on = false;
static uint16_t caps_flasher = 0;
RGB rgb_value;
// RGB LED locations
enum led_location_map {
LED_ESC, // 0, ESC, k13
LED_GRV, // 1, ~, k16
LEB_TAB, // 2, Tab, k11
LED_CAPS, // 3, Caps, k21
LED_LSFT, // 4, Sh_L, k00
LED_LCTL, // 5, Ct_L, k06
LED_F1, // 6, F1, k26
LED_1, // 7, 1, k17
LED_Q, // 8, Q, k10
LED_A, // 9, A, k12
LED_Z, // 10, Z, k14
LED_LWIN, // 11, Win_L, k90
LED_F2, // 12, F2, k36
LED_2, // 13, 2, k27
LED_W, // 14, W, k20
LED_S, // 15, S, k22
LED_X, // 16, X, k24
LED_LALT, // 17, Alt_L, k93
LED_F3, // 18, F3, k31
LED_3, // 19, 3, k37
LED_E, // 20, E, k30
LED_D, // 21, D, k32
LED_C, // 22, C, k34
LED_F4, // 23, F4, k33
LED_4, // 24, 4, k47
LED_R, // 25, R, k40
LED_F, // 26, F, k42
LED_V, // 27, V, k44
LED_F5, // 28, F5, k07
LED_5, // 29, 5, k46
LED_T, // 30, T, k41
LED_G, // 31, G, k43
LED_B, // 32, B, k45
LED_SPC, // 33, SPACE, k94
LED_F6, // 34, F6, k63
LED_6, // 35, 6, k56
LED_Y, // 36, Y, k51
LED_H, // 37, H, k53
LED_N, // 38, N, k55
LED_F7, // 39, F7, k71
LED_7, // 40, 7, k57
LED_U, // 41, U, k50
LED_J, // 42, J, k52
LED_M, // 43, M, k54
LED_F8, // 44, F8, k76
LED_8, // 45, 8, k67
LED_I, // 46, I, k60
LED_K, // 47, K, k62
LED_COMM, // 48, ,, k64
LED_RALT, // 49, Alt_R, k95
LED_F9, // 50, F9, ka6
LED_9, // 51, 9, k77
LED_O, // 52, O, k70
LED_L, // 53, L, k72
LED_DOT, // 54, ., k74
LED_FN, // 55, FN, k92
LED_F10, // 56, F10, ka7
LED_0, // 57, 0, k87
LED_P, // 58, P, k80
LED_SCLN, // 59, ;, k82
LED_SLSH, // 60, ?, k85
LED_F11, // 61, F11, ka3
LED_MINS, // 62, -, k86
LED_LBRC, // 63, [, k81
LED_QUOT, // 64, ", k83
LED_RCTL, // 65, Ct_R, k04
LED_F12, // 66, F12, ka5
LED_L1, // 67, LED, l01
LED_R1, // 68, LED, l11
LED_DEL, // 69, Del, k97
LED_L2, // 70, LED, l02
LED_R2, // 71, LED, l12
LED_HOME, // 72, Home, k65
LED_L3, // 73, LED, l03
LED_R3, // 74, LED, l13
LED_PGUP, // 75, PgUp, k15
LED_L4, // 76, LED, l04
LED_R4, // 77, LED, l14
LED_EQL, // 78, =, k66
LED_RIGHT, // 79, Right, k05
LED_L5, // 80, LED, l05
LED_R5, // 81, LED, l15
LED_END, // 82, End, k75
LED_L6, // 83, LED, l06
LED_R6, // 84, LED, l16
LED_BSPC, // 85, BSpc, ka1
LED_PGDN, // 86, PgDn, k25
LED_L7, // 87, LED, l07
LED_R7, // 88, LED, l17
LED_RBRC, // 89, ], k61
LED_RSFT, // 90, Sh_R, k91
LED_L8, // 91, LED, l08
LED_R8, // 92, LED, l18
LED_BSLS, // 93, \, ka2
LED_UP, // 94, Up, k35
LED_LEFT, // 95, Left, k03
LED_ENT, // 96, Enter, ka4
LED_DOWN // 97, Down, k73
};
const uint8_t LED_RGB[] = {
LED_MINS, LED_EQL,
LED_LBRC, LED_RBRC,
LED_SCLN, LED_QUOT,
LED_HOME, LED_PGUP, LED_PGDN, LED_END,
LED_UP, LED_DOWN, LED_LEFT, LED_RIGHT
};
const uint8_t LED_GREEN[] = {
LED_F1, LED_F2, LED_F3, LED_F4,
LED_F5, LED_F6, LED_F7, LED_F8
};
const uint8_t LED_WHITE[] = {
LED_F9, LED_F10, LED_F11, LED_DEL
};
const uint8_t LED_SIDE_LEFT[] = { LED_L1, LED_L2, LED_L3, LED_L4, LED_L5, LED_L6, LED_L7, LED_L8};
const uint8_t LED_SIDE_RIGHT[] = { LED_R1, LED_R2, LED_R3, LED_R4, LED_R5, LED_R6, LED_R7, LED_R8};
// Breakout LED rules
const uint8_t GAME_LIVES[] = { LED_HOME, LED_PGUP, LED_PGDN, LED_END };
const uint8_t GAME_PADDLE[] = {
LED_Z, LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT, LED_SLSH
};
const uint8_t GAME_SMILE1[] = {
LED_A, LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN, LED_QUOT
};
const uint8_t GAME_SMILE2[] = {
LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL
};
const uint8_t GAME_R4[] = {
LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT
};
const uint8_t GAME_R3[] = {
LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN
};
const uint8_t GAME_R2[] = {
LED_W, LED_E, LED_R, LED_T, LED_Y, LED_U, LED_I, LED_O, LED_P, LED_LBRC
};
const uint8_t GAME_R1[] = {
LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL
};
const uint8_t GAME_R0[] = {
LED_F1, LED_F2, LED_F3, LED_F4, LED_F5, LED_F6, LED_F7, LED_F8, LED_F9, LED_F10, LED_F11, LED_F12
};
const uint8_t LED_GAME_OVER[] = { LED_5, LED_8, LED_F, LED_G, LED_H, LED_J, LED_C, LED_M };
#endif

View File

@ -1,4 +0,0 @@
MOUSEKEY_ENABLE = no
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
RGB_MATRIX_ENABLE = yes
ENCODER_ENABLE = yes

View File

@ -1,75 +0,0 @@
/* Copyright 2021 stickandgum
*
* 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
// I like NKRO.. but let's not force it. @drashna pointed out some older hardware has issues - Toggle it via keycode if you like.
// #define FORCE_NKRO
// At the time of this, there are 41 effects! That may be a bit too many to cycle through - keeping what I believe is the best.
#ifdef RGB_MATRIX_ENABLE
// #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
// Below added per: https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#suspended-state-id-suspended-state
#define RGB_MATRIX_SLEEP
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain
#define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes
// Soon we need to ENABLE modes by DEFAULT soon as per: https://github.com/qmk/qmk_firmware/pull/13758 Thanks @noroadsleft
// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // BUILT IN (MAPPED!) Static single color.
// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Accenting various keys on the keyboard.
// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Top down rainbow!
# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Left Right Rainbow (the top-down is better imho).
// #undef ENABLE_RGB_MATRIX_BREATHING // Built in (MAPPED!)
// #undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right (with white)
// #undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right (with black)
# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades sat (RGB_MATRIX_CYCLE_PINWHEEL)
# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // See above
# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // See above
// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness (with black)
# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard cycling through rainbow
// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // BUILT IN (MAPPED!) Full Rainbow Left to Right
# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Rainbow circles coming to center.
# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Two Rainbow circles coming to 1/3 and 2/3 points.
# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right
// #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // BUILT IN (MAPPED!) - Consider disabling this - my poor eyes.
# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard
# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Two rainbows spinning around keyboards
# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Similar to above.
# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enough of the spinning rainbows - we get it! :-)
# undef ENABLE_RGB_MATRIX_RAINDROPS // Jellybeans are better.
// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - better than above.
# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back
# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left
# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right
// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // Hot keys!
// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // The Matrix!
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Key hits shown in current hue - all other keys black: wide slightly better imo
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Key hits shown in current hue - all other keys shifted hue
// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse around a single key hit then fades value out (black otherwise)
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // same as above but a bit too intense imo.
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Column and Row single color fade.
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Column and Row single color fade. (Multi-keys)
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of key hit then fades
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multi-key hit then fades
# undef ENABLE_RGB_MATRIX_SPLASH // Full rainbow pulses from key hit. All else black.
# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full rainbow pulses from multi-keys. All else black.
# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Single color pulses from key hit. All else black. (Using solid_reactive_wide instead).
# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Single color pulses from muli-keys. All else black. (Using solid_reactive_wide instead).
#endif

View File

@ -1,302 +0,0 @@
/* Copyright 2021 stickandgum GMMK Pro ANSI Enhanced Keymap File
*
* 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
enum my_keycodes {
LED_TILDE = SAFE_RANGE,
LED_1,
LED_2,
LED_3,
LED_4,
LED_5,
LED_6,
LED_7,
LED_8,
LED_9,
LED_0,
LED_MINS,
LED_EQL,
QMKBEST
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
[0] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, KC_CALC, KC_MYCM, KC_MSEL, KC_MAIL, KC_WHOM, _______, _______, _______, _______, _______, KC_WAKE, KC_SLEP, KC_PAUS, _______,
LED_TILDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, KC_INS, KC_SCRL,
_______, RGB_SAI, RGB_VAI, RGB_HUI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, KC_BRIU,
_______, RGB_RMOD, RGB_VAD, RGB_MOD, RGB_SPI, _______, _______, _______, _______, QMKBEST, _______, _______, _______, KC_BRID,
_______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_MPLY, KC_PWR,
_______, _______, _______, _______, KC_RALT, _______, KC_APP, KC_MPRV, KC_MSTP, KC_MNXT
),
};
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// https://beta.docs.qmk.fm/using-qmk/simple-keycodes/feature_advanced_keycodes#alt-escape-for-alt-tab-id-alt-escape-for-alt-tab
if (get_mods() & MOD_MASK_CTRL) { // If CTRL is held
uint8_t mod_state = get_mods(); // Store all modifiers that are held
unregister_mods(MOD_MASK_CTRL); // Immediately unregister the CRTL key (don't send CTRL-PgDn) - del_mods doesn't work here (not immediate)
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
set_mods(mod_state); // Add back in the CTRL key - so ctrl-key will work if ctrl was never released after paging.
} else if (get_mods() & MOD_MASK_SHIFT) {
uint8_t mod_state = get_mods();
unregister_mods(MOD_MASK_SHIFT);
if (clockwise) {
#ifdef MOUSEKEY_ENABLE // If using the mouse scroll - make sure MOUSEKEY is enabled
tap_code(KC_MS_WH_DOWN);
#else
tap_code(KC_VOLU);
#endif
} else {
#ifdef MOUSEKEY_ENABLE
tap_code(KC_MS_WH_UP);
#else
tap_code(KC_VOLD);
#endif
}
set_mods(mod_state);
} else if (clockwise) { // All else volume.
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}
#endif //ENCODER_ENABLE
#ifdef RGB_MATRIX_ENABLE
static void set_rgb_caps_leds_on(void);
static void set_rgb_scroll_leds_on(void);
static void set_rgb_caps_leds_off(void);
static void set_rgb_scroll_leds_off(void);
// Called on powerup and is the last _init that is run.
void keyboard_post_init_user(void) {
int mods[35] = {0,2,3,4,5,11,17,33,49,55,65,95,97,79,94,85,93,96,90,69,92,67,76,80,91,75,86,68,77,81,92,28,34,39,44};
int j;
/* output each array element's value */
for (j = 0; j < 35; j++ ) {
g_led_config.flags[mods[j]] = LED_FLAG_MODIFIER;
}
if (!rgb_matrix_is_enabled()) {
rgb_matrix_enable();
#ifdef CONSOLE_ENABLE
uprintf("ERROR! RGB Matrix Enabled and wrote to EEPROM! -How was the RGB Matrix Disabled?");
#endif
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef CONSOLE_ENABLE
switch(rgb_matrix_get_flags()) {
case 0x08:
uprintf("FLAG: LED_FLAG_INDICATOR ");
break;
case 0x04:
uprintf("FLAG: LED_FLAG_KEYLIGHT ");
break;
case 0x02:
uprintf("FLAG: LED_FLAG_UNDERGLOW ");
break;
case 0x01:
uprintf("FLAG: LED_FLAG_MODIFIER ");
break;
case 0xFF:
uprintf("FLAG: LED_FLAG_ALL ");
break;
case 0x00:
uprintf("FLAG: LED_FLAG_NONE ");
break;
default:
uprintf("FLAG Other: %u ", rgb_matrix_get_flags());
}
uprintf("Caps? %d Scroll? %d - MATRIX: %d\n", host_keyboard_led_state().caps_lock, host_keyboard_led_state().scroll_lock, rgb_matrix_is_enabled());
#endif //CONSOLE_ENABLE
switch (keycode) {
case RGB_TOG:
if (record->event.pressed) {
if (rgb_matrix_get_flags() == LED_FLAG_ALL) {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
} else {
rgb_matrix_set_flags(LED_FLAG_ALL);
}
}
return false;
case LED_TILDE:
rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); // Can use RGB_M_P built-in keycode instead.
break;
case LED_1:
rgb_matrix_mode(RGB_MATRIX_ALPHAS_MODS);
break;
case LED_2:
rgb_matrix_mode(RGB_MATRIX_GRADIENT_UP_DOWN);
break;
case LED_3:
rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS);
break;
case LED_4:
rgb_matrix_mode(RGB_MATRIX_BAND_SAT);
break;
case LED_5:
rgb_matrix_mode(RGB_MATRIX_BAND_VAL);
break;
case LED_6:
rgb_matrix_mode(RGB_MATRIX_BAND_SPIRAL_VAL);
break;
case LED_7:
rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); // Can use RGB_M_R built-in keycode instead.
break;
case LED_8:
rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); // Can use RGB_M_SW built-in keycode instead.
break;
case LED_9:
rgb_matrix_mode(RGB_MATRIX_BREATHING); // Can use RGB_M_B built-in keycode instead.
break;
#ifdef RGB_MATRIX_KEYPRESSES // Reactive effects require RGB_MATRIX_KEYPRESSES in config.h
case LED_0:
rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE_WIDE);
break;
#endif //RGB_MATRIX_KEYPRESSES
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap and Rain require #define RGB_MATRIX_FRAMEBUFFER_EFFECTS in config.h
case LED_MINS:
rgb_matrix_mode(RGB_MATRIX_DIGITAL_RAIN);
break;
case LED_EQL:
rgb_matrix_mode(RGB_MATRIX_TYPING_HEATMAP);
break;
#endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS
case QMKBEST:
if (record->event.pressed) { // when keycode QMKBEST is pressed
SEND_STRING("QMK rocks");
} else { // when keycode QMKBEST key is released
SEND_STRING("!!");
}
break;
}
return true;
}
bool rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
set_rgb_caps_leds_on();
} else {
if (rgb_matrix_get_flags() == LED_FLAG_NONE){
set_rgb_caps_leds_off();
}
}
if (host_keyboard_led_state().scroll_lock) {
set_rgb_scroll_leds_on();
} else {
if (rgb_matrix_get_flags() == LED_FLAG_NONE){
set_rgb_scroll_leds_off();
}
}
return false;
}
// RGB led number layout, function of the key
// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12
// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13
// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14
// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15
// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16
// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17
// 87, led 07 88, led 18
// 91, led 08 92, led 19
static void set_rgb_caps_leds_on(void) {
rgb_matrix_set_color(0, 255, 0, 0); //Escape Key
rgb_matrix_set_color(3, 255, 0, 0); //capslock key
rgb_matrix_set_color(5, 255, 0, 0); //Left CTRL key
rgb_matrix_set_color(67, 255, 0, 0); //Left LED 01
rgb_matrix_set_color(68, 255, 0, 0); //Right LED 12
rgb_matrix_set_color(70, 255, 127, 0); //Left LED 02
rgb_matrix_set_color(71, 255, 127, 0); //Right LED 13
rgb_matrix_set_color(73, 255, 255, 0); //Left LED 03
rgb_matrix_set_color(74, 255, 255, 0); //Right LED 14
rgb_matrix_set_color(76, 0, 255, 0); //Left LED 04
rgb_matrix_set_color(77, 0, 255, 0); //Right LED 15
rgb_matrix_set_color(80, 0, 0, 255); //Left LED 05
rgb_matrix_set_color(81, 0, 0, 255); //Right LED 16
rgb_matrix_set_color(83, 46, 43, 95); //Left LED 06
rgb_matrix_set_color(84, 46, 43, 95); //Right LED 17
rgb_matrix_set_color(87, 139, 0, 255); //Left LED 07
rgb_matrix_set_color(88, 139, 0, 255); //Right LED 18
rgb_matrix_set_color(91, 255, 255, 255); //Left LED 08
rgb_matrix_set_color(92, 255, 255, 255); //Right LED 19
}
static void set_rgb_caps_leds_off(void) {
rgb_matrix_set_color(0, 0, 0, 0); //Escape Key
rgb_matrix_set_color(3, 0, 0, 0); //capslock key
rgb_matrix_set_color(5, 0, 0, 0); //Left CTRL key
rgb_matrix_set_color(67, 0, 0, 0); //Left LED 01
rgb_matrix_set_color(68, 0, 0, 0); //Right LED 12
rgb_matrix_set_color(70, 0, 0, 0); //Left LED 02
rgb_matrix_set_color(71, 0, 0, 0); //Right LED 13
rgb_matrix_set_color(73, 0, 0, 0); //Left LED 03
rgb_matrix_set_color(74, 0, 0, 0); //Right LED 14
rgb_matrix_set_color(76, 0, 0, 0); //Left LED 04
rgb_matrix_set_color(77, 0, 0, 0); //Right LED 15
rgb_matrix_set_color(80, 0, 0, 0); //Left LED 05
rgb_matrix_set_color(81, 0, 0, 0); //Right LED 16
rgb_matrix_set_color(83, 0, 0, 0); //Left LED 06
rgb_matrix_set_color(84, 0, 0, 0); //Right LED 17
rgb_matrix_set_color(87, 0, 0, 0); //Left LED 07
rgb_matrix_set_color(88, 0, 0, 0); //Right LED 18
rgb_matrix_set_color(91, 0, 0, 0); //Left LED 08
rgb_matrix_set_color(92, 0, 0, 0); //Right LED 19
}
static void set_rgb_scroll_leds_on(void) {
rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME)
}
static void set_rgb_scroll_leds_off(void) {
rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME)
}
#endif // RGB_MATRIX_ENABLE

View File

@ -1,63 +0,0 @@
# Glorious GMMK Pro / ANSI - Enhanced Keyboard
Tried to incorporate full featured GMMK Pro keyboard functionality without adding unnecessary features. Included Scroll Lock and Caps LEDs. NKRO can be toggled (Fn + N).
SHIFT and Ctrl keys for scrolling with the rotary, Fn-keys also used for screen brightness, media, PowerOff, Suspend, App Shortcuts, and RGB Toggle/Modifications. Trimmed down the amazing (currently 41) built-in RGB effects down to about 13 or so reasonable effects that feel are just enough for your entertainment without being too excessive.
BIG thank you to [AndreBrait](https://github.com/andrebrait), And of course, @drashna and @filterpaper, @noroadsleft and the entire discord community.
* Keymap Creator: [StickAndGum](https://github.com/StickAndGum)
* Keyboard: [More info on GMMK Pro](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black)
* Controller [STM32F303CCT6](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
* Layout:
![keyboard-layout](https://user-images.githubusercontent.com/22257588/130371838-875ba65b-88ea-4f81-a44a-bb24194c4989.png)
Features are as follows:
Rotary:
- Default: Volume Up/Down
- Shift: Mouse Wheel Down/Up
- Ctrl: Page Down/Up
Top/Default Layer:
- Print Screen -> Print Screen (Left of rotary)
- Delete -> Home (Under Rotary)
- Right Alt -> Delete (Right of Spacebar)
- All other keys defaults.
Fn Layer:
- Fn + \ -> Bootloader Mode (Can also hold ESC while powering up) - If hit by mistake, just unplug and replug in.
- Fn + Backspace -> Insert
- Fn + Print -> Pause/Break
- Fn + Home -> Scroll Lock (Lights up white!)
- Fn + Del (right of space) -> Right-Alt key.
- Fn + RCtrl (right of Fn) -> Menu/App key.
- Fn + N -> Toggle NKRO
- Fn + End -> Power Off Computer
- Fn + F12 -> Suspend Computer
- Fn + F11 -> Wake Computer (Necessary on MAC OS?)
- Fn + Page Up / Down -> Laptop Screen Brightness Up/Down
- Fn + F1 - F5 -> Launch Calc, My Comp (Explorer), Media Player, Mail Client, Web Browser.
- Fn + Up, Down, Left, Right Arrows -> Media Play, Stop, Previous, Next respectively.
- RGB Information:
- Toggle for RGB via Fn-r (CAPS & ScrlLock still Light/Indicate)
- CAPS: Side Light Rainbow Indicators and Left-side RED Indicators
- Scroll-Lock: Fn-Home (Under Rotary) white indicator.
- Modifiers identified around most of the edge of keyboard / Side lights also accented (Fn-1 looks GREAT IMHO)
- RGB Modifing (all via Function key) all via wasdqerf (common gaming keys) - easy to remember.
- Fn + r -> Toggle RGB
- Fn + w,s -> Brightness Up, Down
- Fn + a,d -> Cycle Forward/Backward through rgb effects
- Fn + q -> Increase or Decrease Saturation (use SHIFT key to lower)
- Fn + e -> Increase or Decrease Hue/Color (use SHIFT key to lower)
- Fn + f -> Increase or Decrease Speed (Using "F" for Fast!) (Use SHIFT for slower)
- Fn + ~, 0-9, - = keys (2nd row keys) -> 13 RGB different effects arranged to my liking. Fn-1 is my favorite.
- Fn + L -> My easter egg... "QMK rocks!"
- Known issues:
- The Heatmap and Matrix FrameBuffer effects (Fn - and =) are a bit buggy - F-keys light up when they shouldn't and the Caps/Scroll lights don't turn off properly when using. Just change the effect to something else to fix this.
- If you find a fix for this, please let me know.
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@ -1,2 +0,0 @@
CONSOLE_ENABLE = no
MOUSEKEY_ENABLE = yes

View File

@ -1,55 +0,0 @@
// Copyright 2021 a (@trwnh on Github)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_SLEEP
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain
#define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes
// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // BUILT IN (MAPPED!) Static single color.
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Accenting various keys on the keyboard.
// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Top down rainbow!
// #undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Left Right Rainbow (the top-down is better imho).
// #undef ENABLE_RGB_MATRIX_BREATHING // Built in (MAPPED!)
#undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right (with white)
#undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right (with black)
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades sat (RGB_MATRIX_CYCLE_PINWHEEL)
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // See above
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // See above
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness (with black)
#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard cycling through rainbow
// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // BUILT IN (MAPPED!) Full Rainbow Left to Right
// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Rainbow circles coming to center.
// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Two Rainbow circles coming to 1/3 and 2/3 points.
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right
// #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // BUILT IN (MAPPED!) - Consider disabling this - my poor eyes.
// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard
// #undef ENABLE_RGB_MATRIX_DUAL_BEACON // Two rainbows spinning around keyboards
// #undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Similar to above.
// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enough of the spinning rainbows - we get it! :-)
#undef ENABLE_RGB_MATRIX_RAINDROPS // Jellybeans are better.
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - better than above.
#undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back
#undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left
#undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right
#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL // Single hue fractal filled keys pulsing horizontally out to edges
#undef ENABLE_RGB_MATRIX_PIXEL_FLOW // Pulsing RGB flow along LED wiring with random hues
#undef ENABLE_RGB_MATRIX_PIXEL_RAIN // Randomly light keys with random hues
#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // Hot keys!
#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // The Matrix!
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Key hits shown in current hue - all other keys black: wide slightly better imo
// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Key hits shown in current hue - all other keys shifted hue
// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse around a single key hit then fades value out (black otherwise)
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // same as above but a bit too intense imo.
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Column and Row single color fade.
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Column and Row single color fade. (Multi-keys)
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of key hit then fades
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multi-key hit then fades
// #undef ENABLE_RGB_MATRIX_SPLASH // Full rainbow pulses from key hit. All else black.
// #undef ENABLE_RGB_MATRIX_MULTISPLASH // Full rainbow pulses from multi-keys. All else black.
// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Single color pulses from key hit. All else black. (Using solid_reactive_wide instead).
// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Single color pulses from muli-keys. All else black. (Using solid_reactive_wide instead).
#endif

View File

@ -1,181 +0,0 @@
// Copyright 2021 a (@trwnh on Github)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, 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_PSCR, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
KC_KB_POWER, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS,
_______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS,
_______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, KC_SCRL,
KC_MSTP, RGB_MOD, RGB_RMOD,_______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_APP,
KC_MPRV, KC_MPLY, KC_MNXT, QK_BOOT, MO(2), _______, _______, KC_HOME, KC_PGDN, KC_END
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN2, KC_MS_U, _______,
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
),
};
#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP) },
[2] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
};
#endif
// clang-format on
// RGB led number layout, function of the key
// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12
// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13
// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14
// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15
// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16
// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17
// 87, led 07 88, led 18
// 91, led 08
#ifdef RGB_MATRIX_ENABLE
static void set_rgb_caps_leds_on(void);
static void set_rgb_scroll_leds_on(void);
static void set_rgb_caps_leds_off(void);
static void set_rgb_scroll_leds_off(void);
static void set_rgb_caps_leds_on(void) {
// Set alpha and capslock to red
rgb_matrix_set_color( 3, 255, 0, 0); // Caps
rgb_matrix_set_color( 8, 255, 0, 0); // Q
rgb_matrix_set_color(14, 255, 0, 0); // W
rgb_matrix_set_color(20, 255, 0, 0); // E
rgb_matrix_set_color(25, 255, 0, 0); // R
rgb_matrix_set_color(30, 255, 0, 0); // T
rgb_matrix_set_color(36, 255, 0, 0); // Y
rgb_matrix_set_color(41, 255, 0, 0); // U
rgb_matrix_set_color(46, 255, 0, 0); // I
rgb_matrix_set_color(52, 255, 0, 0); // O
rgb_matrix_set_color(58, 255, 0, 0); // P
rgb_matrix_set_color( 9, 255, 0, 0); // A
rgb_matrix_set_color(15, 255, 0, 0); // S
rgb_matrix_set_color(21, 255, 0, 0); // D
rgb_matrix_set_color(26, 255, 0, 0); // F
rgb_matrix_set_color(31, 255, 0, 0); // G
rgb_matrix_set_color(37, 255, 0, 0); // H
rgb_matrix_set_color(42, 255, 0, 0); // J
rgb_matrix_set_color(47, 255, 0, 0); // K
rgb_matrix_set_color(53, 255, 0, 0); // L
rgb_matrix_set_color(10, 255, 0, 0); // Z
rgb_matrix_set_color(16, 255, 0, 0); // X
rgb_matrix_set_color(22, 255, 0, 0); // C
rgb_matrix_set_color(27, 255, 0, 0); // V
rgb_matrix_set_color(32, 255, 0, 0); // B
rgb_matrix_set_color(38, 255, 0, 0); // N
rgb_matrix_set_color(43, 255, 0, 0); // M
}
static void set_rgb_caps_leds_off(void) {
// Set alpha and capslock to black
rgb_matrix_set_color( 3, 0, 0, 0); // Caps
rgb_matrix_set_color( 8, 0, 0, 0); // Q
rgb_matrix_set_color(14, 0, 0, 0); // W
rgb_matrix_set_color(20, 0, 0, 0); // E
rgb_matrix_set_color(25, 0, 0, 0); // R
rgb_matrix_set_color(30, 0, 0, 0); // T
rgb_matrix_set_color(36, 0, 0, 0); // Y
rgb_matrix_set_color(41, 0, 0, 0); // U
rgb_matrix_set_color(46, 0, 0, 0); // I
rgb_matrix_set_color(52, 0, 0, 0); // O
rgb_matrix_set_color(58, 0, 0, 0); // P
rgb_matrix_set_color( 9, 0, 0, 0); // A
rgb_matrix_set_color(15, 0, 0, 0); // S
rgb_matrix_set_color(21, 0, 0, 0); // D
rgb_matrix_set_color(26, 0, 0, 0); // F
rgb_matrix_set_color(31, 0, 0, 0); // G
rgb_matrix_set_color(37, 0, 0, 0); // H
rgb_matrix_set_color(42, 0, 0, 0); // J
rgb_matrix_set_color(47, 0, 0, 0); // K
rgb_matrix_set_color(53, 0, 0, 0); // L
rgb_matrix_set_color(10, 0, 0, 0); // Z
rgb_matrix_set_color(16, 0, 0, 0); // X
rgb_matrix_set_color(22, 0, 0, 0); // C
rgb_matrix_set_color(27, 0, 0, 0); // V
rgb_matrix_set_color(32, 0, 0, 0); // B
rgb_matrix_set_color(38, 0, 0, 0); // N
rgb_matrix_set_color(43, 0, 0, 0); // M
}
static void set_rgb_scroll_leds_on(void) {
rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME)
}
static void set_rgb_scroll_leds_off(void) {
rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME)
}
bool rgb_matrix_indicators_user(void) {
// Left side rainbow
rgb_matrix_set_color(67, 255, 0, 0); // Left LED 01
rgb_matrix_set_color(70, 255, 127, 0); // Left LED 02
rgb_matrix_set_color(73, 255, 255, 0); // Left LED 03
rgb_matrix_set_color(76, 0, 255, 0); // Left LED 04
rgb_matrix_set_color(80, 0, 0, 255); // Left LED 05
rgb_matrix_set_color(83, 46, 43, 95); // Left LED 06
rgb_matrix_set_color(87, 139, 0, 255); // Left LED 07
rgb_matrix_set_color(91, 255, 255, 255); // Left LED 08
// Right side rainbow
rgb_matrix_set_color(68, 255, 0, 0); // Right LED 12
rgb_matrix_set_color(71, 255, 127, 0); // Right LED 13
rgb_matrix_set_color(74, 255, 255, 0); // Right LED 14
rgb_matrix_set_color(77, 0, 255, 0); // Right LED 15
rgb_matrix_set_color(81, 0, 0, 255); // Right LED 16
rgb_matrix_set_color(84, 46, 43, 95); // Right LED 17
rgb_matrix_set_color(88, 139, 0, 255); // Right LED 18
rgb_matrix_set_color(92, 255, 255, 255); // Right LED 19
if (host_keyboard_led_state().caps_lock) {
set_rgb_caps_leds_on();
} else {
if (rgb_matrix_get_flags() == LED_FLAG_NONE){
set_rgb_caps_leds_off();
}
}
if (host_keyboard_led_state().scroll_lock) {
set_rgb_scroll_leds_on();
} else {
if (rgb_matrix_get_flags() == LED_FLAG_NONE){
set_rgb_scroll_leds_off();
}
}
return false;
}
#endif // RGB_MATRIX_ENABLE

View File

@ -1,91 +0,0 @@
### features
- via enable
- rgb matrix reactive and animation modes enabled
- disable rgb when usb is suspended
- mouse control
- fn+ralt+arrow keys to move
- fn+ralt+enter = left click
- fn+ralt+rshift = right click
- fn+ralt+rotary = scroll up/down (click for middle click)
- fn+n = toggle n key rollover
### changes
- fn+space to reset (instead of fn+backslash)
- fn+del = ins
- fn+pgup = pause/break (brightness up on macos)
- fn+pgdn = scroll lock (brightness down on macos)
- fn+end = app menu
- lower left mod key cluster = media controls
- fn+lctrl = prev
- fn+lsuper = play/pause
- fn+lalt = next
- fn+lshift = stop
- function keys = 2nd row function keys
- fn+f1 = f13
- fn+f2 = f14
- ...
- fn+f12 = f24
- fn + arrow keys used for nav
- fn + left = home
- fn + right = end
- fn + up = page up
- fn + down = page down
- rgb control moved to qwer/asdf + z/x + t
- fn+q/a = hue increase/decrease
- fn+w/s = saturation increase/decrease
- fn+e/d = value increase/decrease
- fn+r/f = speed increase/decrease
- fn+z = rgb mode forward
- fn+x = rgb mode reverse
- fn+t = rgb toggle
### rgb effects enabled
sidebars are constant rainbow. alpha and capslock turn red when caps is on
- solid color
- rainbow gradient
- gradient up down
- gradient left right
- breathing
- rainbow cycles
- cycle all
- cycle left right
- cycle up down
- cycle out in
- cycle out in dual
- cycle pinwheel
- cycle spiral
- rainbow beacon
- rainbow pinwheels
- reactive
- splash
- multisplash
- solid splash
- solid multisplash
### layers
source code for keyboard layout editor images here: https://gist.github.com/trwnh/94e48f132c49043373918df29409ab48
#### layer 0
![](https://i.imgur.com/P1hSkZT.png)
#### layer 1
![](https://i.imgur.com/qqiObxP.png)
#### layer 2
![](https://i.imgur.com/W0i1D0C.png)
### misc
i am taking suggestions for possible improvements to this keymap; you may contact me via the following
- email: mailto:a@trwnh.com
- chat: xmpp:a@trwnh.com
- fediverse: https://mastodon.social/@trwnh

View File

@ -1,2 +0,0 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes

View File

@ -1,58 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Ct_L A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up Win_R
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
[0] = LAYOUT(
KC_ESC, 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_PSCR, KC_MEDIA_PLAY_PAUSE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
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_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_RGUI,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_MS_WH_RIGHT);
} else {
tap_code(KC_MS_WH_LEFT);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}

View File

@ -1,74 +0,0 @@
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.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
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute)
// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home
// Tab Q W E R T Y U I O P [ ] \ PgUp
// Caps A S D F G H J K L ; " Enter PgDn
// Sh_L Z X C V B N M , . ? Sh_R Up End
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
[0] = LAYOUT(
KC_ESC, 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_DEL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR,
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
// clang-format on
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
//return true; //set to return false to counteract enabled encoder in pro.c
return false;
}

View File

@ -1,181 +0,0 @@
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "gmmk/pro",
"keymap": "willwm",
"layout": "LAYOUT",
"layers": [
[
"KC_ESC",
"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_DEL",
"KC_MUTE",
"KC_GRV",
"KC_1",
"KC_2",
"KC_3",
"KC_4",
"KC_5",
"KC_6",
"KC_7",
"KC_8",
"KC_9",
"KC_0",
"KC_MINS",
"KC_EQL",
"KC_BSPC",
"KC_HOME",
"KC_TAB",
"KC_Q",
"KC_W",
"KC_E",
"KC_R",
"KC_T",
"KC_Y",
"KC_U",
"KC_I",
"KC_O",
"KC_P",
"KC_LBRC",
"KC_RBRC",
"KC_BSLS",
"KC_PGUP",
"MO(1)",
"KC_A",
"KC_S",
"KC_D",
"KC_F",
"KC_G",
"KC_H",
"KC_J",
"KC_K",
"KC_L",
"KC_SCLN",
"KC_QUOT",
"KC_ENT",
"KC_PGDN",
"KC_LSFT",
"KC_Z",
"KC_X",
"KC_C",
"KC_V",
"KC_B",
"KC_N",
"KC_M",
"KC_COMM",
"KC_DOT",
"KC_SLSH",
"KC_RSFT",
"KC_UP",
"KC_END",
"KC_LCTL",
"KC_LGUI",
"KC_LALT",
"KC_SPC",
"KC_RALT",
"MO(1)",
"KC_RCTL",
"KC_LEFT",
"KC_DOWN",
"KC_RGHT"
],
[
"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_INS",
"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_PSCR",
"KC_CAPS",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"QK_BOOT",
"KC_NO",
"KC_TRNS",
"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_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_PGUP",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_TRNS",
"KC_NO",
"KC_HOME",
"KC_PGDN",
"KC_END"
]
],
"author": ""
}

View File

@ -1,22 +0,0 @@
<img width="567" alt="layer0" src="https://user-images.githubusercontent.com/303042/118893170-da3e3280-b8b6-11eb-9459-f6c339c59bde.png">
<img width="566" alt="layer1" src="https://user-images.githubusercontent.com/303042/118893191-e0341380-b8b6-11eb-8641-a4fdeeb7cbb2.png">
# willwm GMMK Pro Layout
Based on [gmmk/pro/keymaps/default](../default/keymap.c), with [VIA support](./rules.mk)
Layer 0
* Delete between F12 and rotary encoder (replaces PrtSc)
* Home below rotary encoder (replaces Del)
* MO(1) in default location and Caps Lock location
Layer 1
* Tab -> Caps Lock
* Del -> Insert
* Home -> PrtSc
* Left Arrow -> Home
* Right Arrow -> End
* Up Arrow -> PgUp
* Down Arrow -> PgDn

View File

@ -1,2 +0,0 @@
VIA_ENABLE = yes
UNICODE_ENABLE = yes

View File

@ -1,8 +0,0 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define TAPPING_TERM 300
#endif

View File

@ -1,115 +0,0 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _DVORAK 1
#define _LEFTY 2
#define _RIGHTY 3
#define _DUAL 4
enum jj40_keycodes {
QWERTY = SAFE_RANGE,
DVORAK,
LEFTY,
RIGHTY,
DUAL,
};
#define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO
#define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc
#define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
KC_PSCR, KC_BSPC, KC_CAPS, KC_LALT, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[_DVORAK] = LAYOUT_ortho_4x12(
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH,
KC_PSCR, KC_BSPC, KC_CAPS, KC_LALT, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[_LEFTY] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_DEL, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
[_RIGHTY] = LAYOUT_ortho_4x12(
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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, _______, KC_EQL, KC_MINS, KC_BSLS, KC_SLSH, _______, _______,
_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______,
_______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______
),
[_DUAL] = LAYOUT_ortho_4x12(
QK_BOOT, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, RGB_HUD, RGB_TOG, QK_BOOT,
_______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, RGB_HUI, RGB_MOD, _______,
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, RGB_SAD, RGB_VAD, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_VAI, _______
)
};
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) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case LEFTY:
if (record->event.pressed) {
layer_on(_LEFTY);
update_tri_layer(_LEFTY, _RIGHTY, _DUAL);
} else {
layer_off(_LEFTY);
update_tri_layer(_LEFTY, _RIGHTY, _DUAL);
}
return false;
break;
case RIGHTY:
if (record->event.pressed) {
layer_on(_RIGHTY);
update_tri_layer(_LEFTY, _RIGHTY, _DUAL);
} else {
layer_off(_RIGHTY);
update_tri_layer(_LEFTY, _RIGHTY, _DUAL);
}
return false;
break;
case DUAL:
if (record->event.pressed) {
layer_on(_DUAL);
} else {
layer_off(_DUAL);
}
return false;
break;
}
return true;
}
// Loop
void matrix_scan_user(void) {
// Empty
};

View File

@ -1,49 +0,0 @@
# Waples jj40 keymap
> based heavily on my lets split
[Waples](https://www.github.com/Waples)
### Layers
I currently have the following layers in my keymap:
* Qwerty (as default)
* Dvorak (still learning this type of layout, so not really used much)
* Lefty (lower)
* Righty (raise)
* Dual (adjust)
### Note to self:
YOU NEED TO USE [bootloadHID -r kprepublic_jj40_waples.hex](https://github.com/qmk/qmk_firmware/tree/master/keyboards/jj40)
## the stuff below is out of date and I think about removing them from this readme
#### QWERTY
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp |
|C_Esc| A | S | D | F | G | H | J | K | L | ; |S_Ent|
| Sft | Z | X | C | V | B | N | M | , | . | / | " |
|P_SCR| GUI | Alt | Cps | ^L^ | Bsp | Spc | ^R^ | Lft | Dwn | Up! | Rgt |
#### DVORAK
| Tab | " | , | . | P | Y | F | G | C | R | L | Bsp |
|C_Esc| A | O | E | U | I | D | H | T | N | S |S_Ent|
| Sft | ; | Q | J | K | X | B | M | W | V | Z | / |
|P_SCR| GUI | Alt | Cps | ^L^ | Bsp | Spc | ^R^ | Lft | Dwn | Up! | Rgt |
#### LEFTY (lower)
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bsp |
| Del | | | | | | | ( | ) | [ | ] | |
| | | | | | | | | | | | |
| | | | | | | Ins | | Hme | PgD | PgU | End |
#### RIGHTY (raise)
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bsp |
| Del | F1 | F2 | F3 | F4 | | = | - | \ | / | | |
| | F5 | F6 | F7 | F8 | | | | | | | |
| | F9 | F10 | F11 | | | | | | | | |
#### DUAL
|Reset| | | | |QWERT| GAME| | | | |Reset|
| | Prv | Stp | Tog | Nxt | Nrm | Swp | | | | | |
| | | Mte | Vol-| Vol+| | NKRO| | | | | |
| | | | | | |DVORK| | | | | |

View File

@ -1,9 +0,0 @@
# build options
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
KEY_LOCK_ENABLE = yes

View File

@ -1,42 +0,0 @@
/* Copyright 2021 Craig Gardner
*
* 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/>.
*/
/*
Modifications 1/2023 by Kassandra Karan for MacOS support
* Changed Volume up and down to mac scan codes
* MacOS doesnt support Stop, so changed default to spotlight search
*/
#include QMK_KEYBOARD_H
enum layers { _MAIN };
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_KB_VOLUME_UP); // MacOS Volume Up
} else {
tap_code(KC_KB_VOLUME_DOWN); // MacOS Volume Down
}
}
return false;
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //button closest to USB is first
[_MAIN] = LAYOUT(
KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, G(KC_SPC), KC_MNXT
)
};

View File

@ -1,6 +0,0 @@
# MacOS BigKnob Layout
This is a modification to the BigKnob to support MacOS. The QMK configurator does not
support rotary encoders, so this changes the key codes to the Apple volume control
codes. This also changes the 3rd key from stop, which MacOS does not support, to
spotlight search.

View File

@ -1,24 +0,0 @@
/*
This is the c configuration file for the keymap
Copyright 2020 Mose Schmiedel <mose.schmiedel@web.de>
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
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS

View File

@ -1,97 +0,0 @@
#include QMK_KEYBOARD_H
#include "keymap_german.h"
// 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 layers {
_QWERTZ,
_LOWER,
_RAISE,
_ADJUST,
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwertz
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | + |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Y | X | C | V | B | N | M | , | . | - |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | AltGr| Alt |Lower |Space | Space| Raise| Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTZ] = LAYOUT(
KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC,
KC_ESC, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_PLUS, KC_ENT,
KC_LSFT, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RSFT,
KC_LCTL, KC_LGUI, KC_ALGR, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ° | ! | ? | § | | ~ | $ | ( | ) | < | > | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | Vol+ | Prev | Next | Play | & | @ | { | } | [ | ] |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Vol- | | | | | | % | / | \ | ' | " |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | | | |Lower | | Raise| = | * | | |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT(
DE_CIRC, DE_EXLM, DE_QUES, DE_SECT, DE_EURO, DE_TILD, DE_DLR, DE_LPRN, DE_RPRN, DE_LABK, DE_RABK, KC_BSPC,
KC_DEL, KC_VOLU, KC_MPRV, KC_MNXT, KC_MPLY, DE_AMPR, DE_AT, DE_LCBR, DE_RCBR, DE_LBRC, DE_RBRC, KC_ENT,
KC_LSFT, KC_VOLD, _______, _______, _______, DE_PIPE, DE_PERC, DE_SLSH, DE_BSLS, DE_QUOT, DE_DQUO, KC_RSFT,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, DE_EQL, DE_ASTR, _______, _______
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | / | 7 | 8 | 9 | * | | | | # | Alt | ` | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | 4 | 5 | 6 | - | Pos1 | End | ä | ö | ü | ß |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| 1 | 2 | 3 | + |PageUp|PageDn| | | | |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | . | 0 | = |Lower | | Raise| | | | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT(
DE_SLSH, KC_7, KC_8, KC_9, DE_ASTR, _______, _______, _______, DE_HASH, KC_LALT, DE_ACUT, KC_BSPC,
KC_DEL, KC_4, KC_5, KC_6, DE_MINS, KC_HOME, KC_END, DE_ADIA, DE_ODIA, DE_UDIA, DE_SS, KC_ENT,
KC_LSFT, KC_1, KC_2, KC_3, DE_PLUS, KC_PGUP, KC_PGDN, _______, _______, _______, _______, KC_LSFT,
_______, DE_DOT, KC_0, DE_EQL, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_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,
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}

View File

@ -1,57 +0,0 @@
De_Programming Keymap
======
Features
--------
Changed Keymap to resemble German Layout. Optimized for Programming
Layout
--------
Qwertz
,-----------------------------------------------------------------------------------.
| Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Esc | A | S | D | F | G | H | J | K | L | + |Enter |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| Y | X | C | V | B | N | M | , | . | - |Shift |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Ctrl | GUI | AltGr| Alt |Lower |Space |Space |Raise | Left | Down | Up |Right |
`-----------------------------------------------------------------------------------'
Lower
,-----------------------------------------------------------------------------------.
| ° | ! | ? | § | € | ~ | $ | ( | ) | < | > | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Del | F1 | F2 | F3 | F4 | & | @ | { | } | [ | ] |Enter |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| F5 | F6 | F7 | F8 | | | % | / | \ | ' | " |Shift |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Ctrl | F9 | F10 | F11 | F12 | | Prev | Next | Vol- | Vol+ | Play |
`-----------------------------------------------------------------------------------'
Raise
,-----------------------------------------------------------------------------------.
| / | 7 | 8 | 9 | * | | | | # | Alt | ` | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Del | 4 | 5 | 6 | - | Pos1 | End | ä | ö | ü | ß |Enter |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| 1 | 2 | 3 | + |PageUp|PageDn| | | | |Shift |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | . | 0 | = | Enter| | Prev | Next | Vol- | Vol+ | Play |
`-----------------------------------------------------------------------------------'
Adjust (Lower + Raise)
,-----------------------------------------------------------------------------------.
| F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 |
|------+------+------+------+------+-------------+------+------+------+------+------|
| | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | |
|------+------+------+------+------+------|------+------+------+------+------+------|
| | | | | | | | | | | | |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | | | | |
`-----------------------------------------------------------------------------------'

View File

@ -1,32 +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
#include "../../config.h"
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#endif

View File

@ -1,151 +0,0 @@
#include QMK_KEYBOARD_H
#include "keymap_german.h"
extern keymap_config_t keymap_config;
// 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 _QWERTZ 0
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum custom_keycodes {
QWERTZ = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwertz
* ,-----------------------------------------------------------------------------------.
* | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Tab | A | S | D | F | G | H | J | K | L | + | # |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Y | X | C | V | B | N | M | , | . | - |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTZ] = LAYOUT(
KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC,
KC_TAB, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_PLUS, DE_HASH,
KC_LSFT, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_ENT ,
KC_LCTL, KC_LALT, KC_ALGR, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | | ü | ? | ´ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT(
DE_CIRC, DE_EXLM, DE_DQUO, DE_SECT, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QUES, DE_QUOT,
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DE_PIPE , KC_SCLN, KC_QUOT, _______, KC_ENT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ° | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | { | [ | ] | } | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_LCBR, DE_LBRC, DE_RBRC, DE_RCBR , DE_BSLS,
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_ENT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT(
_______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTZ, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
#ifdef AUDIO_ENABLE
float tone_qwertz[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
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 QWERTZ:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_qwertz);
#endif
persistent_default_layer_set(1UL<<_QWERTZ);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

View File

@ -1,59 +0,0 @@
De_Simple Keymap
======
Features
--------
Changed Keymap to reasamble German Layout.
Layout
--------
Qwertz
,-----------------------------------------------------------------------------------.
| Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Tab | A | S | D | F | G | H | J | K | L | + | # |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| Y | X | C | V | B | N | M | , | . | - |Enter |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
`-----------------------------------------------------------------------------------'
Lower
,-----------------------------------------------------------------------------------.
| ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | € | ü | ? | ´ |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | Next | Vol- | Vol+ | Play |
`-----------------------------------------------------------------------------------'
Raise
,-----------------------------------------------------------------------------------.
| ° | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Del | F1 | F2 | F3 | F4 | F5 | F6 | { | [ | ] | } | \ |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | Next | Vol- | Vol+ | Play |
`-----------------------------------------------------------------------------------'
Adjust (Lower + Raise)
,-----------------------------------------------------------------------------------.
| | Reset| | | | | | | | | | Del |
|------+------+------+------+------+-------------+------+------+------+------+------|
| | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | |
|------+------+------+------+------+------|------+------+------+------+------+------|
| | | | | | | | | | | | |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | | | | |
`-----------------------------------------------------------------------------------'

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
/* Select hand configuration */
// #define MASTER_LEFT
// #define MASTER_RIGHT
#define EE_HANDS
#ifdef KEYBOARD_lets_split_rev2
/* RGB Underglow */
#undef RGBLED_NUM
#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
#define RGBLED_NUM 8
#endif
#undef TAPPING_TERM
#define TAPPING_TERM 200 //At 500 some bad logic takes hold
#define PERMISSIVE_HOLD
#endif

View File

@ -1,73 +0,0 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// 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 // default layer
#define FLOCK 1 // symbols arrows and F keys on F held down
#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down
#define FLOCK_F LT(FLOCK, KC_F)
#define FLOCK_J LT(JLOCK, KC_J)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[BASE] = LAYOUT (
TD(1), KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P,
SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), FLOCK_F, GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), FLOCK_J, CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN),
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOTE
),
[FLOCK] = LAYOUT (
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC,
S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, S(KC_RBRC),
KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDN, KC_QUES, KC_SLASH
),
[JLOCK] = LAYOUT (
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC,
S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, _______, KC_UP, KC_RIGHT, S(KC_RBRC),
KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDN, KC_QUES, KC_SLASH
)
};
#ifdef TAP_DANCE_ENABLE
void tap_1(tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
register_code (KC_1);
unregister_code (KC_1);
break;
case 2:
register_code (KC_ESC);
unregister_code (KC_ESC);
break;
case 3:
register_code (KC_LSFT);
register_code (KC_1);
unregister_code (KC_1);
unregister_code (KC_LSFT);
}
}
tap_dance_action_t tap_dance_actions[] = {
[0] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_ESC),
[1] = ACTION_TAP_DANCE_FN(tap_1)
};
#endif

View File

@ -1,32 +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
// place overrides here
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(COLEMAK_SOUND), \
SONG(DVORAK_SOUND) \
}
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS

View File

@ -1,160 +0,0 @@
#include QMK_KEYBOARD_H
// 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 custom_layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_ADJUST,
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | GEsc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | @ | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
QK_GESC, 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 ,
KC_AT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | GEsc | A | R | S | T | D | H | N | E | I | O | ' |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | @ | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
QK_GESC, 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 ,
KC_AT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | GEsc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | @ | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = LAYOUT_ortho_4x12(
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
QK_GESC, 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 ,
KC_AT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | F1 | F2 | F3 | F4 | _ | % | 7 | 8 | 9 | ^ | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F5 | F6 | F7 | F8 | ! | $ | 4 | 5 | 6 | 0 | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F8 | F9 | F10 | F12 | & | # | 1 | 2 | 3 | = | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | / | - | + | * |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4,S(KC_MINS), KC_PERC, KC_7, KC_8, KC_9, KC_CIRC, KC_DEL,
KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, KC_EXLM, KC_DLR, KC_4, KC_5, KC_6, KC_0, KC_PIPE,
_______, KC_F9, KC_F10, KC_F11, KC_F12, KC_AMPR, KC_HASH, KC_1, KC_2, KC_3, KC_EQL, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST
),
/* Raise (Mouse & Media)
* ,-----------------------------------------------------------------------------------.
* | ` | | | MsUp | | { | } | | MsWup| | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | |MsLeft|MsDown|MsRght| ( | ) | Lclk |MsWdwn| Rclk | | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | [ | ] | | | Mute | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
KC_GRV, _______, _______, KC_MS_U, _______, KC_LCBR, KC_RCBR, _______, KC_WH_U, _______, _______, KC_DEL,
KC_DEL, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_LPRN, KC_RPRN, KC_BTN1, KC_WH_D, KC_BTN2, _______, KC_BSLS,
_______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_MUTE, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | Reset| Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
_______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, KC_DEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
}
return true;
}

View File

@ -1,58 +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
#include "../../config.h"
/* Select hand configuration */
// #define MASTER_LEFT
#define MASTER_RIGHT
// #define EE_HANDS
// Define Tap Dance interval
//#define TAPPING_TERM 175
// // Enable LED strip
#undef RGBLED_NUM
#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
#define RGBLED_NUM 10
// Space Cadet
#define LSPO_KEY KC_9
#define RSPC_KEY KC_0
#define DISABLE_SPACE_CADET_ROLLOVER
// Auto Shift settings
#define AUTO_SHIFT_TIMEOUT 165
// #define NO_AUTO_SHIFT_SPECIAL
#endif

View File

@ -1,215 +0,0 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// 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 _QWERTY 0
// #define _COLEMAK 1
// #define _DVORAK 2
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
// COLEMAK,
// DVORAK,
LOWER,
RAISE,
ADJUST,
};
/*
// Tap dance declerations
enum {
TD_GRV_TILD = 0,
};
// Tap dance definitions
tap_dance_action_t tap_dance_actions[] = {
[TD_GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD),
};
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | ` ~ | Q | W | E | R | T | Y | U | I | O | P | Bspc |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Rshift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Lalt | GUI | Esc |Lower |KC_SPC |Enter |Raise | [cmd|] alt |= Hypr| - |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT(
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC,
KC_LCTL, KC_LALT, KC_LGUI, KC_ESC, TG(_LOWER), LT(_ADJUST, KC_SPC), KC_ENT, TG(_RAISE), MT(MOD_RGUI, KC_LBRC), MT(MOD_RALT, KC_RBRC), MT(MOD_HYPR, KC_EQL), KC_MINS
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ESC | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bspc |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT(
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_DEL, 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_MFFD, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | 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_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_MFFD, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | up | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | left | down |right |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | % | ` | ~ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |AShftD|AShftU|REPORT| | | | [ | ] | - | = | \ |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT(
_______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_DEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, KC_LEFT, KC_DOWN, KC_RGHT,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PERC, KC_GRV, KC_TILD,
AS_DOWN, AS_UP, AS_RPT, _______, _______, _______, _______, KC_RBRC, KC_LBRC, KC_MINS, KC_EQL, KC_BSLS
)
};
/* #ifdef AUDIO_ENABLE
* float tone_qwerty[][2] = SONG(QWERTY_SOUND);
* float tone_dvorak[][2] = SONG(DVORAK_SOUND);
* float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif */
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 LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
};
#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF);
#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF);
#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF);
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
#define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF);
layer_state_t layer_state_set_user(layer_state_t state) {
#ifdef RGBLIGHT_ENABLE
uint8_t default_layer = eeconfig_read_default_layer();
if (rgb_layer_change) {
switch (get_highest_layer(state)) {
case _RAISE:
rgblight_set_orange;
rgblight_mode(5);
break;
case _LOWER:
rgblight_set_teal;
rgblight_mode(5);
break;
case _ADJUST:
rgblight_set_purple;
rgblight_mode(23);
break;
default:
if (default_layer & (1UL << _COLEMAK)) {
rgblight_set_magenta;
}
else if (default_layer & (1UL << _DVORAK)) {
rgblight_set_green;
}
else {
rgblight_set_blue;
}
rgblight_mode(1);
break;
}
}
#endif
return state;
}

View File

@ -1,3 +0,0 @@
AUTO_SHIFT_ENABLE = yes
RGBLIGHT_ENABLE = yes

View File

@ -1,34 +0,0 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
Copyright 2019 Gergely Peidl
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
// RGB lighting
#define RGBLIGHT_SLEEP
#undef RGBLED_NUM
#define RGBLED_NUM 32
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define TAPPING_TERM 200

View File

@ -1,343 +0,0 @@
#include QMK_KEYBOARD_H
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_NUMPAD,
_ADJUST
};
enum custom_keycodes {
NUMPAD = SAFE_RANGE,
SLIGHTLY,
SMILE,
JOY,
RELAXED,
HEART,
SAD,
CRY,
NETRURAL,
SCREAM,
THUMBSUP
};
enum td_extra_keys {
U,
O,
NEXTPREV,
SLASH
};
typedef struct {
bool is_press_action;
int state;
} tap;
enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3,
DOUBLE_HOLD = 4,
DOUBLE_SINGLE_TAP = 5, //send two single taps
TRIPLE_TAP = 6,
TRIPLE_HOLD = 7
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
int cur_dance (tap_dance_state_t *state);
void u_finished (tap_dance_state_t *state, void *user_data);
void o_finished (tap_dance_state_t *state, void *user_data);
uint8_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------. ,-----------------------------------------.
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Ctrl | ALT |Numpad| GUI |Lower | Space| | Bksp |Raise | Left | Down | Up |Right |
* `-----------------------------------------' `-----------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS,
KC_ESC, 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, TD(SLASH), KC_ENT,
KC_LCTL, KC_LALT, MO(_NUMPAD), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------. ,-----------------------------------------.
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | = |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | :) | :D | :'D | :$ | <3 | | | Home | Pgup | | { | } | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | :( | :'( | :| | :O | +1 | | | End |Pgdown| | [ | ] |PrntSc|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | |Insert| | Del | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------' `-----------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL,
SLIGHTLY, SMILE, JOY, RELAXED, HEART, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_PIPE,
SAD, CRY, NETRURAL, SCREAM, THUMBSUP, _______, KC_END, KC_PGDN, _______, KC_LBRC, KC_RBRC, KC_PSCR,
_______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, TD(NEXTPREV), 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 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* `-----------------------------------------' `-----------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------. ,-----------------------------------------.
* | Reset|EEPRST| | EE | | | | | UE | IE | OE | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | AE | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* `-----------------------------------------' `-----------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
QK_BOOT, EE_CLR, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______,
_______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Numpad
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | 7 | 8 | 9 | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | 4 | 5 | 6 | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | VAI | SAI | HUI | | | | | 3 | 2 | 1 | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | |RGBMOD|RGBTGL| | Calc | 0 | + | | | |
* `-----------------------------------------' `-----------------------------------------'
*/
[_NUMPAD] = LAYOUT_ortho_4x12(
_______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______,
RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______,
_______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______
)};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case RGB_VAI:
if(record->event.pressed) {
rgblight_increase_val_noeeprom();
}
break;
case RGB_VAD:
if(record->event.pressed) {
rgblight_decrease_val_noeeprom();
}
break;
case RGB_SAI:
if(record->event.pressed) {
rgblight_increase_sat_noeeprom();
}
break;
case RGB_SAD:
if(record->event.pressed) {
rgblight_decrease_sat_noeeprom();
}
break;
case RGB_HUI:
if(record->event.pressed) {
rgblight_increase_hue_noeeprom();
}
break;
case RGB_HUD:
if(record->event.pressed) {
rgblight_decrease_hue_noeeprom();
}
break;
case RGB_TOG:
if(record->event.pressed) {
rgblight_toggle_noeeprom();
}
break;
case RGB_MOD:
if(record->event.pressed) {
rgblight_step_noeeprom();
rgb_mode = rgblight_get_mode();
}
break;
case RGB_RMOD:
if(record->event.pressed) {
rgblight_step_reverse_noeeprom();
rgb_mode = rgblight_get_mode();
}
break;
case SLIGHTLY:
if(record->event.pressed) {
SEND_STRING(":slightly_smiling_face:");
}
break;
case SMILE:
if(record->event.pressed) {
SEND_STRING(":smile:");
}
break;
case JOY:
if(record->event.pressed) {
SEND_STRING(":joy:");
}
break;
case RELAXED:
if(record->event.pressed) {
SEND_STRING(":relaxed:");
}
break;
case HEART:
if(record->event.pressed) {
SEND_STRING(":heart:");
}
break;
case SAD:
if(record->event.pressed) {
SEND_STRING(":white_frowning_face:");
}
break;
case CRY:
if(record->event.pressed) {
SEND_STRING(":cry:");
}
break;
case NETRURAL:
if(record->event.pressed) {
SEND_STRING(":neutral_face:");
}
break;
case SCREAM:
if(record->event.pressed) {
SEND_STRING(":scream:");
}
break;
case THUMBSUP:
if(record->event.pressed) {
SEND_STRING(":+1:");
}
break;
default:
return true;
}
return false;
}
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
writePin(B0, !(state & (1UL << (_NUMPAD))));
switch(get_highest_layer(state)) {
case _RAISE:
rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
break;
case _LOWER:
rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2 - 1);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
break;
case _NUMPAD:
rgblight_setrgb_at(0,255,0, 0);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
break;
default:
rgb_mode = RGBLIGHT_MODE_BREATHING + 1;
rgblight_mode_noeeprom(rgb_mode);
break;
}
return state;
}
void led_set_user(uint8_t usb_led) {
rgblight_sethsv_noeeprom(0, 255, 255);
rgblight_mode_noeeprom(rgb_mode);
}
int cur_dance (tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) return SINGLE_TAP;
//key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
else return SINGLE_HOLD;
}
else if (state->count == 2) {
/*
* DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
* action when hitting 'pp'. Suggested use case for this return value is when you want to send two
* keystrokes of the key, and not the 'double tap' action/macro.
*/
if (state->interrupted) return DOUBLE_SINGLE_TAP;
else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP;
}
//Assumes no one is trying to type the same letter three times (at least not quickly).
//If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
//an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
if (state->count == 3) {
if (state->interrupted || !state->pressed) return TRIPLE_TAP;
else return TRIPLE_HOLD;
}
else return 8; //magic number. At some point this method will expand to work for more presses
}
static tap utap_state = {
.is_press_action = true,
.state = 0
};
static tap otap_state = {
.is_press_action = true,
.state = 0
};
void u_finished (tap_dance_state_t *state, void *user_data) {
utap_state.state = cur_dance(state);
switch(utap_state.state) {
case SINGLE_TAP: SEND_STRING(SS_RALT("]")); break;
case DOUBLE_TAP: SEND_STRING(SS_RALT("-")); break;
case TRIPLE_TAP: SEND_STRING(SS_RALT("\\")); break;
}
}
void o_finished (tap_dance_state_t *state, void *user_data) {
otap_state.state = cur_dance(state);
switch(otap_state.state) {
case SINGLE_TAP: SEND_STRING(SS_RALT("=")); break;
case DOUBLE_TAP: SEND_STRING(SS_RALT("0")); break;
case TRIPLE_TAP: SEND_STRING(SS_RALT("[")); break;
}
}
tap_dance_action_t tap_dance_actions[] = {
[U] = ACTION_TAP_DANCE_FN(u_finished),
[O] = ACTION_TAP_DANCE_FN(o_finished),
[NEXTPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV),
[SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLS)
};

View File

@ -1,3 +0,0 @@
# Personal Layout
[Layout](http://www.keyboard-layout-editor.com/#/gists/8eae83bfb830d847c94c7ff423bbdc84)

View File

@ -1,3 +0,0 @@
RGBLIGHT_ENABLE = yes
TAP_DANCE_ENABLE = yes

View File

@ -1,33 +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
/* Select hand configuration */
// #define MASTER_LEFT
// #define MASTER_RIGHT
#define EE_HANDS
// smooth mousekeys (copied from the ergo ez config)
#define MOUSEKEY_INTERVAL 16
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0

View File

@ -1,196 +0,0 @@
#include QMK_KEYBOARD_H
enum layer_names {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_UTIL,
_MOUSE,
_ADJUST,
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define UTIL MO(_UTIL)
#define MOUSE MO(_MOUSE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Util | Ctrl | Alt | GUI |Lower | Space |Raise | Mouse| Mouse| | Util |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_4x12(
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_ESC, 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 ,
UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, UTIL
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | ' |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Util | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Mouse| Mouse| | |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_ortho_4x12(
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_ESC, 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 ,
UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, XXXXXXX
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Util | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Mouse| Mouse| | |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = LAYOUT_ortho_4x12(
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
KC_ESC, 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 ,
UTIL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, MOUSE, MOUSE, XXXXXXX, XXXXXXX
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_DEL, 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,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
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_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_NUHS, KC_NUBS, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Util
* ,-----------------------------------------------------------------------------------.
* | | | | | | Reset|Reset | | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | LEFT | DOWN | UP | RGHT | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_UTIL] = LAYOUT_ortho_4x12(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
/* Mouse
* ,-----------------------------------------------------------------------------------.
* | | | M Up | | | | | | |L Clk |R Clk | W Up |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | |M Left|M Down|M Rght| | | | | | | |W Down|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_MOUSE] = LAYOUT_ortho_4x12(
XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, KC_WH_U,
XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
_______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
}
return true;
}

View File

@ -1 +0,0 @@
MOUSEKEY_ENABLE = yes

View File

@ -1,44 +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
#include "../../config.h"
/* Select hand configuration */
// #define MASTER_LEFT
// #define MASTER_RIGHT
#define EE_HANDS
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 1000
#undef LEADER_TIMEOUT
#define LEADER_TIMEOUT 1000
#undef TAPPING_TERM
#define TAPPING_TERM 200
#undef TAPPING_TOGGLE
#define TAPPING_TOGGLE 2
#endif

View File

@ -1,180 +0,0 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// 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 _COLE 0
#define _LOWER 1
#define _RAISE 2
#define _AUX 16
/* Layers */
enum
{
COLE = 0,
LOWER, // right hand 10 key.
RAISE, // left hand Fn, right hand symbols.
AUX,
};
/* Tap Dancery */
enum
{
TD_BTK,
TD_TDE,
TD_LPRN,
TD_RPRN,
TD_MIN,
TD_USC,
};
bool time_travel = false;
// Fillers to make layering more clear
#define ____ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | ' " `| Q | W | F | P | G | J | L | U | Y | = + | ~ ; :|
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ( [ {| A | R | S | T | D | H | N | E | I | O | ) ] }|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | - , <| Z | X | C | V | B | K | M | ? | | | ^ | _ . >|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Lower |Raise | Ctrl | Alt | Bksp | Spc |Enter |LShft | ESC | < | v | > |
* `-----------------------------------------------------------------------------------'
*/
[_COLE] = LAYOUT(
TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE),
TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN),
TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC),
LOWER, RAISE, OSM(MOD_LCTL), OSM(MOD_LALT), KC_SPC, KC_BSPC, KC_ENT, OSM(MOD_LSFT), KC_ESC, KC_LEFT, KC_DOWN, KC_RGHT),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ---- | ---- | ---- | ---- | ---- | ---- | 7 | 8 | 9 | * | / | ^ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ---- | ---- | ---- | ---- | ---- | ---- | 4 | 5 | 6 | + | - | ---- |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | ---- | ---- | ---- | ---- | ---- | ---- | 1 | 2 | 3 | = | ---- | ---- |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ---- | ---- | ---- | ---- | ---- | ---- | ---- | 0 | . | ---- | ---- | ---- |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT(
____, ____, ____, ____, ____, ____, KC_7, KC_8, KC_9, KC_PAST, KC_PSLS, KC_CIRC,
____, ____, ____, ____, ____, ____, KC_4, KC_5, KC_6, KC_PPLS, KC_PMNS, ____,
____, ____, ____, ____, ____, ____, KC_1, KC_2, KC_3, KC_PEQL, ____, ____,
____, ____, ____, ____, ____, ____, ____, KC_0, KC_MNXT, ____, ____, ____),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | ! | @ | # | $ | % | ` ~ |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | F7 | F8 | F9 | F10 | F11 | F12 | ^ | & | * | ( | ) | - _ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | ____ | ____ | ____ | ____ | ____ | ____ | [ { | ] } | \ | | ; : | ' " | = + |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | , < | . > | / ? |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL,
____, ____, ____, ____, ____, ____, ____, ____, ____, KC_COMM, KC_DOT, KC_SLSH),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | Reset| ____ | ____ | ____ | ____ | ____ | ____ | LOCK | ____ | ____ | ____ | VUP |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ____ | ____ | RUN | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | VDWN |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | PGUP | MUTE |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | HOME | PGDN | END |
* `-----------------------------------------------------------------------------------'
*/
[_AUX] = LAYOUT(
QK_BOOT, ____, ____, ____, ____, ____, ____, LGUI(KC_L), ____, ____, ____, KC_VOLU,
____, ____, LGUI(KC_R), ____, ____, ____, ____, ____, ____, ____, ____, KC_VOLD,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_MUTE,
____, ____, ____, ____, KC_TAB, KC_DEL, ____, ____, ____, KC_HOME, KC_PGDN, KC_END)
};
tap_dance_action_t tap_dance_actions[] = {
[TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV),
[TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD),
[TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN),
[TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN),
[TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS),
[TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS)};
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
};
void matrix_scan_user(void){};
void matrix_init_user(void){};
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
switch (keycode)
{
case COLE:
if (record->event.pressed)
{
persistent_default_layer_set(1UL << _COLE);
}
return false;
break;
case LOWER:
if (record->event.pressed)
{
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _AUX);
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _AUX);
}
return false;
break;
case RAISE:
if (record->event.pressed)
{
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _AUX);
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _AUX);
}
return false;
break;
case AUX:
if (record->event.pressed)
{
layer_on(_AUX);
}
else
{
layer_off(_AUX);
}
return false;
break;
}
return true;
}

View File

@ -1,22 +0,0 @@
# 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
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
TAP_DANCE_ENABLE = yes
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
SWAP_HANDS_ENABLE = no # Enable one-hand typing
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

View File

@ -1,209 +0,0 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// 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 _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
ADJUST,
};
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 | ; |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Shift||
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Alt | Gui |Caps |Lower |Space |Space |Raise | [ | ] | - |Ctrl |
* `-----------------------------------------------------------------------------------'
*/
[_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_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT ,
ADJUST, KC_LALT, KC_LGUI, KC_CAPS, LOWER, KC_SPC, KC_SPC, RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_RCTL
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | 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_ESC, 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_LALT, KC_LGUI, KC_CAPS, LOWER, KC_SPC, KC_SPC, RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_RCTL
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | 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_BSPC,
KC_ESC, 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_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | 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_DEL,
KC_DEL, 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,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT(
_______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
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) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

View File

@ -1,113 +0,0 @@
/*
This is the c configuration file for the keymap
Copyright 2022 Christopher Bunn <mypetyak@users.noreply.github.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
// 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_names {
_COLEMAK,
_LOWER,
_RAISE,
_ADJUST
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Esc | Q | W | F | P | G | J | L | U | Y | ; | : |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Ctrl | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Tab | GUI | Opt |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_ortho_4x12(
QK_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_COLN,
LCTL_T(KC_TAB), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC,
ADJUST, _______, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_DEL, 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, S(KC_NUHS), S(KC_NUBS), _______, _______, KC_ENT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
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_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_NUHS, KC_NUBS, _______, _______, KC_ENT,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* |Reset | Flash| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | | |Colemk| | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
QK_REBOOT, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}

View File

@ -1,32 +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
#include "../../config.h"
/* Select hand configuration */
// #define MASTER_LEFT
// #define _MASTER_RIGHT
#define EE_HANDS
#endif

View File

@ -1,209 +0,0 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// 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 _NORMAN 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 3
// To be used in process_record_user
enum custom_keycodes {
NORMAN = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
SH_LOG,
SH_GOUP,
SH_TERM,
SPOT,
SLACK,
OUTLOOK,
CHROME
};
// Mod taps
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control
// Custom macros
#define SCN_SHT LSFT(LGUI(KC_4)) // Take a screenshot (MacOS)
#define SCN_LCK LCTL(LGUI(KC_Q)) // Lock screen (MacOS)
#define SH_HOME LCTL(KC_A) // Go to start of line
#define SH_END LCTL(KC_E) // Go to end of line
#define SH_RSCH LCTL(KC_R) // Search command history
#define SH_CLRH LCTL(KC_U) // Erase to beginning of line
#define SH_CLRE LCTL(KC_K) // Erase to end of line
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Norman
* ,-----------------------------------------. ,-----------------------------------------.
* | Tab | Q | W | D | F | K | | J | U | R | L | ; | Bksp |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |CtlEsc| A | S | E | T | G | | Y | N | I | O | H | ' |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | | P | M | , | . | / |SftEnt|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right|
* `-----------------------------------------' `-----------------------------------------'
*/
[_NORMAN] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSPC,
CTL_ESC, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT,
SCN_LCK, KC_HOME, KC_END, KC_LALT, LOWER, KC_LGUI, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------. ,-----------------------------------------.
* | Tab | F1 | F2 | F3 | F4 | | |NumLck| 7 | 8 | 9 | = | Bksp |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |CtlEsc| F5 | F6 | F7 | F8 | | | * | 4 | 5 | 6 | + | Del |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | - |SftEnt|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| |
* `-----------------------------------------' `-----------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_NUM, KC_P7, KC_P8, KC_P9, KC_PEQL, _______,
_______, KC_F5, KC_F6, KC_F8, KC_F9, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_DEL,
_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______,
_______, _______, _______, _______, _______, _______, KC_PDOT, _______, KC_P0, SPOT, CHROME, XXXXXXX
),
/* Raise
* ,-----------------------------------------. ,-----------------------------------------.
* | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right|
* `-----------------------------------------' `-----------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
_______, SH_LOG, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV,
_______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | Reset| |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | AudOn|AudOff| | |Norman| | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | Lower| | | | Raise| | | | |
* `-----------------------------------------' `-----------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, XXXXXXX, NORMAN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
)
};
#ifdef AUDIO_ENABLE
float tone_norman[][2] = SONG(QWERTY_SOUND);
#endif
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) {
if (record->event.pressed) {
switch(keycode) {
case NORMAN:
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_norman);
#endif
persistent_default_layer_set(1UL<<_NORMAN);
return false;
case LOWER:
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
return false;
case RAISE:
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
return false;
case ADJUST:
layer_on(_ADJUST);
return false;
case SH_LOG: // Open Jira log work window
SEND_STRING(SS_TAP(X_DOT));
_delay_ms(100);
SEND_STRING("log work");
_delay_ms(100);
SEND_STRING(SS_TAP(X_ENTER));
return false;
case SH_GOUP: // Go up a directory
SEND_STRING("cd .."SS_TAP(X_ENTER));
return false;
case SH_TERM: // Open Terminal
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE)));
_delay_ms(100);
SEND_STRING("terminal");
_delay_ms(100);
SEND_STRING(SS_TAP(X_ENTER));
return false;
case SPOT: // Open Spotify
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE)));
_delay_ms(100);
SEND_STRING("spotify app");
_delay_ms(100);
SEND_STRING(SS_TAP(X_ENTER));
return false;
case SLACK: // Open Slack
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE)));
_delay_ms(100);
SEND_STRING("slack");
_delay_ms(100);
SEND_STRING(SS_TAP(X_ENTER));
return false;
case OUTLOOK: // Open MS Outlook
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE)));
_delay_ms(100);
SEND_STRING("outlook");
_delay_ms(100);
SEND_STRING(SS_TAP(X_ENTER));
return false;
case CHROME: // Open Chrome
SEND_STRING(SS_LGUI(SS_TAP(X_SPACE)));
_delay_ms(100);
SEND_STRING("chrome");
_delay_ms(100);
SEND_STRING(SS_TAP(X_ENTER));
return false;
}
} else {
switch(keycode) {
case LOWER:
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
return false;
case RAISE:
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
return false;
case ADJUST:
layer_off(_ADJUST);
return false;
}
}
return true;
}

View File

@ -1,86 +0,0 @@
# normacos
This keymap was designed specifically to be used on a MacOS High Sierra system with constant use of the Terminal, as it includes a multitude of macros for both the terminal as well as Spotlight Search.
Norman keyboard layout [info page.](https://normanlayout.info/)
Some Norman layout keys were placed on different layers and different positions based on available space and preference.
Macros:
- CtlEsc sends Escape when tapped, and Control when held.
- SftEnt sends Enter when tapped, and Shift when held.
- Lock locks the computer
- Slack opens Slack through Spotlight Search
- Term opens Terminal through Spotlight Search
- Spot opens Spotify through Spotlight Search
- Chrome opens Chrome through Spotlight Search
- OutLk opens Microsoft Outlook through Spotlight Search
- ScnSht allows the user to take a screenshot of a selected portion of the screen
- ClrHom clears Terminal line from beginning of line up to cursor
- ClrEnd clears Terminal line from cursor up to end of line
- ShHome moves Terminal cursor to beginning of line
- ShEnd moves Terminal cursor to end of line
- Search activates Terminal Reverse Search Command History
- Log opens the 'Log Work' modal on Atlassian's Jira web client
- UpDir moves working directory to its parent
All macros that make use of the SEND_STRING command have a 100 millisecond wait before and after "writing" to let the computer/OS/app catch up.
Any and all empty keys shown below are will be set in the future, and do nothing as of the time of this writing.
## Default (Norman)
```
,-----------------------------------------. ,-----------------------------------------.
| Tab | Q | W | D | F | K | | J | U | R | L | ; | Bksp |
|------+------+------+------+------+------| |------+------+------+------+------+------|
|CtlEsc| A | S | E | T | G | | Y | N | I | O | H | ' |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Shift| Z | X | C | V | B | | P | M | , | . | / |SftEnt|
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right|
`-----------------------------------------' `-----------------------------------------'
```
## Lower
```
,-----------------------------------------. ,-----------------------------------------.
| Tab | F1 | F2 | F3 | F4 | | |NumLck| 7 | 8 | 9 | = | Bksp |
|------+------+------+------+------+------| |------+------+------+------+------+------|
|CtlEsc| F5 | F6 | F7 | F8 | | | * | 4 | 5 | 6 | + | Del |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Shift| F9 | F10 | F11 | F12 | | | / | 1 | 2 | 3 | - |SftEnt|
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| |
`-----------------------------------------' `-----------------------------------------'
```
## Raise
```
,-----------------------------------------. ,-----------------------------------------.
| Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
|------+------+------+------+------+------| |------+------+------+------+------+------|
|CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt|
|------+------+------+------+------+------| |------+------+------+------+------+------|
| Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right|
`-----------------------------------------' `-----------------------------------------'
```
## Adjust (Lower + Raise)
```
,-----------------------------------------. ,-----------------------------------------.
| | | | | | | | | | | | Reset| |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| | | | | AudOn|AudOff| | |Norman| | | | |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| | | | | | | | | | | | | |
|------+------+------+------+------+------| |------+------+------+------+------+------|
| | | | | Lower| | | | Raise| | | | |
`-----------------------------------------' `-----------------------------------------'
```

View File

@ -1,35 +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
#define MASTER_LEFT
#undef RGBLED_NUM
#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
#define RGBLED_NUM 8

Some files were not shown because too many files have changed in this diff Show More