diff options
author | mtdjr <mtdjr@users.noreply.github.com> | 2018-05-26 14:06:08 -0400 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-05-26 11:06:08 -0700 |
commit | 504ce1b4bc2a7ed785ba85bb8f6b80987c7b2412 (patch) | |
tree | 4c213f43f2b0bfb948521019b68268663069f142 /keyboards/xd75 | |
parent | 357d9f47725cc4d27c669ab3dedf84c55989a36f (diff) |
Add mtdjr keymaps for Iris, Let's Split, TADA68, XD75, and handwired dox (#3058)
* Add keymaps for Iris, Let's Split, TADA68, XD75, and handwired not_so_minidox
* remove handwired not_so_minidox
Diffstat (limited to 'keyboards/xd75')
-rw-r--r-- | keyboards/xd75/keymaps/mtdjr/config.h | 28 | ||||
-rw-r--r-- | keyboards/xd75/keymaps/mtdjr/keymap.c | 135 | ||||
-rw-r--r-- | keyboards/xd75/keymaps/mtdjr/readme.md | 1 | ||||
-rw-r--r-- | keyboards/xd75/keymaps/mtdjr/rules.mk | 22 |
4 files changed, 186 insertions, 0 deletions
diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h new file mode 100644 index 0000000000..aadcaa3875 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/config.h @@ -0,0 +1,28 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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/>. + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define RGBLIGHT_SLEEP +#define MANUFACTURER mtdjr +#define PRODUCT XD75 +#define DESCRIPTION XD75Re + +#endif diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c new file mode 100644 index 0000000000..696c82ae4f --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c @@ -0,0 +1,135 @@ +/* Copyright 2017 Wunder + * + * 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/>. + */ +#include "xd75.h" +#include "action_layer.h" + + +enum custom_keycodes { + // TD_ESC = 0, + TD_LOCK = 0, +}; + +// Layers +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + + + +// Shortcuts +#define KC_____ KC_NO +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_RASE MO(_RAISE) +#define KC_LOWR MO(_LOWER) + +// RGB and Backlighting +#define KC_RGB RGB_TOG +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD +#define KC_BLT BL_TOGG +#define KC_BLS BL_STEP +#define KC_BLI BL_INC +#define KC_BLD BL_DEC + +// Tapdance +//#define KC_EXC TD(TD_ESC) +#define KC_LOCK TD(TD_LOCK) + +// Macros +#define KC_ROOT M(0) +#define KC_PPLY M(1) +#define KC_PSEF M(2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ESC, 1 , 2 , 3 , 4 , 5 ,PGUP,PSCR,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LCTL, A , S , D , F , G ,HOME,PLUS,LOCK, H , J , K , L ,SCLN, ENT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LOWR,LCTL,LALT,LGUI,____, SPC,RASE, GRV,LOWR, SPC,____,LEFT,DOWN,UP ,RGHT +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +), + + [_LOWER] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ____, F1, F2, F3, F4, F5, F6,____, F7, F8, F9, F10, F11, F12,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,ROOT,PPLY,PSEF,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,MUTE, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ,____,____,____,____,____, ,____, ,MPLY,____,MPRV,VOLD,VOLU,MNXT +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +), + +[_RAISE] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____, RST,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + CAPS,____,____,____,____,____,____, BLI,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,____,____,____,____,BTN1,BTN2,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ,____,____,____,____,____, ,____, ,____,____,MS_L,MS_D,MS_U,MS_R +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +) +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for left ctrl, twice for ESC + //[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESC), + [TD_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L)) +}; +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + capslock_led_on(); + } else { + capslock_led_off(); + } +} + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/mtdjr/readme.md b/keyboards/xd75/keymaps/mtdjr/readme.md new file mode 100644 index 0000000000..d53c0f34a8 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 diff --git a/keyboards/xd75/keymaps/mtdjr/rules.mk b/keyboards/xd75/keymaps/mtdjr/rules.mk new file mode 100644 index 0000000000..28462ff160 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/rules.mk @@ -0,0 +1,22 @@ +# Copyright 2013 Jun Wako <wakojun@gmail.com> +# +# 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/>. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +BACKLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes |