Remove obvious user keymaps, keyboards/{i,j,k}* edition (#23102)

This commit is contained in:
Joel Challis 2024-02-18 08:20:57 +00:00 committed by GitHub
parent 2d1aed78a6
commit 2eb9ff8efd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
341 changed files with 0 additions and 21993 deletions

View file

@ -1,19 +0,0 @@
#pragma once
#define FORCE_NKRO
#define MOUSEKEY_DELAY 50
#define MOUSEKEY_INTERVAL 15
#define MOUSEKEY_MAX_SPEED 4
#define MOUSEKEY_TIME_TO_MAX 50
#define MOUSEKEY_WHEEL_MAX_SPEED 1
#define MOUSEKEY_WHEEL_TIME_TO_MAX 50
#define NO_ACTION_FUNCTION
#define NO_ACTION_MACRO
#define NO_ACTION_ONESHOT
#define PERMISSIVE_HOLD
#define TAPPING_TERM 200
#define TAPPING_TOGGLE 2
#define TAP_HOLD_CAPS_DELAY 50

View file

@ -1,79 +0,0 @@
#include QMK_KEYBOARD_H
#define FN MO(L_FN)
#define FN_CAPS LT(L_FN, KC_CAPS)
#define FN_ESC LT(L_FN, KC_ESC)
#define FN_FNLK TT(L_FN)
#define MV_UP LCTL(KC_UP)
#define MV_DOWN LCTL(KC_DOWN)
#define MV_LEFT LCTL(KC_LEFT)
#define MV_RGHT LCTL(KC_RGHT)
#define TOP LCTL(KC_HOME)
#define BOTTOM LCTL(KC_END)
enum keycodes {
CLEAR = SAFE_RANGE,
};
enum layers {
L_BASE,
L_FN,
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case CLEAR:
if (record->event.pressed) {
SEND_STRING(SS_LCTL("a") SS_TAP(X_DELETE));
}
return false;
default:
return true;
}
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base layer
*
* ` 1 2 3 4 5 6 7 8 9 0 - = \ ` PSc
*
* Tab Q W E R T Y U I O P [ ] Bspc Del
*
* FnEsc A S D F G H J K L ; ' Enter PgU
*
* LShift Z X C V B N M , . / RShift PgD
*
* LCtlLGuiLAlt Space RAltFnLk
*
*/
[L_BASE] = LAYOUT(
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_BSLS, KC_GRV, KC_PSCR,
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_BSPC, KC_DEL,
FN_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_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, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Function layer
*
* F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12NLkSLkPau
*
* M2 M M1 M3 StpPlyPrvNxtClearIns
*
* M M M MW Mv Mv Top
*
* MA0MA2MWMW AppVo-Vo+Mut PgUBtm
*
* DtPRDtNA MW HomPgDEnd
*
*/
[L_FN] = 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_NUM, KC_SCRL, KC_PAUS,
_______, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS,
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, MV_LEFT, KC_DOWN, KC_UP, MV_RGHT, _______, _______, _______, TOP,
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, BOTTOM,
_______, _______, _______, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END
),
};

View file

@ -1,6 +0,0 @@
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
COMMAND_ENABLE = yes
CONSOLE_ENABLE = yes
EXTRAKEY_ENABLE = yes
MOUSEKEY_ENABLE = yes
NKRO_ENABLE = yes

View file

@ -1,3 +0,0 @@
#pragma once
#define TAPPING_TERM 200

View file

