qmk_keymaps/keyboards/crkbd/keymaps/sajenim/keymap.c

139 lines
10 KiB
C
Raw Normal View History

2023-01-16 23:02:14 +08:00
/* Copyright 2022 @ sajenim (https://github.com/sajenim)
*
* 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/>.
*/
2023-01-06 02:03:52 +08:00
2023-01-16 23:02:14 +08:00
#include QMK_KEYBOARD_H
2023-02-03 22:03:06 +08:00
#include <stdio.h>
2023-01-16 23:02:14 +08:00
#include "config.h"
2023-02-19 17:51:22 +08:00
#include "layers.h"
#include "process_record.h"
#include "g/keymap_combo.h"
2023-02-03 22:03:06 +08:00
/* Keymaps */
2023-01-06 02:03:52 +08:00
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
2023-03-30 12:41:27 +08:00
[L_QWERTY] = LAYOUT_split_3x6_3(
2023-01-06 02:03:52 +08:00
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-03-30 12:41:27 +08:00
QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BSPC_DW,
2023-01-06 02:03:52 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
TABCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
2023-01-06 02:03:52 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
OS_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OS_RSFT,
2023-01-06 02:03:52 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
GUI_EXT, BAK_LWR, SPC_EXT, ENT_SFT, DEL_RSE, ALT_EXT
2023-01-06 02:03:52 +08:00
//`--------------------------' `--------------------------'
),
2023-03-30 12:41:27 +08:00
[L_CANARY] = LAYOUT_split_3x6_3(
2023-01-16 23:02:14 +08:00
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-03-30 12:41:27 +08:00
QK_GESC, KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT, BSPC_DW,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
TABCTRL, KC_C, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_A, KC_SCLN,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
OS_LSFT, KC_Q, KC_J, KC_V, KC_D, KC_K, KC_X, KC_H, KC_SLSH, KC_COMM, KC_DOT, OS_RSFT,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
GUI_EXT, BAK_LWR, SPC_EXT, ENT_SFT, DEL_RSE, ALT_EXT
2023-01-16 23:02:14 +08:00
//`--------------------------' `--------------------------'
),
2023-01-06 02:03:52 +08:00
2023-03-30 12:41:27 +08:00
[L_EXTEND] = LAYOUT_split_3x6_3(
2023-01-16 23:02:14 +08:00
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-03-31 15:47:21 +08:00
_______, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
_______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, XXXXXXX,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
KC_5, KC_4, KC_3, KC_2, KC_1, KC_0, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
XXXXXXX, XXXXXXX, XXXXXXX, _______, WZ_CMOD, WZ_PSTE
2023-01-16 23:02:14 +08:00
//`--------------------------' `--------------------------'
),
2023-01-06 02:03:52 +08:00
2023-01-16 23:02:14 +08:00
[L_LOWER] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-03-31 15:47:21 +08:00
KC_VOLU, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
KC_VOLD, KC_MPRV, KC_F4, KC_F5, KC_F6, KC_F11, KC_ASTR, KC_4, KC_5, KC_6, KC_PLUS, KC_EQL,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
KC_MUTE, KC_MPLY, KC_F1, KC_F2, KC_F3, KC_F12, KC_0, KC_1, KC_2, KC_3, KC_DOT, XXXXXXX,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
CK_LOCK, _______, XXXXXXX, _______, _______, XXXXXXX
2023-01-16 23:02:14 +08:00
//`--------------------------' `--------------------------'
),
2023-01-06 02:03:52 +08:00
2023-01-16 23:02:14 +08:00
[L_RAISE] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-03-30 12:41:27 +08:00
XXXXXXX, XXXXXXX, KC_LABK, KC_DLR, KC_RABK, XXXXXXX, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, XXXXXXX,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
KC_MINS, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, KC_SCLN,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
XXXXXXX, XXXXXXX, KC_COLN, KC_ASTR, KC_PLUS, XXXXXXX, XXXXXXX, KC_AMPR, KC_CIRC, KC_TILD, XXXXXXX, XXXXXXX,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, CK_LOCK
2023-01-16 23:02:14 +08:00
//`--------------------------' `--------------------------'
),
2023-01-06 02:03:52 +08:00
2023-01-16 23:02:14 +08:00
[L_ADJUST] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-04-13 12:04:35 +08:00
QK_BOOT, xQWERTY, xCANARY, XXXXXXX, XXXXXXX, AS_TOGG, SC_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, AC_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-03-31 15:47:21 +08:00
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, CM_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WAKE,
2023-01-16 23:02:14 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
2023-03-30 12:41:27 +08:00
XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX
2023-01-16 23:02:14 +08:00
//`--------------------------' `--------------------------'
),
2023-04-12 15:36:21 +08:00
[L_GAMING] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
2023-04-12 18:50:47 +08:00
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC,
2023-04-12 15:36:21 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-04-12 18:50:47 +08:00
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
2023-04-12 15:36:21 +08:00
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-04-12 18:50:47 +08:00
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
2023-04-12 15:36:21 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, GAME_FN, KC_SPC, KC_ENT, XXXXXXX, XXXXXXX
//`--------------------------' `--------------------------'
),
[L_GAMEFN] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
2023-04-12 18:50:47 +08:00
XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
2023-04-12 15:36:21 +08:00
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
//`--------------------------' `--------------------------'
),
2023-01-16 23:02:14 +08:00
};
2023-01-06 02:03:52 +08:00
2023-02-03 22:03:06 +08:00
/* Layer Change */
2023-01-16 23:02:14 +08:00
layer_state_t layer_state_set_user(layer_state_t state) {
2023-02-04 20:40:25 +08:00
state = update_tri_layer_state(state, L_LOWER, L_RAISE, L_ADJUST);
return state;
2023-01-06 02:03:52 +08:00
}
2023-02-03 22:03:06 +08:00
/* Post Init */
void keyboard_post_init_user(void) {
autoshift_disable();
autocorrect_enable();
}