Skip to content

Commit

Permalink
Keymap: adding my personal userspace to QMK master (qmk#3605)
Browse files Browse the repository at this point in the history
* Adding my personal planck keymap

* Adding readme.md to my keymap

* Create my userspace

add users/ishtob/

* Moved macros off keymap

macros now exsists in my userspace, moved them off keyboard specific keymaps

* Create my userspace

add users/ishtob/

* rebase from main QMK repo
  • Loading branch information
ishtob authored and drashna committed Aug 10, 2018
1 parent feb5e4a commit fd0bd29
Show file tree
Hide file tree
Showing 10 changed files with 349 additions and 206 deletions.
60 changes: 18 additions & 42 deletions keyboards/planck/keymaps/ishtob/config.h
Original file line number Diff line number Diff line change
@@ -1,60 +1,36 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H

#include "../../config.h"
#ifndef USERSPACE_CONFIG_H
#define USERSPACE_CONFIG_H

#define LEADER_TIMEOUT 300
//#define BACKLIGHT_BREATHING
#define PREVENT_STUCK_MODIFIERS

#ifdef AUDIO_ENABLE

// #define STARTUP_SONG SONG(E1M1_DOOM)
// #define GOODBYE_SONG SONG(SONIC_RING)
/* #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(COLEMAK_SOUND), \
SONG(DVORAK_SOUND), \
}
*/
//audio clicky
#define AUDIO_CLICKY
// to enable clicky on startup
//#define AUDIO_CLICKY_ON
#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f

/* ws2812 RGB LED
#define RGB_DI_PIN B5
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 8 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
*/
#undef PLANCK_MIT_LAYOUT

#endif

#define FORCE_NKRO

#define LEADER_TIMEOUT 300
#define PREVENT_STUCK_MODIFIERS

#undef DEBOUNCE
#define DEBOUNCE 0

//rgb-reactive
#define RGB_MATRIX_KEYPRESSES
#define EECONFIG_RGB_MATRIX (uint32_t *)16

//skip usb startup check
//#define NO_USB_STARTUP_CHECK


/*
* MIDI options
*/

/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1

/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
#define MIDI_BASIC

/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED

/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2


#endif
112 changes: 15 additions & 97 deletions keyboards/planck/keymaps/ishtob/keymap.c
Original file line number Diff line number Diff line change
@@ -1,73 +1,17 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.

#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"
// #include "dynamic_macro.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"

//Macro definition
#if (__has_include("macros_private.h") && !defined(SECRETS))
#include "macros_private.h"
#else
#include "macros_public.h"
#endif
#include "ishtob.h"

extern keymap_config_t keymap_config;

// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _PLOVER 5
#define _FNLAYER 6
#define _NUMLAY 7
#define _MOUSECURSOR 8
#define _ADJUST 16

enum planck_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
LOWER,
RAISE,
BACKLIT,
EXT_PLV,
DFU,
};

// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
// Custom macros
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
// Requires KC_TRNS/_______ for the trigger key in the destination layer
#define LT_FN(kc) LT(_FNLAYER, kc) // L-ayer T-ap Function Layer
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
#define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY
#define P_CITRIX M(KC_CITRIX) // My login macros
#define P_MPASS M(KC_MPASS)
#define P_META M(KC_META)
#define O_DAYRN M(KC_DAYRN) // My work macros
#define O_AUTODC M(KC_AUTODC)
#define O_RTQ6H M(KC_RTQ6H)
#define M_EMAIL M(KC_EMAIL) // My personal email
#define M_EMAIL2 M(KC_EMAIL2) // My work email

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
,-----------------------------------------------------------------------------------.
Expand All @@ -86,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS),
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
),

/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
Expand All @@ -104,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS),
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
),

/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
Expand All @@ -122,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, LT_RAI(KC_MINS),
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
),

/* Lower
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ |
Expand All @@ -140,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Raise
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | * | \ |
Expand All @@ -158,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_LEFT, KC_DOWN, KC_RIGHT,KC__MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______,
_______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NLCK
),

/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
Expand All @@ -170,14 +114,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------------------'
*/

[_PLOVER] = LAYOUT_planck_grid(
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
),

/* FN layer on Esc key
* ,-----------------------------------------------------------------------------------.
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + |
Expand All @@ -195,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Num Layer
* ,-----------------------------------------------------------------------------------.
* | | Q | Up | 4 | | | 7 | 8 | 9 | - | + | Bksp |
Expand All @@ -213,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______,
_______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, KC_NLCK, KC_MPLY
),

/* Mouse Layer (semi-col)
* ,-----------------------------------------------------------------------------------.
* | ACCL0| ACCL1| ACCL2|Email |Email2| Home | Wh_Up| WHL_L| M_Up | WHL_R|PASS| Meta |
Expand All @@ -225,14 +169,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | BTN1 | | | | Citx | |
* `-----------------------------------------------------------------------------------'
*/

[_MOUSECURSOR] = LAYOUT_planck_grid(
KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META,
_______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______,
_______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC
),

/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del |
Expand All @@ -250,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG,
_______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG
)


};

Expand Down Expand Up @@ -281,7 +225,7 @@ void persistant_default_layer_set(uint16_t default_layer) {
void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };


bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
Expand Down Expand Up @@ -369,36 +313,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
case DFU:
if (record->event.pressed) {
clear_keyboard();
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
process_midi_all_notes_off();
#endif
#if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE)
music_all_notes_off();
uint16_t timer_start = timer_read();
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
shutdown_user();
while(timer_elapsed(timer_start) < 250)
wait_ms(1);
stop_all_notes();
#else
wait_ms(250);
#endif
// this is also done later in bootloader.c - not sure if it's neccesary here
#ifdef BOOTLOADER_CATERINA
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
#endif
bootloader_jump();
}
return false;
break;
}
return true;
}

void matrix_init_user(void) {
void matrix_init_keymap(void) {
#ifdef AUDIO_ENABLE
startup_user();
#endif
Expand Down Expand Up @@ -432,4 +351,3 @@ void music_scale_user(void)

#endif


57 changes: 0 additions & 57 deletions keyboards/planck/keymaps/ishtob/macros_public.h

This file was deleted.

7 changes: 1 addition & 6 deletions keyboards/planck/keymaps/ishtob/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#Ishtob's personal planck layout

THis is the default layout used with my planck light, though the rest of the keymap could also be used for the full sized planck or let's split.
This is the default layout used with my planck light, though the rest of the keymap could also be used for the full sized planck or let's split.


Main difference with the default layout:
Expand All @@ -14,8 +14,3 @@ Main difference with the default layout:
* Capslock is on the base layer as it is used quite often with my work's software

* Numbers layer on lower is positioned to resemble a numpad with 5 taking the location of J for the homing bump and easier entry


# Secret Macros

`macros_public.h` contains a list of macros that can be replaced with passwords or other sensative private macros. `macros_private.h` will be used if it exsists in the folder during compiling and will ignore `macros_public.h` The private macros can be excluded from git commits by adding it to the exclusion list.
4 changes: 0 additions & 4 deletions keyboards/planck/keymaps/ishtob/rule.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ifeq ($(strip $(SECRETS)),yes)
OPT_DEF += -DSECRETS
endif

# Build Options
# comment out to disable the options.
#
Expand Down
Loading

0 comments on commit fd0bd29

Please sign in to comment.