@ -1,71 +0,0 @@
#include QMK_KEYBOARD_H
// Compile from qmk_firmware folder with the following command:
// $ make kbdfans/kbd67/mkii-soldered:adamdehaven
// Each layer gets a name for readability. 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, and you can also skip them entirely and just use numbers.
#define _QWERTY 0
#define _FN1 1
// Tap Dance Definitions
enum tapdance {
TD_HOME = 0,
TD_END
};
tap_dance_action_t tap_dance_actions[] = {
// Tap once for Home, twice for PageUp
[TD_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_PGUP),
// Tap once for End, twice for PageDown
[TD_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_PGDN)
};
/*
* You can use _______ in place for KC_TRNS (transparent)
* Or you can use XXXXXXX for KC_NO (NOOP)
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: _QWERTY
*
* QK_GESC 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 (2) 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 TD_HOME
*
* 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 TD_END
*
* KC_LSFT (2) KC_Z KC_X KC_C KC_V KC_B KC_N KC_M KC_COMM KC_DOT KC_SLSH KC_RSFT KC_UP MO(_FN1)
*
* KC_LCTL KC_LGUI KC_LALT KC_SPC KC_RALT KC_RCTL KC_LEFT KC_DOWN KC_RGHT
*
*/
[_QWERTY] = LAYOUT_all(
QK_GESC, 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_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, TD(TD_HOME),
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, TD(TD_END),
KC_LSFT, 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, MO(_FN1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* 1: _FN1
*
* QK_BOOT KC_F1 KC_F2 KC_F3 KC_F4 KC_F5 KC_F6 KC_F7 KC_F8 KC_F9 KC_F10 KC_F11 KC_F12 _______ (2) KC_MUTE
*
* _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ KC_PSCR _______ _______ _______ KC_VOLU
*
* _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ KC_VOLD
*
* _______ (2) _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ KC_MPLY _______
*
* _______ _______ _______ _______ _______ _______ KC_MPRV KC_MPLY KC_MNXT
*
*/
[_FN1] = LAYOUT_all(
QK_BOOT, 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_MUTE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_VOLU,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
)
};

View file

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

View file

@ -1,22 +0,0 @@
/* Copyright 2019 dnsnrk
* 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 */
#undef DEBOUNCE
#define DEBOUNCE 8
#undef TAPPING_TOGGLE
#define TAPPING_TOGGLE 2

View file

@ -1,96 +0,0 @@
/* Copyright 2019 dnsnrk
* 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
#define RC_ENT RCTL_T(KC_ENT)
#define LC_CPS LCTL_T(KC_CAPS)
enum {
_LAYER0 = 0,
_LAYER1,
_LAYER2
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT_65_ansi_blocker( /* Base Layer */
KC_ESC, 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_GRV,
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,
LC_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, RC_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, TT(2),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TT(1), KC_LEFT, KC_DOWN, KC_RIGHT),
[_LAYER1] = LAYOUT_65_ansi_blocker( /* FN, RGB Controls */
KC_GRV, 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_PWR,
_______, RGB_TOG, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME,
_______, RGB_RMOD, RGB_SPD, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, RGB_VAI, _______,
_______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI),
[_LAYER2] = LAYOUT_65_ansi_blocker( /* Media, Programming */
_______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_EJCT, _______,
_______, _______, _______, EE_CLR, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______)
};
void set_hsv_at(HSV hsv, uint8_t index);
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool rgb_matrix_indicators_user(void) {
if (rgb_matrix_config.enable) {
HSV hsv = rgb_matrix_config.hsv;
if (host_keyboard_led_state().caps_lock) {
HSV hsv_inv_hue = {hsv.h + 128, hsv.s, hsv.v};
set_hsv_at(hsv_inv_hue, 30);
}
// indicate which higher layer is currently active on which key
HSV hsv1 = {hsv.h - 64, hsv.s, hsv.v};
HSV hsv2 = {hsv.h + 64, hsv.s, hsv.v};
// except when we are in any animated LED mode
if (rgb_matrix_config.mode < RGB_MATRIX_BREATHING || rgb_matrix_config.mode > RGB_MATRIX_JELLYBEAN_RAINDROPS) {
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
keypos_t pos = {col, row};
uint8_t key_layer = layer_switch_get_layer(pos);
uint8_t key_led = g_led_config.matrix_co[row][col];
if (key_led != NO_LED) {
switch(key_layer) {
case _LAYER2:
set_hsv_at(hsv2, key_led);
break;
case _LAYER1:
set_hsv_at(hsv1, key_led);
break;
default:
break;
}
}
}
}
}
// sticky layer indicators regardless of RGB mode. Hardcoded for lack of better idea.
set_hsv_at(hsv1, 63);
set_hsv_at(hsv2, 57);
}
return false;
}
void set_hsv_at(HSV hsv, uint8_t index) {
RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(index, rgb.r, rgb.g, rgb.b);
}

View file

