diff options
| author | csc027 <csc_dev@protonmail.com> | 2020-01-03 14:12:53 -0800 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-01-03 14:12:53 -0800 |
| commit | 2c1417246789383829145bdfc51b3b3921a99341 (patch) | |
| tree | 8f82242bea0b93e193fab936399aea5409b8a882 /users/csc027 | |
| parent | 320822d75b785401809f45007320e6fb6885b3fd (diff) | |
| download | qmk_firmware-2c1417246789383829145bdfc51b3b3921a99341.tar.gz qmk_firmware-2c1417246789383829145bdfc51b3b3921a99341.zip | |
[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.
Diffstat (limited to 'users/csc027')
| -rw-r--r-- | users/csc027/csc027.c | 63 | ||||
| -rw-r--r-- | users/csc027/csc027.h | 49 | ||||
| -rw-r--r-- | users/csc027/custom_audio.c | 17 | ||||
| -rw-r--r-- | users/csc027/custom_audio.h | 8 | ||||
| -rw-r--r-- | users/csc027/custom_rgb.c | 25 | ||||
| -rw-r--r-- | users/csc027/custom_rgb.h | 9 | ||||
| -rw-r--r-- | users/csc027/defines.h | 217 | ||||
| -rw-r--r-- | users/csc027/rules.mk | 11 | ||||
| -rw-r--r-- | users/csc027/usb_led.c | 32 | ||||
| -rw-r--r-- | users/csc027/usb_led.h | 3 |
10 files changed, 434 insertions, 0 deletions
diff --git a/users/csc027/csc027.c b/users/csc027/csc027.c new file mode 100644 index 000000000..106be9b69 --- /dev/null +++ b/users/csc027/csc027.c | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | #include "csc027.h" | ||
| 2 | |||
| 3 | static const char* git_macros[] = { | ||
| 4 | // Make sure that the macro strings match the order they are declared | ||
| 5 | // in the custom_keycodes enum. | ||
| 6 | "git add ", | ||
| 7 | "git branch ", | ||
| 8 | "git checkout ", | ||
| 9 | "git cherry-pick ", | ||
| 10 | "git commit -m \"\""SS_TAP(X_LEFT), | ||
| 11 | "git diff ", | ||
| 12 | "git fetch ", | ||
| 13 | "git grep ", | ||
| 14 | "git log --decorate --oneline --graph ", | ||
| 15 | "git init ", | ||
| 16 | "git mv ", | ||
| 17 | "git merge ", | ||
| 18 | "git push ", | ||
| 19 | "git pull ", | ||
| 20 | "git rebase ", | ||
| 21 | "git remote ", | ||
| 22 | "git reset ", | ||
| 23 | "git show ", | ||
| 24 | "git stash ", | ||
| 25 | "git status ", | ||
| 26 | "git tag ", | ||
| 27 | SS_LCTL(SS_LALT(SS_TAP(X_HOME)))"\t ", | ||
| 28 | SS_LCTL(SS_LALT(SS_TAP(X_HOME)))"\t\t\t ", | ||
| 29 | SS_LCTL(SS_LALT(SS_TAP(X_HOME)))SS_LALT("\t") | ||
| 30 | }; | ||
| 31 | |||
| 32 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 33 | switch(keycode) { | ||
| 34 | case LOWER: | ||
| 35 | if(record->event.pressed) { | ||
| 36 | layer_on(_LW); | ||
| 37 | update_tri_layer(_LW, _RS, _MS); | ||
| 38 | } else { | ||
| 39 | layer_off(_LW); | ||
| 40 | update_tri_layer(_LW, _RS, _MS); | ||
| 41 | } | ||
| 42 | return false; | ||
| 43 | case RAISE: | ||
| 44 | if(record->event.pressed) { | ||
| 45 | layer_on(_RS); | ||
| 46 | update_tri_layer(_LW, _RS, _MS); | ||
| 47 | } else { | ||
| 48 | layer_off(_RS); | ||
| 49 | update_tri_layer(_LW, _RS, _MS); | ||
| 50 | } | ||
| 51 | return false; | ||
| 52 | case GIT_ADD...MC_ATRD: | ||
| 53 | if(record->event.pressed) { | ||
| 54 | // The calculation here is to make sure that the custom keycode | ||
| 55 | // aligns with the git_macros array. | ||
| 56 | send_string(git_macros[keycode - GIT_ADD]); | ||
| 57 | return true; | ||
| 58 | } | ||
| 59 | return false; | ||
| 60 | default: | ||
| 61 | return true; | ||
| 62 | } | ||
| 63 | } | ||
diff --git a/users/csc027/csc027.h b/users/csc027/csc027.h new file mode 100644 index 000000000..2a4c8a8a6 --- /dev/null +++ b/users/csc027/csc027.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "quantum.h" | ||
| 4 | #include "defines.h" | ||
| 5 | |||
| 6 | enum custom_keycodes { | ||
| 7 | // Layer Keycodes | ||
| 8 | LOWER = SAFE_RANGE, | ||
| 9 | RAISE, | ||
| 10 | |||
| 11 | // Git Keycodes | ||
| 12 | GIT_ADD, // Add | ||
| 13 | GIT_BRC, // Branch | ||
| 14 | GIT_CHK, // Checkout | ||
| 15 | GIT_CHR, // Cherry-Pick | ||
| 16 | GIT_CMT, // Commit | ||
| 17 | GIT_DIF, // Diff | ||
| 18 | GIT_FTC, // Fetch | ||
| 19 | GIT_GRP, // Grep | ||
| 20 | GIT_LOG, // Log | ||
| 21 | GIT_INT, // Init | ||
| 22 | GIT_MRG, // Merge | ||
| 23 | GIT_MOV, // Move (mv) | ||
| 24 | GIT_PSH, // Push | ||
| 25 | GIT_PUL, // Pull | ||
| 26 | GIT_RBS, // Rebase | ||
| 27 | GIT_RMT, // Remote | ||
| 28 | GIT_RST, // Reset | ||
| 29 | GIT_SHW, // Show | ||
| 30 | GIT_STH, // Stash | ||
| 31 | GIT_STS, // Status | ||
| 32 | GIT_TAG, // Tag | ||
| 33 | |||
| 34 | // Remote Desktop | ||
| 35 | MC_MRD7, // Minimize Remote Desktop on Windows 7 | ||
| 36 | MC_MRD8, // Minimize Remote Desktop on Windows 8+ | ||
| 37 | MC_ATRD // Switch windows on local machine from Remote Desktop on Windows | ||
| 38 | }; | ||
| 39 | |||
| 40 | enum custom_layers { | ||
| 41 | _QW = 0, // Qwerty | ||
| 42 | _RS, // Raise | ||
| 43 | _LW, // Lower | ||
| 44 | _MS, // Mouse | ||
| 45 | _GT, // Git | ||
| 46 | _CN, // Convenience | ||
| 47 | _GW, // Guild Wars 2 | ||
| 48 | _CS // Counter-Strike: Global Offensive | ||
| 49 | }; | ||
diff --git a/users/csc027/custom_audio.c b/users/csc027/custom_audio.c new file mode 100644 index 000000000..96e0e6602 --- /dev/null +++ b/users/csc027/custom_audio.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #include "csc027.h" | ||
| 2 | #include "custom_audio.h" | ||
| 3 | |||
| 4 | #if defined(AUDIO_ENABLE) | ||
| 5 | |||
| 6 | float tone_on[][2] = SONG(E__NOTE(_G6)); | ||
| 7 | float tone_off[][2] = SONG(E__NOTE(_D5)); | ||
| 8 | |||
| 9 | void on_usb_led_off(void) { | ||
| 10 | PLAY_SONG(tone_off); | ||
| 11 | } | ||
| 12 | |||
| 13 | void on_usb_led_on(void) { | ||
| 14 | PLAY_SONG(tone_on); | ||
| 15 | } | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/users/csc027/custom_audio.h b/users/csc027/custom_audio.h new file mode 100644 index 000000000..daea1e652 --- /dev/null +++ b/users/csc027/custom_audio.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #if defined(AUDIO_ENABLE) | ||
| 4 | |||
| 5 | void on_usb_led_off(void); | ||
| 6 | void on_usb_led_on(void); | ||
| 7 | |||
| 8 | #endif | ||
diff --git a/users/csc027/custom_rgb.c b/users/csc027/custom_rgb.c new file mode 100644 index 000000000..000483b2a --- /dev/null +++ b/users/csc027/custom_rgb.c | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #include "csc027.h" | ||
| 2 | #include "custom_rgb.h" | ||
| 3 | |||
| 4 | #if defined(RGBLIGHT_ENABLE) | ||
| 5 | |||
| 6 | void keyboard_post_init_user(void) { | ||
| 7 | rgblight_enable_noeeprom(); | ||
| 8 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 9 | uint16_t user_hue = rgblight_get_hue(); | ||
| 10 | for (uint16_t i = 0; i < 256; ++i) { | ||
| 11 | rgblight_sethsv_noeeprom((i + user_hue) % 256, 255, 255); | ||
| 12 | wait_ms(5); | ||
| 13 | } | ||
| 14 | rgblight_sethsv_noeeprom(0, 0, 0); | ||
| 15 | } | ||
| 16 | |||
| 17 | void on_usb_led_off(void) { | ||
| 18 | rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() - 85); | ||
| 19 | } | ||
| 20 | |||
| 21 | void on_usb_led_on(void) { | ||
| 22 | rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() + 85); | ||
| 23 | } | ||
| 24 | |||
| 25 | #endif | ||
diff --git a/users/csc027/custom_rgb.h b/users/csc027/custom_rgb.h new file mode 100644 index 000000000..47fdeb7b2 --- /dev/null +++ b/users/csc027/custom_rgb.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #if defined(RGBLIGHT_ENABLE) | ||
| 4 | |||
| 5 | void keyboard_post_init_user(void); | ||
| 6 | void on_usb_led_off(void); | ||
| 7 | void on_usb_led_on(void); | ||
| 8 | |||
| 9 | #endif | ||
diff --git a/users/csc027/defines.h b/users/csc027/defines.h new file mode 100644 index 000000000..3eaa95d83 --- /dev/null +++ b/users/csc027/defines.h | |||
| @@ -0,0 +1,217 @@ | |||
| 1 | #pragma once | ||
| 2 | #include "csc027.h" | ||
| 3 | |||
| 4 | #define MC_LCAD LCA(KC_DEL) // Control-Alt-Delete | ||
| 5 | #define MC_RSFE RSFT_T(KC_ENT) // Right Shift on hold, Enter on tap | ||
| 6 | #define MC_LSEC LSFT_T(KC_ESC) // Left Shift on hold, Escape on tap | ||
| 7 | |||
| 8 | #define ________________ KC_TRNS | ||
| 9 | |||
| 10 | /* QWERTY Layer | ||
| 11 | * | ||
| 12 | * The basic layer of this keymap is a QWERTY layer. | ||
| 13 | * | ||
| 14 | * - Modifier keys more closely resemble a standard keyboard's layout. | ||
| 15 | * - There is a "Nxt L" function that cycles through the QWERTY and | ||
| 16 | * game layers. This has been implemented by hard coding the jump to the | ||
| 17 | * next layer in each of the layers using the TO() macro. Currently, the | ||
| 18 | * "Nxt L" function skips over the momentary layers (i.e., Mouse, Git, | ||
| 19 | * Lower, Raise, and Convenience layers). | ||
| 20 | * - There is a "Rst L" function that resets the current layer to the | ||
| 21 | * QWERTY layer. | ||
| 22 | * - The "Git" one shot function goes to the macro layer which has Git | ||
| 23 | * commands implemented. | ||
| 24 | * - The "Convc" momentary function goes to the Convenience layer which has a | ||
| 25 | * tenkey. Note: The tenkey will operate using the secondary functions if | ||
| 26 | * the Number Lock is not enabled (e.g., Left and Right instead of 4 and | ||
| 27 | * 6). | ||
| 28 | * - The Right Shift key also doubles as an Enter key if it is tapped rather | ||
| 29 | * than held. | ||
| 30 | * | ||
| 31 | * ,-----------------------------------. ,-----------------------------------. | ||
| 32 | * | Tab | Q | W | E | R | T | | Y | U | I | O | P |BkSpc| | ||
| 33 | * |-----------------------------------| |-----------------------------------| | ||
| 34 | * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
| 35 | * |-----------------------------------| |-----------------------------------| | ||
| 36 | * |Shift| Z | X | C | V | B | | N | M | , | . | / |Sf/En| | ||
| 37 | * |-----------------------------------| |-----------------------------------| | ||
| 38 | * |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Git |Nxt L|Rst L| | ||
| 39 | * `-----------------------------------' `-----------------------------------' | ||
| 40 | */ | ||
| 41 | |||
| 42 | #define _____________________QWERTY_L1_____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T | ||
| 43 | #define _____________________QWERTY_L2_____________________ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G | ||
| 44 | #define _____________________QWERTY_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B | ||
| 45 | #define _____________________QWERTY_L4_____________________ KC_LCTL, KC_LGUI, KC_LALT, MO(_CN), LOWER, KC_SPC | ||
| 46 | |||
| 47 | #define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC | ||
| 48 | #define _____________________QWERTY_R2_____________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT | ||
| 49 | #define _____________________QWERTY_R3_____________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC_RSFE | ||
| 50 | #define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GW), XXXXXXX | ||
| 51 | |||
| 52 | /* Raise Layer | ||
| 53 | * | ||
| 54 | * The Raise layer accommodates the Home, End, Page Up, and Page Down keys | ||
| 55 | * in what would be the Vim arrow keys positions. This is done as opposed | ||
| 56 | * to using C-D, C-U, 0, $, and ^, because it would require a separate layer. | ||
| 57 | * | ||
| 58 | * - The top row has the shifted versions of the number row, rather than the | ||
| 59 | * numbers themselves. This is a change to have a mnemonic where shifted | ||
| 60 | * elements are on the Raise layer. This also makes it easy to use some of | ||
| 61 | * Vim style movement controls (e.g. $, %), but makes it harder for others | ||
| 62 | * (e.g. ^, (, )). Consider swapping the number row with the shifted number | ||
| 63 | * row if you do not care about the mnemonic. | ||
| 64 | * - The Left Brace, Right Brace, Underscore, and Plus keys have been moved | ||
| 65 | * from the right side to the left side. This will take some getting used | ||
| 66 | * to, as these keys are normally on the right side of the keyboard. An | ||
| 67 | * alternative would be to keep the keys on the right hand side just under | ||
| 68 | * the Parentheses. This would prevent the use of Vim arrow keys however. | ||
| 69 | * - The F keys have been laid across the bottom in the Raise layer, rather | ||
| 70 | * than the Lower layer to allow easy access to the Alt-F4 chord for | ||
| 71 | * Windows. When the F keys were put in the Lower layer, it made it hard | ||
| 72 | * to use this chord, as the Lower key, the Alt key, and the F4 key were | ||
| 73 | * all right next to each other. | ||
| 74 | * - A Delete key has been added in this layer to allow easy access to the | ||
| 75 | * Control-Alt-Delete login chord for Windows. | ||
| 76 | * | ||
| 77 | * ,-----------------------------------. ,-----------------------------------. | ||
| 78 | * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | | ||
| 79 | * |-----------------------------------| |-----------------------------------| | ||
| 80 | * | | _ | + | { | } | Caps| | Home| PgDn| PgUp| End | | | | ||
| 81 | * |-----------------------------------| |-----------------------------------| | ||
| 82 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | | ||
| 83 | * |-----------------------------------| |-----------------------------------| | ||
| 84 | * | | | | | | | | | | | | | | | ||
| 85 | * `-----------------------------------' `-----------------------------------' | ||
| 86 | */ | ||
| 87 | |||
| 88 | #define ______________________RAISE_L1_____________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC | ||
| 89 | #define ______________________RAISE_L2_____________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CAPS | ||
| 90 | #define ______________________RAISE_L3_____________________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 | ||
| 91 | #define ______________________RAISE_L4_____________________ _______, _______, _______, _______, _______, _______ | ||
| 92 | |||
| 93 | #define ______________________RAISE_R1_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT | ||
| 94 | #define ______________________RAISE_R2_____________________ KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX | ||
| 95 | #define ______________________RAISE_R3_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ | ||
| 96 | #define ______________________RAISE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX | ||
| 97 | |||
| 98 | /* Lower Layer | ||
| 99 | * | ||
| 100 | * The lower layout scheme accommodates the Vim style arrow keys. | ||
| 101 | * | ||
| 102 | * - The arrow keys are in the normal Vim positions. | ||
| 103 | * - The Left Square Bracket, Right Square Bracket, Minus, and Equal keys | ||
| 104 | * have been moved from the right side to the left side. This will take | ||
| 105 | * some getting used to, as it is on the left rather than the right. | ||
| 106 | * - A Delete key has been added in this layer to allow easy access to the | ||
| 107 | * Control-Alt-Delete login chord for Windows. | ||
| 108 | * - The remaining F keys are in this layer. | ||
| 109 | * | ||
| 110 | * ,-----------------------------------. ,-----------------------------------. | ||
| 111 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 112 | * |-----------------------------------| |-----------------------------------| | ||
| 113 | * | | - | = | [ | ] | | | Left| Down| Up |Right| | | | ||
| 114 | * |-----------------------------------| |-----------------------------------| | ||
| 115 | * | | F11 | F12 | | | | | | | | | | | | ||
| 116 | * |-----------------------------------| |-----------------------------------| | ||
| 117 | * | | | | | | | | | | | | | | | ||
| 118 | * `-----------------------------------' `-----------------------------------' | ||
| 119 | */ | ||
| 120 | |||
| 121 | #define ______________________LOWER_L1_____________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 | ||
| 122 | #define ______________________LOWER_L2_____________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX | ||
| 123 | #define ______________________LOWER_L3_____________________ _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 124 | #define ______________________LOWER_L4_____________________ _______, _______, _______, _______, _______, _______ | ||
| 125 | |||
| 126 | #define ______________________LOWER_R1_____________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT | ||
| 127 | #define ______________________LOWER_R2_____________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX | ||
| 128 | #define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ | ||
| 129 | #define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX | ||
| 130 | |||
| 131 | |||
| 132 | /* MIT Layout (Mouse) | ||
| 133 | * | ||
| 134 | * The mouse layer adds keys to use the keyboard like a mouse. | ||
| 135 | * | ||
| 136 | * ,-----------------------------------. ,-----------------------------------. | ||
| 137 | * | | | | | | | | | | | | | | | ||
| 138 | * |-----------------------------------| |-----------------------------------| | ||
| 139 | * | | | |Ms-Lc|Ms-Rc| | | Ms-L| Ms-D| Ms-U| Ms-R| | | | ||
| 140 | * |-----------------------------------| |-----------------------------------| | ||
| 141 | * | | | | | | | | | | | | | | | ||
| 142 | * |-----------------------------------| |-----------------------------------| | ||
| 143 | * | | | | | | | | | | | | | | | ||
| 144 | * `-----------------------------------' `-----------------------------------' | ||
| 145 | */ | ||
| 146 | |||
| 147 | #define ______________________MOUSE_L1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 148 | #define ______________________MOUSE_L2_____________________ _______, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX | ||
| 149 | #define ______________________MOUSE_L3_____________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 150 | #define ______________________MOUSE_L4_____________________ _______, _______, _______, _______, _______, _______ | ||
| 151 | |||
| 152 | #define ______________________MOUSE_R1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 153 | #define ______________________MOUSE_R2_____________________ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX | ||
| 154 | #define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ | ||
| 155 | #define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX | ||
| 156 | |||
| 157 | /* MIT Layout (Git) | ||
| 158 | * | ||
| 159 | * The macro layer that has common git commands. | ||
| 160 | * | ||
| 161 | * ,-----------------------------------. ,-----------------------------------. | ||
| 162 | * | |Chery| Show|Rebas|Reset| Tag | | | Pull| Init|Rmote| Push| | | ||
| 163 | * |-----------------------------------| |-----------------------------------| | ||
| 164 | * | | Add |Sttus| Diff|Fetch| Grep| |Stash| |ChkOt| Log | | | | ||
| 165 | * |-----------------------------------| |-----------------------------------| | ||
| 166 | * | | | |Comit| Move|Brnch| | |Merge| | | | | | ||
| 167 | * |-----------------------------------| |-----------------------------------| | ||
| 168 | * | | | | | | | | | | | | | | | ||
| 169 | * `-----------------------------------' `-----------------------------------' | ||
| 170 | */ | ||
| 171 | |||
| 172 | #define _______________________GIT_L1______________________ XXXXXXX, GIT_CHR, GIT_SHW, GIT_RBS, GIT_RST, GIT_TAG | ||
| 173 | #define _______________________GIT_L2______________________ _______, GIT_ADD, GIT_STS, GIT_DIF, GIT_FTC, GIT_GRP | ||
| 174 | #define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, GIT_CMT, GIT_MOV, GIT_BRC | ||
| 175 | #define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______ | ||
| 176 | |||
| 177 | #define _______________________GIT_R1______________________ XXXXXXX, GIT_PUL, GIT_INT, GIT_RMT, GIT_PSH, XXXXXXX | ||
| 178 | #define _______________________GIT_R2______________________ GIT_STH, XXXXXXX, GIT_CHK, GIT_LOG, XXXXXXX, XXXXXXX | ||
| 179 | #define _______________________GIT_R3______________________ XXXXXXX, GIT_MRG, XXXXXXX, XXXXXXX, XXXXXXX, _______ | ||
| 180 | #define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX | ||
| 181 | |||
| 182 | |||
| 183 | /* MIT Layout (Convenience) | ||
| 184 | * | ||
| 185 | * The Convenience layer adds a tenkey and miscellaneous chords to the keyboard. | ||
| 186 | * The lack of a fifth row means that some of the tenkey's functions need to be | ||
| 187 | * moved to the left of tenkey from the top. | ||
| 188 | * | ||
| 189 | * - The Number Lock key is physically in the same spot as the Caps Lock key | ||
| 190 | * in the raise layer. | ||
| 191 | * - There is also a Backspace Key for convenience. | ||
| 192 | * - There is a convenience macro to type the Control-Alt-Delete login chord for Windows. | ||
| 193 | * - There is a convenience macro to Minimize Remote Desktop within Remote Desktop | ||
| 194 | * in Windows. | ||
| 195 | * - There is a convenience macro to cycle through programs in Windows. | ||
| 196 | * - There is a convenience macro to go to the previous program in Windows. | ||
| 197 | * | ||
| 198 | * ,-----------------------------------. ,-----------------------------------. | ||
| 199 | * | | |Insrt|ScrLk|PrtSc| | | * | 7 | 8 | 9 | - |BkSpc| | ||
| 200 | * |-----------------------------------| |-----------------------------------| | ||
| 201 | * | | | App | LCAD|MRDP7|NmLck| | / | 4 | 5 | 6 | + | | | ||
| 202 | * |-----------------------------------| |-----------------------------------| | ||
| 203 | * | | | | ATRD|MRDP8| | | | 1 | 2 | 3 |Enter| | | ||
| 204 | * |-----------------------------------| |-----------------------------------| | ||
| 205 | * | | | | | | | | | 0 | 0 | . | | | | ||
| 206 | * `-----------------------------------' `-----------------------------------' | ||
| 207 | */ | ||
| 208 | |||
| 209 | #define ___________________CONVENIENCE_L1__________________ XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PSCR, XXXXXXX | ||
| 210 | #define ___________________CONVENIENCE_L2__________________ _______, XXXXXXX, KC_APP, MC_LCAD, MC_MRD7, KC_NLCK | ||
| 211 | #define ___________________CONVENIENCE_L3__________________ _______, XXXXXXX, XXXXXXX, MC_ATRD, MC_MRD8, XXXXXXX | ||
| 212 | #define ___________________CONVENIENCE_L4__________________ _______, _______, _______, _______, _______, _______ | ||
| 213 | |||
| 214 | #define ___________________CONVENIENCE_R1__________________ KC_PAST, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC | ||
| 215 | #define ___________________CONVENIENCE_R2__________________ KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX | ||
| 216 | #define ___________________CONVENIENCE_R3__________________ XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, _______ | ||
| 217 | #define ___________________CONVENIENCE_R4__________________ _______, KC_P0, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX | ||
diff --git a/users/csc027/rules.mk b/users/csc027/rules.mk new file mode 100644 index 000000000..7e5d44e1c --- /dev/null +++ b/users/csc027/rules.mk | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | SRC += csc027.c | ||
| 2 | |||
| 3 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | ||
| 4 | SRC += custom_rgb.c | ||
| 5 | SRC += usb_led.c | ||
| 6 | endif | ||
| 7 | |||
| 8 | ifeq ($(strip $(AUDIO_ENABLE)), yes) | ||
| 9 | SRC += custom_audio.c | ||
| 10 | SRC += usb_led.c | ||
| 11 | endif | ||
diff --git a/users/csc027/usb_led.c b/users/csc027/usb_led.c new file mode 100644 index 000000000..1418e32ca --- /dev/null +++ b/users/csc027/usb_led.c | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #include "csc027.h" | ||
| 2 | #include "usb_led.h" | ||
| 3 | #include "led.h" | ||
| 4 | |||
| 5 | #if defined(RGBLIGHT_ENABLE) | ||
| 6 | # include "custom_rgb.h" | ||
| 7 | #elif defined(AUDIO_ENABLE) | ||
| 8 | # include "custom_audio.h" | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE) | ||
| 12 | |||
| 13 | bool led_update_user(led_t usb_led) { | ||
| 14 | static led_t old_usb_led = { | ||
| 15 | .num_lock = false, | ||
| 16 | .caps_lock = false, | ||
| 17 | .scroll_lock = false | ||
| 18 | }; | ||
| 19 | |||
| 20 | if(old_usb_led.caps_lock != usb_led.caps_lock) { | ||
| 21 | usb_led.caps_lock ? on_usb_led_on() : on_usb_led_off(); | ||
| 22 | } else if(old_usb_led.num_lock != usb_led.num_lock) { | ||
| 23 | usb_led.num_lock ? on_usb_led_on() : on_usb_led_off(); | ||
| 24 | } else if(old_usb_led.scroll_lock != usb_led.scroll_lock) { | ||
| 25 | usb_led.scroll_lock ? on_usb_led_on() : on_usb_led_off(); | ||
| 26 | } | ||
| 27 | old_usb_led = usb_led; | ||
| 28 | |||
| 29 | return true; | ||
| 30 | } | ||
| 31 | |||
| 32 | #endif | ||
diff --git a/users/csc027/usb_led.h b/users/csc027/usb_led.h new file mode 100644 index 000000000..7451b4695 --- /dev/null +++ b/users/csc027/usb_led.h | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | bool led_update_user(led_t usb_led); | ||
