mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 02:30:07 +00:00
[Keymap] Added csc027 keymaps for keebio/iris and planck (#7472)
* Added csc027 user folder and keymaps for both keebio/iris and planck * Moved the git_macros variable out of the process_record_user function. * Updated the usb_led code to use the new led_update_user instead of the led_set_user function. * Update users/csc027/defines.h Removed the "_______" macro definition in defines.h, since it has already been defined in QMK. * Update users/csc027/defines.h Removed the "XXXXXXX" macro definition in defines.h, since it has already been defined in QMK. * Update users/csc027/csc027.c Simplified several keyboard macro definitions in the csc027.c file by switching from SS_LCTRL to SS_LCTL in their definitions. * Condensed both the planck and iris rules files to the minimal set of declarations.
This commit is contained in:
parent
320822d75b
commit
2c14172467
15 changed files with 632 additions and 0 deletions
28
keyboards/keebio/iris/keymaps/csc027/config.h
Normal file
28
keyboards/keebio/iris/keymaps/csc027/config.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
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 USE_I2C
|
||||
#define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
70
keyboards/keebio/iris/keymaps/csc027/keymap.c
Normal file
70
keyboards/keebio/iris/keymaps/csc027/keymap.c
Normal file
|
@ -0,0 +1,70 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include "csc027.h"
|
||||
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = LAYOUT_wrapper(
|
||||
_____________________QWERTY_L1_____________________, _____________________QWERTY_R1_____________________,
|
||||
_____________________QWERTY_L2_____________________, _____________________QWERTY_R2_____________________,
|
||||
_____________________QWERTY_L3_____________________, _____________________QWERTY_R3_____________________,
|
||||
_____________________QWERTY_L4_____________________, KC_SPC, KC_SPC, _____________________QWERTY_R4_____________________,
|
||||
KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI
|
||||
),
|
||||
|
||||
[_RS] = LAYOUT_wrapper(
|
||||
______________________RAISE_L1_____________________, ______________________RAISE_R1_____________________,
|
||||
______________________RAISE_L2_____________________, ______________________RAISE_R2_____________________,
|
||||
______________________RAISE_L3_____________________, ______________________RAISE_R3_____________________,
|
||||
______________________RAISE_L4_____________________, _______, _______, ______________________RAISE_R4_____________________,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_LW] = LAYOUT_wrapper(
|
||||
______________________LOWER_L1_____________________, ______________________LOWER_R1_____________________,
|
||||
______________________LOWER_L2_____________________, ______________________LOWER_R2_____________________,
|
||||
______________________LOWER_L3_____________________, ______________________LOWER_R3_____________________,
|
||||
______________________LOWER_L4_____________________, _______, _______, ______________________LOWER_R4_____________________,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MS] = LAYOUT_wrapper(
|
||||
______________________MOUSE_L1_____________________, ______________________MOUSE_R1_____________________,
|
||||
______________________MOUSE_L2_____________________, ______________________MOUSE_R2_____________________,
|
||||
______________________MOUSE_L3_____________________, ______________________MOUSE_R3_____________________,
|
||||
______________________MOUSE_L4_____________________, _______, _______, ______________________MOUSE_R4_____________________,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_GT] = LAYOUT_wrapper(
|
||||
_______________________GIT_L1______________________, _______________________GIT_R1______________________,
|
||||
_______________________GIT_L2______________________, _______________________GIT_R2______________________,
|
||||
_______________________GIT_L3______________________, _______________________GIT_R3______________________,
|
||||
_______________________GIT_L4______________________, _______, _______, _______________________GIT_R4______________________,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_CN] = LAYOUT_wrapper(
|
||||
___________________CONVENIENCE_L1__________________, ___________________CONVENIENCE_L1__________________,
|
||||
___________________CONVENIENCE_L2__________________, ___________________CONVENIENCE_L2__________________,
|
||||
___________________CONVENIENCE_L3__________________, ___________________CONVENIENCE_L3__________________,
|
||||
___________________CONVENIENCE_L4__________________, _______, _______, ___________________CONVENIENCE_L4__________________,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_GW] = LAYOUT(
|
||||
KC_Y, KC_GRV, KC_1, KC_2, KC_3, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_B, KC_TAB, KC_T, KC_W, KC_4, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_M, MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_I, KC_LCTL, KC_Z, KC_LALT, KC_V, KC_SPC, KC_SPC, _______, KC_N, KC_M, KC_COMM, KC_DOT, TO(_CS), TO(_QW),
|
||||
KC_X, KC_C, KC_SPC, _______, KC_M, KC_B
|
||||
),
|
||||
|
||||
[_CS] = LAYOUT(
|
||||
XXXXXXX, KC_5, KC_1, KC_2, KC_3, KC_4, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC,
|
||||
XXXXXXX, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK,
|
||||
KC_G, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC,
|
||||
XXXXXXX, KC_LCTL, XXXXXXX, KC_X, XXXXXXX, XXXXXXX, KC_SPC, _______, KC_N, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW),
|
||||
KC_B, KC_SPC, KC_SPC, _______, KC_N, KC_P0
|
||||
)
|
||||
};
|
6
keyboards/keebio/iris/keymaps/csc027/rules.mk
Normal file
6
keyboards/keebio/iris/keymaps/csc027/rules.mk
Normal file
|
@ -0,0 +1,6 @@
|
|||
BACKLIGHT_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
LTO_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
88
keyboards/planck/keymaps/csc027/keymap.c
Normal file
88
keyboards/planck/keymaps/csc027/keymap.c
Normal file
|
@ -0,0 +1,88 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include "csc027.h"
|
||||
|
||||
#define LAYOUT_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = LAYOUT_wrapper(
|
||||
_____________________QWERTY_L1_____________________, _____________________QWERTY_R1_____________________,
|
||||
_____________________QWERTY_L2_____________________, _____________________QWERTY_R2_____________________,
|
||||
_____________________QWERTY_L3_____________________, _____________________QWERTY_R3_____________________,
|
||||
_____________________QWERTY_L4_____________________, _____________________QWERTY_R4_____________________
|
||||
),
|
||||
|
||||
[_RS] = LAYOUT_wrapper(
|
||||
______________________RAISE_L1_____________________, ______________________RAISE_R1_____________________,
|
||||
______________________RAISE_L2_____________________, ______________________RAISE_R2_____________________,
|
||||
______________________RAISE_L3_____________________, ______________________RAISE_R3_____________________,
|
||||
______________________RAISE_L4_____________________, ______________________RAISE_R4_____________________
|
||||
),
|
||||
|
||||
[_LW] = LAYOUT_wrapper(
|
||||
______________________LOWER_L1_____________________, ______________________LOWER_R1_____________________,
|
||||
______________________LOWER_L2_____________________, ______________________LOWER_R2_____________________,
|
||||
______________________LOWER_L3_____________________, ______________________LOWER_R3_____________________,
|
||||
______________________LOWER_L4_____________________, ______________________LOWER_R4_____________________
|
||||
),
|
||||
|
||||
[_MS] = LAYOUT_wrapper(
|
||||
______________________MOUSE_L1_____________________, ______________________MOUSE_R1_____________________,
|
||||
______________________MOUSE_L2_____________________, ______________________MOUSE_R2_____________________,
|
||||
______________________MOUSE_L3_____________________, ______________________MOUSE_R3_____________________,
|
||||
______________________MOUSE_L4_____________________, ______________________MOUSE_R4_____________________
|
||||
),
|
||||
|
||||
[_GT] = LAYOUT_wrapper(
|
||||
_______________________GIT_L1______________________, _______________________GIT_R1______________________,
|
||||
_______________________GIT_L2______________________, _______________________GIT_R2______________________,
|
||||
_______________________GIT_L3______________________, _______________________GIT_R3______________________,
|
||||
_______________________GIT_L4______________________, _______________________GIT_R4______________________
|
||||
),
|
||||
|
||||
[_CN] = LAYOUT_wrapper(
|
||||
___________________CONVENIENCE_L1__________________, ___________________CONVENIENCE_R1__________________,
|
||||
___________________CONVENIENCE_L2__________________, ___________________CONVENIENCE_R2__________________,
|
||||
___________________CONVENIENCE_L3__________________, ___________________CONVENIENCE_R3__________________,
|
||||
___________________CONVENIENCE_L4__________________, ___________________CONVENIENCE_R4__________________
|
||||
),
|
||||
|
||||
/* Guild Wars 2 Layer
|
||||
*
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BkSpc|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Sf/Ec| A | S | D | F | G | H | J | K | L | ; |Enter|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Ctl | Z | Alt | X | C |Space|Space| M | B | . |Nxt L|Rst L|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_GW] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT ,
|
||||
KC_LCTL, KC_Z, KC_LALT, KC_X, KC_C, KC_SPC, KC_SPC, KC_M, KC_B, KC_DOT, TO(_CS), TO(_QW)
|
||||
),
|
||||
|
||||
/* CS:GO Layer
|
||||
*
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BkSpc|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Tab | Q | W | E | R | T | Y | 4 | 5 | 6 | |NmLck|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| A | S | D | F | G | H | 1 | 2 | 3 |Enter| Esc |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Ctl | Z | Alt | X | B |Space|Space| 0 | 0 | . |Nxt L|Rst L|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_CS] = LAYOUT_ortho_4x12(
|
||||
XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK,
|
||||
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC ,
|
||||
KC_LCTL, KC_Z, KC_LALT, KC_X, KC_B, KC_SPC, KC_SPC, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW)
|
||||
)
|
||||
};
|
6
keyboards/planck/keymaps/csc027/rules.mk
Normal file
6
keyboards/planck/keymaps/csc027/rules.mk
Normal file
|
@ -0,0 +1,6 @@
|
|||
BOOTMAGIC_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
LTO_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
63
users/csc027/csc027.c
Normal file
63
users/csc027/csc027.c
Normal file
|
@ -0,0 +1,63 @@
|
|||
#include "csc027.h"
|
||||
|
||||
static const char* git_macros[] = {
|
||||
// Make sure that the macro strings match the order they are declared
|
||||
// in the custom_keycodes enum.
|
||||
"git add ",
|
||||
"git branch ",
|
||||
"git checkout ",
|
||||
"git cherry-pick ",
|
||||
"git commit -m \"\""SS_TAP(X_LEFT),
|
||||
"git diff ",
|
||||
"git fetch ",
|
||||
"git grep ",
|
||||
"git log --decorate --oneline --graph ",
|
||||
"git init ",
|
||||
"git mv ",
|
||||
"git merge ",
|
||||
"git push ",
|
||||
"git pull ",
|
||||
"git rebase ",
|
||||
"git remote ",
|
||||
"git reset ",
|
||||
"git show ",
|
||||
"git stash ",
|
||||
"git status ",
|
||||
"git tag ",
|
||||
SS_LCTL(SS_LALT(SS_TAP(X_HOME)))"\t ",
|
||||
SS_LCTL(SS_LALT(SS_TAP(X_HOME)))"\t\t\t ",
|
||||
SS_LCTL(SS_LALT(SS_TAP(X_HOME)))SS_LALT("\t")
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case LOWER:
|
||||
if(record->event.pressed) {
|
||||
layer_on(_LW);
|
||||
update_tri_layer(_LW, _RS, _MS);
|
||||
} else {
|
||||
layer_off(_LW);
|
||||
update_tri_layer(_LW, _RS, _MS);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if(record->event.pressed) {
|
||||
layer_on(_RS);
|
||||
update_tri_layer(_LW, _RS, _MS);
|
||||
} else {
|
||||
layer_off(_RS);
|
||||
update_tri_layer(_LW, _RS, _MS);
|
||||
}
|
||||
return false;
|
||||
case GIT_ADD...MC_ATRD:
|
||||
if(record->event.pressed) {
|
||||
// The calculation here is to make sure that the custom keycode
|
||||
// aligns with the git_macros array.
|
||||
send_string(git_macros[keycode - GIT_ADD]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
49
users/csc027/csc027.h
Normal file
49
users/csc027/csc027.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "defines.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
// Layer Keycodes
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
|
||||
// Git Keycodes
|
||||
GIT_ADD, // Add
|
||||
GIT_BRC, // Branch
|
||||
GIT_CHK, // Checkout
|
||||
GIT_CHR, // Cherry-Pick
|
||||
GIT_CMT, // Commit
|
||||
GIT_DIF, // Diff
|
||||
GIT_FTC, // Fetch
|
||||
GIT_GRP, // Grep
|
||||
GIT_LOG, // Log
|
||||
GIT_INT, // Init
|
||||
GIT_MRG, // Merge
|
||||
GIT_MOV, // Move (mv)
|
||||
GIT_PSH, // Push
|
||||
GIT_PUL, // Pull
|
||||
GIT_RBS, // Rebase
|
||||
GIT_RMT, // Remote
|
||||
GIT_RST, // Reset
|
||||
GIT_SHW, // Show
|
||||
GIT_STH, // Stash
|
||||
GIT_STS, // Status
|
||||
GIT_TAG, // Tag
|
||||
|
||||
// Remote Desktop
|
||||
MC_MRD7, // Minimize Remote Desktop on Windows 7
|
||||
MC_MRD8, // Minimize Remote Desktop on Windows 8+
|
||||
MC_ATRD // Switch windows on local machine from Remote Desktop on Windows
|
||||
};
|
||||
|
||||
enum custom_layers {
|
||||
_QW = 0, // Qwerty
|
||||
_RS, // Raise
|
||||
_LW, // Lower
|
||||
_MS, // Mouse
|
||||
_GT, // Git
|
||||
_CN, // Convenience
|
||||
_GW, // Guild Wars 2
|
||||
_CS // Counter-Strike: Global Offensive
|
||||
};
|
17
users/csc027/custom_audio.c
Normal file
17
users/csc027/custom_audio.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "csc027.h"
|
||||
#include "custom_audio.h"
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
|
||||
float tone_on[][2] = SONG(E__NOTE(_G6));
|
||||
float tone_off[][2] = SONG(E__NOTE(_D5));
|
||||
|
||||
void on_usb_led_off(void) {
|
||||
PLAY_SONG(tone_off);
|
||||
}
|
||||
|
||||
void on_usb_led_on(void) {
|
||||
PLAY_SONG(tone_on);
|
||||
}
|
||||
|
||||
#endif
|
8
users/csc027/custom_audio.h
Normal file
8
users/csc027/custom_audio.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
|
||||
void on_usb_led_off(void);
|
||||
void on_usb_led_on(void);
|
||||
|
||||
#endif
|
25
users/csc027/custom_rgb.c
Normal file
25
users/csc027/custom_rgb.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "csc027.h"
|
||||
#include "custom_rgb.h"
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
uint16_t user_hue = rgblight_get_hue();
|
||||
for (uint16_t i = 0; i < 256; ++i) {
|
||||
rgblight_sethsv_noeeprom((i + user_hue) % 256, 255, 255);
|
||||
wait_ms(5);
|
||||
}
|
||||
rgblight_sethsv_noeeprom(0, 0, 0);
|
||||
}
|
||||
|
||||
void on_usb_led_off(void) {
|
||||
rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() - 85);
|
||||
}
|
||||
|
||||
void on_usb_led_on(void) {
|
||||
rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() + 85);
|
||||
}
|
||||
|
||||
#endif
|
9
users/csc027/custom_rgb.h
Normal file
9
users/csc027/custom_rgb.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
|
||||
void keyboard_post_init_user(void);
|
||||
void on_usb_led_off(void);
|
||||
void on_usb_led_on(void);
|
||||
|
||||
#endif
|
217
users/csc027/defines.h
Normal file
217
users/csc027/defines.h
Normal file
|
@ -0,0 +1,217 @@
|
|||
#pragma once
|
||||
#include "csc027.h"
|
||||
|
||||
#define MC_LCAD LCA(KC_DEL) // Control-Alt-Delete
|
||||
#define MC_RSFE RSFT_T(KC_ENT) // Right Shift on hold, Enter on tap
|
||||
#define MC_LSEC LSFT_T(KC_ESC) // Left Shift on hold, Escape on tap
|
||||
|
||||
#define ________________ KC_TRNS
|
||||
|
||||
/* QWERTY Layer
|
||||
*
|
||||
* The basic layer of this keymap is a QWERTY layer.
|
||||
*
|
||||
* - Modifier keys more closely resemble a standard keyboard's layout.
|
||||
* - There is a "Nxt L" function that cycles through the QWERTY and
|
||||
* game layers. This has been implemented by hard coding the jump to the
|
||||
* next layer in each of the layers using the TO() macro. Currently, the
|
||||
* "Nxt L" function skips over the momentary layers (i.e., Mouse, Git,
|
||||
* Lower, Raise, and Convenience layers).
|
||||
* - There is a "Rst L" function that resets the current layer to the
|
||||
* QWERTY layer.
|
||||
* - The "Git" one shot function goes to the macro layer which has Git
|
||||
* commands implemented.
|
||||
* - The "Convc" momentary function goes to the Convenience layer which has a
|
||||
* tenkey. Note: The tenkey will operate using the secondary functions if
|
||||
* the Number Lock is not enabled (e.g., Left and Right instead of 4 and
|
||||
* 6).
|
||||
* - The Right Shift key also doubles as an Enter key if it is tapped rather
|
||||
* than held.
|
||||
*
|
||||
* ,-----------------------------------. ,-----------------------------------.
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P |BkSpc|
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* |Shift| Z | X | C | V | B | | N | M | , | . | / |Sf/En|
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Git |Nxt L|Rst L|
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
*/
|
||||
|
||||
#define _____________________QWERTY_L1_____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||
#define _____________________QWERTY_L2_____________________ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G
|
||||
#define _____________________QWERTY_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||
#define _____________________QWERTY_L4_____________________ KC_LCTL, KC_LGUI, KC_LALT, MO(_CN), LOWER, KC_SPC
|
||||
|
||||
#define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC
|
||||
#define _____________________QWERTY_R2_____________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
|
||||
#define _____________________QWERTY_R3_____________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC_RSFE
|
||||
#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GW), XXXXXXX
|
||||
|
||||
/* Raise Layer
|
||||
*
|
||||
* The Raise layer accommodates the Home, End, Page Up, and Page Down keys
|
||||
* in what would be the Vim arrow keys positions. This is done as opposed
|
||||
* to using C-D, C-U, 0, $, and ^, because it would require a separate layer.
|
||||
*
|
||||
* - The top row has the shifted versions of the number row, rather than the
|
||||
* numbers themselves. This is a change to have a mnemonic where shifted
|
||||
* elements are on the Raise layer. This also makes it easy to use some of
|
||||
* Vim style movement controls (e.g. $, %), but makes it harder for others
|
||||
* (e.g. ^, (, )). Consider swapping the number row with the shifted number
|
||||
* row if you do not care about the mnemonic.
|
||||
* - The Left Brace, Right Brace, Underscore, and Plus keys have been moved
|
||||
* from the right side to the left side. This will take some getting used
|
||||
* to, as these keys are normally on the right side of the keyboard. An
|
||||
* alternative would be to keep the keys on the right hand side just under
|
||||
* the Parentheses. This would prevent the use of Vim arrow keys however.
|
||||
* - The F keys have been laid across the bottom in the Raise layer, rather
|
||||
* than the Lower layer to allow easy access to the Alt-F4 chord for
|
||||
* Windows. When the F keys were put in the Lower layer, it made it hard
|
||||
* to use this chord, as the Lower key, the Alt key, and the F4 key were
|
||||
* all right next to each other.
|
||||
* - A Delete key has been added in this layer to allow easy access to the
|
||||
* Control-Alt-Delete login chord for Windows.
|
||||
*
|
||||
* ,-----------------------------------. ,-----------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | _ | + | { | } | Caps| | Home| PgDn| PgUp| End | | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
*/
|
||||
|
||||
#define ______________________RAISE_L1_____________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
|
||||
#define ______________________RAISE_L2_____________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CAPS
|
||||
#define ______________________RAISE_L3_____________________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
|
||||
#define ______________________RAISE_L4_____________________ _______, _______, _______, _______, _______, _______
|
||||
|
||||
#define ______________________RAISE_R1_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT
|
||||
#define ______________________RAISE_R2_____________________ KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX
|
||||
#define ______________________RAISE_R3_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______
|
||||
#define ______________________RAISE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
|
||||
|
||||
/* Lower Layer
|
||||
*
|
||||
* The lower layout scheme accommodates the Vim style arrow keys.
|
||||
*
|
||||
* - The arrow keys are in the normal Vim positions.
|
||||
* - The Left Square Bracket, Right Square Bracket, Minus, and Equal keys
|
||||
* have been moved from the right side to the left side. This will take
|
||||
* some getting used to, as it is on the left rather than the right.
|
||||
* - A Delete key has been added in this layer to allow easy access to the
|
||||
* Control-Alt-Delete login chord for Windows.
|
||||
* - The remaining F keys are in this layer.
|
||||
*
|
||||
* ,-----------------------------------. ,-----------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | - | = | [ | ] | | | Left| Down| Up |Right| | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | F11 | F12 | | | | | | | | | | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
*/
|
||||
|
||||
#define ______________________LOWER_L1_____________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
|
||||
#define ______________________LOWER_L2_____________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX
|
||||
#define ______________________LOWER_L3_____________________ _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define ______________________LOWER_L4_____________________ _______, _______, _______, _______, _______, _______
|
||||
|
||||
#define ______________________LOWER_R1_____________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT
|
||||
#define ______________________LOWER_R2_____________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX
|
||||
#define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
|
||||
#define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
|
||||
|
||||
|
||||
/* MIT Layout (Mouse)
|
||||
*
|
||||
* The mouse layer adds keys to use the keyboard like a mouse.
|
||||
*
|
||||
* ,-----------------------------------. ,-----------------------------------.
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | |Ms-Lc|Ms-Rc| | | Ms-L| Ms-D| Ms-U| Ms-R| | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
*/
|
||||
|
||||
#define ______________________MOUSE_L1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define ______________________MOUSE_L2_____________________ _______, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX
|
||||
#define ______________________MOUSE_L3_____________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define ______________________MOUSE_L4_____________________ _______, _______, _______, _______, _______, _______
|
||||
|
||||
#define ______________________MOUSE_R1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define ______________________MOUSE_R2_____________________ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX
|
||||
#define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
|
||||
#define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
|
||||
|
||||
/* MIT Layout (Git)
|
||||
*
|
||||
* The macro layer that has common git commands.
|
||||
*
|
||||
* ,-----------------------------------. ,-----------------------------------.
|
||||
* | |Chery| Show|Rebas|Reset| Tag | | | Pull| Init|Rmote| Push| |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | Add |Sttus| Diff|Fetch| Grep| |Stash| |ChkOt| Log | | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | |Comit| Move|Brnch| | |Merge| | | | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
*/
|
||||
|
||||
#define _______________________GIT_L1______________________ XXXXXXX, GIT_CHR, GIT_SHW, GIT_RBS, GIT_RST, GIT_TAG
|
||||
#define _______________________GIT_L2______________________ _______, GIT_ADD, GIT_STS, GIT_DIF, GIT_FTC, GIT_GRP
|
||||
#define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, GIT_CMT, GIT_MOV, GIT_BRC
|
||||
#define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______
|
||||
|
||||
#define _______________________GIT_R1______________________ XXXXXXX, GIT_PUL, GIT_INT, GIT_RMT, GIT_PSH, XXXXXXX
|
||||
#define _______________________GIT_R2______________________ GIT_STH, XXXXXXX, GIT_CHK, GIT_LOG, XXXXXXX, XXXXXXX
|
||||
#define _______________________GIT_R3______________________ XXXXXXX, GIT_MRG, XXXXXXX, XXXXXXX, XXXXXXX, _______
|
||||
#define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
|
||||
|
||||
|
||||
/* MIT Layout (Convenience)
|
||||
*
|
||||
* The Convenience layer adds a tenkey and miscellaneous chords to the keyboard.
|
||||
* The lack of a fifth row means that some of the tenkey's functions need to be
|
||||
* moved to the left of tenkey from the top.
|
||||
*
|
||||
* - The Number Lock key is physically in the same spot as the Caps Lock key
|
||||
* in the raise layer.
|
||||
* - There is also a Backspace Key for convenience.
|
||||
* - There is a convenience macro to type the Control-Alt-Delete login chord for Windows.
|
||||
* - There is a convenience macro to Minimize Remote Desktop within Remote Desktop
|
||||
* in Windows.
|
||||
* - There is a convenience macro to cycle through programs in Windows.
|
||||
* - There is a convenience macro to go to the previous program in Windows.
|
||||
*
|
||||
* ,-----------------------------------. ,-----------------------------------.
|
||||
* | | |Insrt|ScrLk|PrtSc| | | * | 7 | 8 | 9 | - |BkSpc|
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | App | LCAD|MRDP7|NmLck| | / | 4 | 5 | 6 | + | |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | ATRD|MRDP8| | | | 1 | 2 | 3 |Enter| |
|
||||
* |-----------------------------------| |-----------------------------------|
|
||||
* | | | | | | | | | 0 | 0 | . | | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
*/
|
||||
|
||||
#define ___________________CONVENIENCE_L1__________________ XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PSCR, XXXXXXX
|
||||
#define ___________________CONVENIENCE_L2__________________ _______, XXXXXXX, KC_APP, MC_LCAD, MC_MRD7, KC_NLCK
|
||||
#define ___________________CONVENIENCE_L3__________________ _______, XXXXXXX, XXXXXXX, MC_ATRD, MC_MRD8, XXXXXXX
|
||||
#define ___________________CONVENIENCE_L4__________________ _______, _______, _______, _______, _______, _______
|
||||
|
||||
#define ___________________CONVENIENCE_R1__________________ KC_PAST, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC
|
||||
#define ___________________CONVENIENCE_R2__________________ KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX
|
||||
#define ___________________CONVENIENCE_R3__________________ XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, _______
|
||||
#define ___________________CONVENIENCE_R4__________________ _______, KC_P0, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX
|
11
users/csc027/rules.mk
Normal file
11
users/csc027/rules.mk
Normal file
|
@ -0,0 +1,11 @@
|
|||
SRC += csc027.c
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
SRC += custom_rgb.c
|
||||
SRC += usb_led.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
SRC += custom_audio.c
|
||||
SRC += usb_led.c
|
||||
endif
|
32
users/csc027/usb_led.c
Normal file
32
users/csc027/usb_led.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "csc027.h"
|
||||
#include "usb_led.h"
|
||||
#include "led.h"
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
# include "custom_rgb.h"
|
||||
#elif defined(AUDIO_ENABLE)
|
||||
# include "custom_audio.h"
|
||||
#endif
|
||||
|
||||
#if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE)
|
||||
|
||||
bool led_update_user(led_t usb_led) {
|
||||
static led_t old_usb_led = {
|
||||
.num_lock = false,
|
||||
.caps_lock = false,
|
||||
.scroll_lock = false
|
||||
};
|
||||
|
||||
if(old_usb_led.caps_lock != usb_led.caps_lock) {
|
||||
usb_led.caps_lock ? on_usb_led_on() : on_usb_led_off();
|
||||
} else if(old_usb_led.num_lock != usb_led.num_lock) {
|
||||
usb_led.num_lock ? on_usb_led_on() : on_usb_led_off();
|
||||
} else if(old_usb_led.scroll_lock != usb_led.scroll_lock) {
|
||||
usb_led.scroll_lock ? on_usb_led_on() : on_usb_led_off();
|
||||
}
|
||||
old_usb_led = usb_led;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
3
users/csc027/usb_led.h
Normal file
3
users/csc027/usb_led.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
bool led_update_user(led_t usb_led);
|
Loading…
Reference in a new issue