@ -1,41 +0,0 @@
# dnsnrk's KDB67 MKII Layout
* This is a three layer layout wih some consolidated functionality in the second and third layer.
* The keyboard is mostly used on macOS, but also on Linux and therefore it can swap ALT/CMD.
* There are additional CTRL keys for left and right when caps lock or enter key is held.
* Layers can be toggled (tap twice) or actived momentarily (hold).
* There are 2 seperate FN keys to activate layer 1 and 2 separately, indicated by different RGB colors.
* The main custom feature is using RGB to indicate the current active layer for each key. This is best achieved in solid color RGB modes.
## Layer 0
This is the base QUERTY layer.
* Grave is provided in the top right corner.
* Caps lock is tapped once on and off and indicated by hue inverted LED when on.
* Caps lock and enter become CTRL when held.
* Primary Fn in the last row activates layer 1, indicated by hue shifted LED color.
* Secondary Fn right to the up arrow key activates layer 2, indicated by 2nd hue shifted LED color.
* Toggle layers by tapping Fn twice or switch on by holding Fn.
## Layer 1
This layer activates function keys and provides RGB controls. Keys acting on this layer are indicated by an LED color matching the current Fn key's LED color.
* Number keys become equivalent function keys.
* ESC becomes Grave.
* Grave becomes POWER (very useful on macOS only).
* Q toggles RGB.
* WASD for navigating through RGB modes and adjusting speed.
* <> control RGB saturation.
* Arrow keys shift hue and adjust brightness.
* PgUp, PgDown become HOME and END respectively.
* Backspace acts as delete, pipe as insert.
## Layer 2
This layer comprises most macOS media keys at the top row and some additional programming options. Keys acting on this layer are indicated by an LED color matching the current Fn key's LED color.
* N, M swap ALT/CMD for (N)ormal or (M)acOS.
* E resets (E)EPROM.
* R (R)esets keyboard.

View file

@ -1 +0,0 @@
{"keyboard":"kbdfans/kbd67/mkiirgb","keymap":"default_37b6a2a","layout":"LAYOUT_65_ansi_blocker","layers":[["QK_GESC","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_CALC","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","KC_RCTL","KC_LEFT","KC_DOWN","KC_RGHT"],["KC_GRV","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_CALC","KC_CAPS","KC_BTN1","KC_MS_U","KC_BTN2","KC_WH_U","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_UP","KC_PSCR","KC_SCRL","KC_PAUS","QK_BOOT","KC_MYCM","KC_TRNS","KC_MS_L","KC_MS_D","KC_MS_R","KC_WH_D","KC_TRNS","RGB_SAI","RGB_SAD","KC_LEFT","KC_DOWN","KC_RGHT","KC_TRNS","EE_CLR","KC_HOME","KC_LSFT","RGB_TOG","RGB_MOD","RGB_VAI","RGB_VAD","RGB_SPI","RGB_SPD","RGB_HUI","RGB_HUD","KC_TRNS","KC_TRNS","KC_TRNS","KC_VOLU","KC_MUTE","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","TO(2)","KC_MPRV","KC_VOLD","KC_MNXT"],["QK_GESC","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_BSPC","KC_CALC","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(3)","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","KC_TRNS","KC_LEFT","KC_DOWN","KC_RGHT"],["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_DEL","KC_CALC","KC_CAPS","KC_BTN1","KC_MS_U","KC_BTN2","KC_WH_U","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_UP","KC_PSCR","KC_SCRL","KC_PAUS","QK_BOOT","KC_MYCM","KC_TRNS","KC_MS_L","KC_MS_D","KC_MS_R","KC_WH_D","KC_TRNS","RGB_SAI","RGB_SAD","KC_LEFT","KC_DOWN","KC_RGHT","KC_TRNS","EE_CLR","KC_HOME","KC_LSFT","RGB_TOG","RGB_MOD","RGB_VAI","RGB_VAD","RGB_SPI","RGB_SPD","RGB_HUI","RGB_HUD","KC_TRNS","KC_TRNS","KC_TRNS","KC_VOLU","KC_MUTE","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","TO(0)","KC_MPRV","KC_VOLD","KC_MNXT"]],"author":"","notes":""}

View file

@ -1,8 +0,0 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi_blocker(QK_GESC, 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_CALC, 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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_65_ansi_blocker(KC_GRV, 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_CALC, KC_CAPS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_MYCM, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, RGB_SAI, RGB_SAD, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, EE_CLR, KC_HOME, KC_LSFT, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(2), KC_MPRV, KC_VOLD, KC_MNXT),
[2] = LAYOUT_65_ansi_blocker(QK_GESC, 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_BSPC, KC_CALC, 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(3), 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, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT),
[3] = LAYOUT_65_ansi_blocker(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_DEL, KC_CALC, KC_CAPS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_MYCM, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, RGB_SAI, RGB_SAD, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, EE_CLR, KC_HOME, KC_LSFT, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_MPRV, KC_VOLD, KC_MNXT)
};

View file

@ -1 +0,0 @@
[["QK_GESC", "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_CALC", "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", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["KC_GRV", "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_CALC", "KC_CAPS", "KC_BTN1", "KC_MS_U", "KC_BTN2", "KC_WH_U", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SCRL", "KC_PAUS", "QK_BOOT", "KC_MYCM", "KC_TRNS", "KC_MS_L", "KC_MS_D", "KC_MS_R", "KC_WH_D", "KC_TRNS", "RGB_SAI", "RGB_SAD", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "EE_CLR", "KC_HOME", "KC_LSFT", "RGB_TOG", "RGB_MOD", "RGB_VAI", "RGB_VAD", "RGB_SPI", "RGB_SPD", "RGB_HUI", "RGB_HUD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "TO(2)", "KC_MPRV", "KC_VOLD", "KC_MNXT"], ["QK_GESC", "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_BSPC", "KC_CALC", "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(3)", "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", "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["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_DEL", "KC_CALC", "KC_CAPS", "KC_BTN1", "KC_MS_U", "KC_BTN2", "KC_WH_U", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SCRL", "KC_PAUS", "QK_BOOT", "KC_MYCM", "KC_TRNS", "KC_MS_L", "KC_MS_D", "KC_MS_R", "KC_WH_D", "KC_TRNS", "RGB_SAI", "RGB_SAD", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "EE_CLR", "KC_HOME", "KC_LSFT", "RGB_TOG", "RGB_MOD", "RGB_VAI", "RGB_VAD", "RGB_SPI", "RGB_SPD", "RGB_HUI", "RGB_HUD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "TO(0)", "KC_MPRV", "KC_VOLD", "KC_MNXT"]]

View file

@ -1,54 +0,0 @@
# Layout description
* This layout features 4 layers. The caps lock key has been replaced by the FN key.
* The first layer features ESC/~ and numbers and symbols on the top row of the keyboard.
* The top right key launches calculator.
* Pressing the FN key activates a temporary second layer. This layer contains:
* ESC/~ is now `/~
* WASD to move your mouse up, left, down, right respectively.
* Q and E click left and right mouse respectively.
* R and F scroll mousewheel up and down respectively.
* IJKL act as up, left, down, right arrows respectively.
* UP/DOWN keys act as volume UP/DOWN
* LEFT/RIGHT keys act as previous/next track.
* The key below the calculator key launches 'This PC'
* RGB Controls
* Z toggles ON/OFF
* X toggles RGB_MODE
* C and V increase/decrease brightness
* B and N increase/decrease effect
* M and , increase/decrease hue
* H and J increase/decrease saturation
* Pressing RIGHT CTRL whilst holding the FN key allows you to swap to the third layer.
* This layer can switch to the fourth layer by holding the FN key.
* The third and fourth layer are essentially copies of the first and second layer and offer the same functionalities, however the third and fourth layer have the F-keys and Num/Symbol keys swapped.
## Layer 0
![](https://i.imgur.com/9U9PaTw.png)
## Layer 1
![](https://i.imgur.com/rqqjiyn.png)
## Layer 2
![](https://i.imgur.com/A7YkrTF.png)
## Layer 3
![](https://i.imgur.com/sxJ1ocF.png)
# Generated Keymap Layout
This layout was generated by the QMK API. You can find the JSON data used to
generate this keymap in the file layers.json.
To make use of this file you will need follow the following steps:
* Download or Clone QMK Firmware: <https://github.com/qmk/qmk_firmware/>
* Extract QMK Firmware to a location on your hard drive
* Copy this folder into %s
* You are now ready to compile or use your keymap with the source
More information can be found in the QMK docs: <https://docs.qmk.fm>

View file

@ -1,29 +0,0 @@
/* Copyright 2021 Pascal Pfeil
*
* 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
/* 1000Hz USB polling */
#define USB_POLLING_INTERVAL_MS 1
/* Force NKRO on boot up */
#define FORCE_NKRO
#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_SLEEP
# undef RGB_MATRIX_TIMEOUT
# define RGB_MATRIX_TIMEOUT 900000
#endif

View file

@ -1,48 +0,0 @@
/* Copyright 2021 Pascal Pfeil
*
* 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] = {
[0] = LAYOUT_65_ansi_blocker(
QK_GESC, 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_PSCR,
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_LGUI, KC_LALT, LT(1, KC_SPC), KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
),
[1] = LAYOUT_65_ansi_blocker(
QK_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, BS_NORM, RGB_VAI,
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, BS_SWAP, RGB_HUI,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_SPI,
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, RGB_MOD,
KC_TRNS, AG_NORM, AG_SWAP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_65_ansi_blocker(
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT_65_ansi_blocker(
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};

View file

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

View file

@ -1,41 +0,0 @@
/* Copyright 2022 spx01 (@spx01)
*
* 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
/* --- custom defines only used in my own code --- */
/* easily switch on debugging features */
#define CUSTOM_DEBUG false
/* hexrgb mode special keys, these shouldn't be KC_A to KC_F or KC_0 to KC_9 */
/* keycode that triggers saving the current rgb_static color into eeprom */
#define HEXRGB_SAVE_KC KC_S
/* keycode that triggers resetting rgb_static to the color saved in the eeprom */
#define HEXRGB_RESET_KC KC_R
/* --- keyboard configuration macros --- */
#if CUSTOM_DEBUG
# define NO_DEBUG
# define NO_PRINT
#endif
#define RETRO_TAPPING
#define PERMISSIVE_HOLD
#undef RGB_MATRIX_DEFAULT_MODE
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CUSTOM_RGB_STATIC

View file

@ -1,158 +0,0 @@
/* Copyright 2022 spx01 (@spx01)
*
* 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 "print.h"
enum CustomKeycodes {
CK_HEXRGB = SAFE_RANGE,
/* esc when shift is held, grave otherwise; particularly useful for windows' task manager shortcut */
CK_ESCG,
};
enum Layers {
_LAYER1,
_LAYER2,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format off
[_LAYER1] = LAYOUT_65_ansi_blocker(
QK_GESC, 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,
LT(_LAYER2, 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_LEFT, KC_DOWN, KC_RIGHT),
[_LAYER2] = LAYOUT_65_ansi_blocker(
CK_ESCG, 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_INS,
KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, QK_BOOT, 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_MUTE, KC_TRNS, KC_TRNS, CK_HEXRGB, KC_MPLY, KC_VOLU, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
/* [] = LAYOUT_65_ansi_blocker(
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), */
// clang-format on
};
/* exported by the rgb_static effect */
void RGB_STATIC_save_eeprom(void);
void RGB_STATIC_reset(void);
extern uint8_t g_rgb_static_color[3];
/* returns number corresponding to hex digit represented by keycode or -1 if keycode isn't a valid hex digit */
static int8_t key_hexdigit(uint16_t keycode) {
if (keycode >= KC_A && keycode <= KC_F) {
return keycode - KC_A + 10;
}
if (keycode >= KC_1 && keycode <= KC_0) {
int8_t res = keycode - KC_1 + 1;
/* mod 10 considering res is between 1 and 10 */
res *= res != 10;
return res;
}
return -1;
}
typedef struct {
bool active;
uint8_t color[3];
uint8_t count;
} RGBHexState;
static RGBHexState hexrgb;
/* handles input mode for an rgb value */
static void hexrgb_input(uint16_t keycode) {
/* only check for special keys when input mode has just been triggered */
if (hexrgb.count == 0) {
switch (keycode) {
case HEXRGB_SAVE_KC:
RGB_STATIC_save_eeprom();
hexrgb.active = false;
return;
case HEXRGB_RESET_KC:
RGB_STATIC_reset();
hexrgb.active = false;
return;
default:
}
}
int8_t digit = key_hexdigit(keycode);
/* exit input mode if an invalid key has been pressed */
if (digit == -1) {
hexrgb.count = 0;
hexrgb.active = false;
return;
}
/* append digit to current color */
uint8_t idx = hexrgb.count / 2;
hexrgb.color[idx] <<= 4;
hexrgb.color[idx] |= digit;
++hexrgb.count;
/* done with input */
if (hexrgb.count == 6) {
hexrgb.active = false;
hexrgb.count = 0;
/* copy color to rgb_static's buffer */
for (int8_t i = 0; i < 3; ++i) {
g_rgb_static_color[i] = hexrgb.color[i];
hexrgb.color[i] = 0;
}
}
}
void keyboard_post_init_user(void) {
#if CUSTOM_DEBUG
debug_enable = true;
debug_matrix = true;
#endif
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
/* shift status last time ck_escg was pressed so that the correct key can be released */
static bool ck_escg_last_shifted;
if (hexrgb.active && record->event.pressed) {
hexrgb_input(keycode);
/* while in input mode nothing passes through */
return false;
}
switch (keycode) {
case CK_HEXRGB:
hexrgb.active = record->event.pressed;
return false;
case CK_ESCG:
/* if pressed, inject key, otherwise delete it */
if (record->event.pressed) {
bool shifted = get_mods() & MOD_BIT(KC_LSFT);
add_key(shifted ? KC_ESC : KC_GRV);
ck_escg_last_shifted = shifted;
} else {
del_key(ck_escg_last_shifted ? KC_ESC : KC_GRV);
}
send_keyboard_report();
return false;
default:
}
return true;
}

View file

@ -1,23 +0,0 @@
# spx01's KBD67 MKIIRGB Layout
This is a fairly simple QWERTY 2 layer layout, full list of particularities below:
* Besides Fn acting like a standard layer switch, CapsLock is set to switch to layer 2 while held and activate CapsLock when tapped.
* The Esc key/grave key (top left) is set to QMK's "Grave Escape" (sends Esc when tapped alone, Grave when tapped together with Shift/Ctrl/GUI), but on the 2nd layer it's set to the CK_ESCG custom keycode, acting like grave when tapped alone and as Esc when Shift is also held down. This means that there is easy access to both the characters (grave and tilde) and the Esc key while also allowing for shortcuts such as Ctrl+Shift+Esc with Ctrl+Shift+Caps+Esc (the Windows Task Manager shortcut).
* The default RGB Matrix effect is set to a custom one, RGB_STATIC, which sets a solid RGB color based on a global variable, featuring EEPROM saving and automatic loading independent on the HSV EEPROM memory that the standard effects use. This was done in order to accomodate the next feature.
* The HexRGB mode is triggered by pressing the '/' key in the second layer (CK_HEXRGB) and enables the user to type a 6 digit hexadecimal color code that is then stored as the color for the RGB_STATIC effect. If any invalid key is pressed during color input, the keymap will go back to its normal behavior without any changes to RGB.
* Besides keys representing hexadecimal digits (0-9 and a-f), there are also 2 more keys that provide functionality in the HexRGB input mode (only as a first keypress). HEXRGB_SAVE_KC (set by default to S) triggers the RGB_STATIC effect to save the currently set RGB color to EEPROM and the HEXRGB_RESET_KC (set by default to R) resets the RGB color to the one currently saved in EEPROM. These 2 keys can be reassigned in config.h.
Various 2nd layer keys:
* 1 to '+' for F1-12
* P for PrtSc/Print
* Backspace for Delete
* Home (top right key) for Insert
* E for resetting EEPROM
* '\\' for bootloader mode
* Space for toggling RGB on or off
* Right Shift for pausing media
* Left/Right for previous track/next track
* Up/Down for volume up/down
**Note: I disabled VIA in rules.mk because I don't use it, but there is enough memory space for it to be enabled.**

View file

@ -1,68 +0,0 @@
/* Copyright 2022 spx01 (@spx01)
*
* 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/>.
*/
RGB_MATRIX_EFFECT(RGB_STATIC)
#define UNWRAP_RGB_PARAMS(x) x[0], x[1], x[2]
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
/* eeprom saved data structure */
typedef struct {
union {
uint32_t whole;
uint8_t rgb[3];
};
} UserData;
uint8_t g_rgb_static_color[3];
/* save current colors to eeprom */
void RGB_STATIC_save_eeprom(void) {
UserData data = {0};
for (int8_t i = 0; i < 3; ++i) {
data.rgb[i] = g_rgb_static_color[i];
}
eeconfig_update_user(data.whole);
}
/* initialize by loading the eeprom colors */
static void RGB_STATIC_init(void) {
UserData data;
data.whole = eeconfig_read_user();
for (int8_t i = 0; i < 3; ++i) {
g_rgb_static_color[i] = data.rgb[i];
}
}
/* reset colors to eeprom values */
void RGB_STATIC_reset(void) {
RGB_STATIC_init();
}
static bool RGB_STATIC(effect_params_t *params) {
if (params->init) {
RGB_STATIC_init();
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
rgb_matrix_set_color(i, UNWRAP_RGB_PARAMS(g_rgb_static_color));
}
return rgb_matrix_check_finished_leds(led_max);
}
#endif
#undef UNWRAP_RGB_PARAMS

View file

@ -1,4 +0,0 @@
VIA_ENABLE = no
LTO_ENABLE = yes
CONSOLE_ENABLE = no
RGB_MATRIX_CUSTOM_USER = yes