diff options
Diffstat (limited to 'keyboards/xd75/keymaps/mtdjr')
| -rw-r--r-- | keyboards/xd75/keymaps/mtdjr/config.h | 3 | ||||
| -rw-r--r-- | keyboards/xd75/keymaps/mtdjr/keymap.c | 108 |
2 files changed, 17 insertions, 94 deletions
diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h index aadcaa387..7e2227c87 100644 --- a/keyboards/xd75/keymaps/mtdjr/config.h +++ b/keyboards/xd75/keymaps/mtdjr/config.h | |||
| @@ -20,7 +20,8 @@ | |||
| 20 | #include "../../config.h" | 20 | #include "../../config.h" |
| 21 | 21 | ||
| 22 | // place overrides here | 22 | // place overrides here |
| 23 | #define RGBLIGHT_SLEEP | 23 | #undef MANUFACTURER |
| 24 | #undef DESCRIPTION | ||
| 24 | #define MANUFACTURER mtdjr | 25 | #define MANUFACTURER mtdjr |
| 25 | #define PRODUCT XD75 | 26 | #define PRODUCT XD75 |
| 26 | #define DESCRIPTION XD75Re | 27 | #define DESCRIPTION XD75Re |
diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c index 696c82ae4..28d4b4961 100644 --- a/keyboards/xd75/keymaps/mtdjr/keymap.c +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c | |||
| @@ -1,68 +1,13 @@ | |||
| 1 | /* Copyright 2017 Wunder | 1 | #include QMK_KEYBOARD_H |
| 2 | * | 2 | #include "mtdjr.h" |
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "xd75.h" | ||
| 17 | #include "action_layer.h" | ||
| 18 | 3 | ||
| 19 | 4 | #define KC_LOCK TD(TD_ENDLOCK) | |
| 20 | enum custom_keycodes { | ||
| 21 | // TD_ESC = 0, | ||
| 22 | TD_LOCK = 0, | ||
| 23 | }; | ||
| 24 | |||
| 25 | // Layers | ||
| 26 | #define _QWERTY 0 | ||
| 27 | #define _LOWER 1 | ||
| 28 | #define _RAISE 2 | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | // Shortcuts | ||
| 33 | #define KC_____ KC_NO | ||
| 34 | #define KC_ KC_TRNS | ||
| 35 | #define KC_RST RESET | ||
| 36 | #define KC_RASE MO(_RAISE) | ||
| 37 | #define KC_LOWR MO(_LOWER) | ||
| 38 | |||
| 39 | // RGB and Backlighting | ||
| 40 | #define KC_RGB RGB_TOG | ||
| 41 | #define KC_RHUI RGB_HUI | ||
| 42 | #define KC_RHUD RGB_HUD | ||
| 43 | #define KC_RSAI RGB_SAI | ||
| 44 | #define KC_RSAD RGB_SAD | ||
| 45 | #define KC_RVAI RGB_VAI | ||
| 46 | #define KC_RVAD RGB_VAD | ||
| 47 | #define KC_BLT BL_TOGG | ||
| 48 | #define KC_BLS BL_STEP | ||
| 49 | #define KC_BLI BL_INC | ||
| 50 | #define KC_BLD BL_DEC | ||
| 51 | |||
| 52 | // Tapdance | ||
| 53 | //#define KC_EXC TD(TD_ESC) | ||
| 54 | #define KC_LOCK TD(TD_LOCK) | ||
| 55 | |||
| 56 | // Macros | ||
| 57 | #define KC_ROOT M(0) | ||
| 58 | #define KC_PPLY M(1) | ||
| 59 | #define KC_PSEF M(2) | ||
| 60 | 5 | ||
| 61 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 6 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 62 | 7 | ||
| 63 | [_QWERTY] = KC_KEYMAP( | 8 | [_QWERTY] = KC_KEYMAP( |
| 64 | // .--------------------------------------------------------------------------. | 9 | // .--------------------------------------------------------------------------. |
| 65 | ESC, 1 , 2 , 3 , 4 , 5 ,PGUP,PSCR,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, | 10 | EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,xxxx,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, |
| 66 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 11 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 67 | TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT, | 12 | TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT, |
| 68 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 13 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| @@ -70,44 +15,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 70 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 15 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 71 | LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT, | 16 | LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT, |
| 72 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 17 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 73 | LOWR,LCTL,LALT,LGUI,____, SPC,RASE, GRV,LOWR, SPC,____,LEFT,DOWN,UP ,RGHT | 18 | LOWR,LCTL,LALT,LGUI,xxxx, SPC, SPC,RASE,SPC, SPC,xxxx,LEFT,DOWN,UP ,RGHT |
| 74 | // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' | 19 | // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' |
| 75 | ), | 20 | ), |
| 76 | 21 | ||
| 77 | [_LOWER] = KC_KEYMAP( | 22 | [_LOWER] = KC_KEYMAP( |
| 78 | // .--------------------------------------------------------------------------. | 23 | // .--------------------------------------------------------------------------. |
| 79 | ____, F1, F2, F3, F4, F5, F6,____, F7, F8, F9, F10, F11, F12,____, | 24 | xxxx, F1, F2, F3, F4, F5, F6,xxxx, F7, F8, F9, F10, F11, F12, DEL, |
| 80 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 25 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 81 | ____,ROOT,PPLY,PSEF,____,____,____,____,____,____,____,____,____,____,____, | 26 | xxxx,ROOT,PPLY,PSEF,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, |
| 82 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 27 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 83 | ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, | 28 | xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, |
| 84 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 29 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 85 | ____,____,____,____,____,____,____,____,____,____,____,____,____,____,MUTE, | 30 | xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,MUTE, |
| 86 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 31 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 87 | ,____,____,____,____,____, ,____, ,MPLY,____,MPRV,VOLD,VOLU,MNXT | 32 | ,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, ,xxxx,MPLY,xxxx,MPRV,VOLD,VOLU,MNXT |
| 88 | // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' | 33 | // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' |
| 89 | ), | 34 | ), |
| 90 | 35 | ||
| 91 | [_RAISE] = KC_KEYMAP( | 36 | [_RAISE] = KC_KEYMAP( |
| 92 | // .--------------------------------------------------------------------------. | 37 | // .--------------------------------------------------------------------------. |
| 93 | ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, | 38 | xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, |
| 94 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 39 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 95 | ____,____,____,____, RST,____,____,____,____,____,____,____,____,____,____, | 40 | xxxx,xxxx,xxxx,xxxx, RST,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, |
| 96 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 41 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 97 | CAPS,____,____,____,____,____,____, BLI,____,____,____,____,____,____,____, | 42 | CAPS,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, BLI,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, |
| 98 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 43 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 99 | RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,____,____,____,____,BTN1,BTN2,____, | 44 | RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,xxxx,xxxx,xxxx,xxxx,BTN1,BTN2,xxxx, |
| 100 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| | 45 | // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| |
| 101 | ,____,____,____,____,____, ,____, ,____,____,MS_L,MS_D,MS_U,MS_R | 46 | ,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, ,xxxx,xxxx,xxxx,MS_L,MS_D,MS_U,MS_R |
| 102 | // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' | 47 | // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' |
| 103 | ) | 48 | ) |
| 104 | }; | 49 | }; |
| 105 | 50 | ||
| 106 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 107 | //Tap once for left ctrl, twice for ESC | ||
| 108 | //[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESC), | ||
| 109 | [TD_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L)) | ||
| 110 | }; | ||
| 111 | void led_set_user(uint8_t usb_led) { | 51 | void led_set_user(uint8_t usb_led) { |
| 112 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | 52 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { |
| 113 | capslock_led_on(); | 53 | capslock_led_on(); |
| @@ -115,21 +55,3 @@ void led_set_user(uint8_t usb_led) { | |||
| 115 | capslock_led_off(); | 55 | capslock_led_off(); |
| 116 | } | 56 | } |
| 117 | } | 57 | } |
| 118 | |||
| 119 | |||
| 120 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 121 | if (record->event.pressed) { | ||
| 122 | switch(id) { | ||
| 123 | case 0: | ||
| 124 | SEND_STRING("sudo su -\n"); | ||
| 125 | return false; break; | ||
| 126 | case 1: | ||
| 127 | SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); | ||
| 128 | return false; break; | ||
| 129 | case 2: | ||
| 130 | SEND_STRING("ps -ef | grep "); | ||
| 131 | return false; break; | ||
| 132 | } | ||
| 133 | } | ||
| 134 | return MACRO_NONE; | ||
| 135 | }; | ||
