From 5c2ac733afe9f6d68d2ad42c9d58fbff466a7874 Mon Sep 17 00:00:00 2001 From: Jarred Steenvoorden Date: Wed, 3 Oct 2018 01:14:37 +1000 Subject: [PATCH] Keymap: Adding my DZ60, Satan, XD75 kemaps and updates to userspace (#4039) * Update userspace with common config.h * Add my dz60, satan and xd75 keyboard keymaps * Fixing executable bits changed during last upstream merge * Cleanup unnecessary files and defines * Remove unnecessary defines from userspace config --- keyboards/dz60/keymaps/jarred/keymap.c | 21 +++++++++ keyboards/planck/keymaps/jarred/rules.mk | 4 -- keyboards/satan/keymaps/jarred/keymap.c | 22 ++++++++++ keyboards/satan/keymaps/jarred/readme.md | 1 + keyboards/xd75/keymaps/daniel/keymap.c | 29 +++++++++++++ keyboards/xd75/keymaps/daniel/readme.md | 1 + keyboards/xd75/keymaps/jarred/keymap.c | 37 ++++++++++++++++ keyboards/xd75/keymaps/jarred/readme.md | 1 + .../planck/keymaps => users}/jarred/config.h | 43 ++++++++++++------- users/jarred/jarred.c | 15 +++++++ users/jarred/jarred.h | 8 ++-- users/jarred/rules.mk | 15 +++++++ 12 files changed, 174 insertions(+), 23 deletions(-) create mode 100644 keyboards/dz60/keymaps/jarred/keymap.c delete mode 100644 keyboards/planck/keymaps/jarred/rules.mk create mode 100644 keyboards/satan/keymaps/jarred/keymap.c create mode 100644 keyboards/satan/keymaps/jarred/readme.md create mode 100644 keyboards/xd75/keymaps/daniel/keymap.c create mode 100644 keyboards/xd75/keymaps/daniel/readme.md create mode 100644 keyboards/xd75/keymaps/jarred/keymap.c create mode 100644 keyboards/xd75/keymaps/jarred/readme.md rename {keyboards/planck/keymaps => users}/jarred/config.h (54%) diff --git a/keyboards/dz60/keymaps/jarred/keymap.c b/keyboards/dz60/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..9e68506831 --- /dev/null +++ b/keyboards/dz60/keymaps/jarred/keymap.c @@ -0,0 +1,21 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, 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_LBRC, KC_RBRC,KC_BSLS, + MO(_NV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, XXXXXXX,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,XXXXXXX, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI, XXXXXXX,KC_APP, KC_RCTL), + + [_NV] = LAYOUT( + KC_GRV ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______,_______, + _______,_______,_______,_______,KC_DEL ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END ,KC_INS ,_______,_______,_______, + _______,_______,_______,KC_LSFT,KC_LCTL,KC_ENT ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_DEL ,KC_DEL , _______, + _______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,_______,_______,_______, + _______,_______,_______, _______,_______,_______, _______,_______,_______, RESET, _______) +}; diff --git a/keyboards/planck/keymaps/jarred/rules.mk b/keyboards/planck/keymaps/jarred/rules.mk deleted file mode 100644 index cd14c41e11..0000000000 --- a/keyboards/planck/keymaps/jarred/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -# Build options - -BACKLIGHT_ENABLE = no # Switch LEDs -MOUSEKEY_ENABLE = no # Emulates mouse key using keypresses diff --git a/keyboards/satan/keymaps/jarred/keymap.c b/keyboards/satan/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..c6852e4eb5 --- /dev/null +++ b/keyboards/satan/keymaps/jarred/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QW] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, 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_LBRC, KC_RBRC,KC_BSLS, \ + MO(_NV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL), + +[_NV] = LAYOUT_60_ansi( + KC_GRV ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______, \ + _______,_______,_______,_______,KC_DEL ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END ,KC_INS ,_______,_______,_______, \ + _______,_______,_______,KC_LSFT,KC_LCTL,KC_ENT ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_DEL ,KC_DEL , _______, \ + _______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______, RESET, _______), + +}; diff --git a/keyboards/satan/keymaps/jarred/readme.md b/keyboards/satan/keymaps/jarred/readme.md new file mode 100644 index 0000000000..522cb19b65 --- /dev/null +++ b/keyboards/satan/keymaps/jarred/readme.md @@ -0,0 +1 @@ +# Jarred's Satan GH60 layout diff --git a/keyboards/xd75/keymaps/daniel/keymap.c b/keyboards/xd75/keymaps/daniel/keymap.c new file mode 100644 index 0000000000..2804a6cd0d --- /dev/null +++ b/keyboards/xd75/keymaps/daniel/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 +#define _NM 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = { + { KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_GRV , 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_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { MO(_NV), KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , MO(_NM), KC_PGUP }, + { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, KC_RSFT, KC_UP , KC_PGDN }, + { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT }, + }, + [_NV] = { + { KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______ }, + { _______, _______, _______, _______, KC_DEL , KC_BSPC, _______, KC_HOME, KC_UP , KC_END , KC_INS , _______, _______, _______, _______ }, + { _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT , _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL , _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_NM] = { + { _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + } +}; diff --git a/keyboards/xd75/keymaps/daniel/readme.md b/keyboards/xd75/keymaps/daniel/readme.md new file mode 100644 index 0000000000..3305d0f30b --- /dev/null +++ b/keyboards/xd75/keymaps/daniel/readme.md @@ -0,0 +1 @@ +# Daniels xd75 keymap diff --git a/keyboards/xd75/keymaps/jarred/keymap.c b/keyboards/xd75/keymaps/jarred/keymap.c new file mode 100644 index 0000000000..f851787118 --- /dev/null +++ b/keyboards/xd75/keymaps/jarred/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _LW 1 +#define _NV 2 +#define _NM 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = { + { KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_MUTE, KC_VOLD, KC_VOLU, 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_INS , KC_HOME, KC_PGUP, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC }, + { MO(_NV), KC_A , KC_S , KC_D , KC_F , KC_G , KC_DEL , KC_END , KC_PGDN, KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT }, + { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, KC_UP , _______, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT }, + { KC_LCTL, KC_LGUI, MO(_NM), KC_LALT, MO(_LW), KC_SPC , KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT , MO(_LW), KC_RALT, KC_RGUI, KC_APP , KC_RCTL }, + }, + [_LW] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______ }, + { _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F11 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS }, + { _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______, _______, _______, KC_F12 , KC_GRV , _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_NV] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, KC_DEL , KC_BSPC, _______, _______, _______, _______, KC_HOME, KC_UP , KC_END , KC_INS , _______ }, + { _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT , _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL , _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_NM] = { + { _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______ }, + { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + } +}; diff --git a/keyboards/xd75/keymaps/jarred/readme.md b/keyboards/xd75/keymaps/jarred/readme.md new file mode 100644 index 0000000000..4070bb3eed --- /dev/null +++ b/keyboards/xd75/keymaps/jarred/readme.md @@ -0,0 +1 @@ +# Jarreds xd75 keymap diff --git a/keyboards/planck/keymaps/jarred/config.h b/users/jarred/config.h similarity index 54% rename from keyboards/planck/keymaps/jarred/config.h rename to users/jarred/config.h index 9e8f404c15..f282088144 100644 --- a/keyboards/planck/keymaps/jarred/config.h +++ b/users/jarred/config.h @@ -14,24 +14,37 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" +// Sets good default for the speed of the mouse. +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_MAX_SPEED + +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 40 +#define MOUSEKEY_MAX_SPEED 5 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_DELAY + +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 255 +#define MOUSEKEY_WHEEL_DELAY 0 + +#undef TAPPING_TOGGLE +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) #endif -#define TAPPING_TERM 200 - -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_TIME_TO_MAX 40 -#define MOUSEKEY_MAX_SPEED 5 - -#define MOUSEKEY_WHEEL_DELAY 0 -#define MOUSEKEY_WHEEL_MAX_SPEED 4 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 255 - -#endif +#define MACRO_TIMER 5 diff --git a/users/jarred/jarred.c b/users/jarred/jarred.c index f8413ca3b3..33162b6891 100644 --- a/users/jarred/jarred.c +++ b/users/jarred/jarred.c @@ -15,3 +15,18 @@ */ #include "jarred.h" +#include "version.h" + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER); + } + return false; + break; + } + + return true; +} diff --git a/users/jarred/jarred.h b/users/jarred/jarred.h index b1253f76a7..a6774ce264 100644 --- a/users/jarred/jarred.h +++ b/users/jarred/jarred.h @@ -19,9 +19,9 @@ #include "quantum.h" -// Use 7 wide characters for keymaps -#define _______ KC_TRNS -#define XXXXXXX KC_NO +enum userspace_custom_keycodes { + VRSN = SAFE_RANGE // Prints QMK Firmware and board info +}; // Layers #define _QW 0 @@ -72,7 +72,7 @@ #define NUMPAD_L1 RGB_TOG, RGB_MOD, _______, _______, RGB_HUD, RGB_HUI #define NUMPAD_L2 BL_TOGG, BL_STEP, BL_BRTG, _______, RGB_SAD, RGB_SAI #define NUMPAD_L3 _______, _______, _______, _______, RGB_VAD, RGB_VAI -#define NUMPAD_L4 RESET, _______, _______, _______, RGB_SPD, RGB_SPI +#define NUMPAD_L4 RESET, VRSN, _______, _______, RGB_SPD, RGB_SPI #define NUMPAD_R1 _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______ #define NUMPAD_R2 _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______ diff --git a/users/jarred/rules.mk b/users/jarred/rules.mk index 3c15cd0f9a..9a00cbf72b 100644 --- a/users/jarred/rules.mk +++ b/users/jarred/rules.mk @@ -1 +1,16 @@ SRC += jarred.c + +ifneq (,$(findstring planck,$(KEYBOARD))) + # Enable backlight for rev4 planck only + ifneq (,$(findstring rev4,$(KEYBOARD))) + BACKLIGHT_ENABLE = yes + BACKLIGHT_BREATHING = yes + else + BACKLIGHT_ENABLE = no + BACKLIGHT_BREATHING = no + endif + + AUDIO_ENABLE = yes +endif + +MOUSEKEY_ENABLE = no