Add personal Doro67 multi keymap, fix bug in KBD6X keymap (#6674)

* Add missing void parameter declarations to *_light functions

* Add doro67/multi:konstantin keymap

* Allow FNLK to be canceled with Esc

* Function layer → Fn layer in keymap comments
daktil_manuform
Konstantin Đorđević 2019-09-05 05:38:54 +02:00 committed by fauxpark
parent df5b2d204b
commit 6d191635d0
8 changed files with 95 additions and 8 deletions

View File

@ -0,0 +1,4 @@
#pragma once
#define LAYER_FN
#define LAYER_NUMPAD

View File

@ -0,0 +1,67 @@
#include QMK_KEYBOARD_H
#include "konstantin.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base layer
*
* Esc 1 2 3 4 5 6 7 8 9 0 - = \ ` PSc
*
* Tab Q W E R T Y U I O P [ ] Bspc Del
*
* FnCaps A S D F G H J K L ; ' Enter PgU
*
* LSftRAG Z X C V B N M , . / RShift PgD
*
* LCtlLGuiLAlt Space FnLk Fn RAlGRCtl
*
*/
[L_BASE] = LAYOUT_multi(
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_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_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, RAL_RGU, 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, FNLK, FN, RAL_RGU, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Fn layer
*
* F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12NumSLkPau
*
* M4 M2 M M1 M3 M5 UCM StpPlyPrvNxtClearIns
*
* M M M MW Top
*
* MA0MA2MWMW AppVo-Vo+Mut PgUBtm
*
* DtPRDtNA MW HomPgDEnd
*
*/
[L_FN] = LAYOUT_multi(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS,
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS,
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP,
_______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, BOTTOM,
_______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END
),
/* Numpad layer
*
* P7 P8 P9 P- = Num
*
* P4 P5 P6 P+ ( )
*
* P1 P2 P3 P* × PEnter
*
* P0 P0 , P. P/ ÷
*
*
*
*/
[L_NUMPAD] = LAYOUT_multi(
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______,
_______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______
),
};

View File

@ -0,0 +1,10 @@
BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = no
COMMAND_ENABLE = yes
CONSOLE_ENABLE = yes
EXTRAKEY_ENABLE = yes
MOUSEKEY_ENABLE = yes
NKRO_ENABLE = yes
SPACE_CADET_ENABLE = no
TAP_DANCE_ENABLE = yes
UNICODEMAP_ENABLE = yes

View File

@ -30,17 +30,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
static inline void fn_light() {
static inline void fn_light(void) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val());
}
static inline void caps_light() {
static inline void caps_light(void) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val());
}
static inline void restore_light() {
static inline void restore_light(void) {
rgblight_config_t saved = { .raw = eeconfig_read_rgblight() };
rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val);
rgblight_mode_noeeprom(saved.mode);
@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX
),
/* Function layer
/* Fn layer
*
* F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12PScIns
*

View File

@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Function layer
/* Fn layer
*
* Num
*

View File

@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
),
/* Function layer
/* Fn layer
*
* SysSLkPauBrkTopBtm
*

View File

@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Function layer
/* Fn layer
*
* F1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12NumSLkPau
*

View File

@ -36,9 +36,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYER_FN
static bool fn_lock = false;
case FNLK:
if (record->event.pressed) {
fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this
}
break;
case FN_FNLK:
if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this
fn_lock = !IS_LAYER_ON(L_FN);
}
break;
#endif