summaryrefslogtreecommitdiff
path: root/users/talljoe
diff options
context:
space:
mode:
Diffstat (limited to 'users/talljoe')
-rw-r--r--users/talljoe/config.h9
-rw-r--r--users/talljoe/readme.md7
-rw-r--r--users/talljoe/rules.mk3
-rw-r--r--users/talljoe/talljoe.c124
-rw-r--r--users/talljoe/talljoe.h108
5 files changed, 251 insertions, 0 deletions
diff --git a/users/talljoe/config.h b/users/talljoe/config.h
new file mode 100644
index 0000000000..15bbde6bcd
--- /dev/null
+++ b/users/talljoe/config.h
@@ -0,0 +1,9 @@
+#ifndef USERSPACE_CONFIG_H
+#define USERSPACE_CONFIG_H
+
+#define PREVENT_STUCK_MODIFIERS
+#define IGNORE_MOD_TAP_INTERRUPT
+
+#define RESET_LAYER 15
+
+#endif // !USERSPACE_CONFIG_H
diff --git a/users/talljoe/readme.md b/users/talljoe/readme.md
new file mode 100644
index 0000000000..e70c5c6dc0
--- /dev/null
+++ b/users/talljoe/readme.md
@@ -0,0 +1,7 @@
+Copyright 2018 Joe Wasson <info@talljoe.com> @talljoe
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk
new file mode 100644
index 0000000000..fa23149606
--- /dev/null
+++ b/users/talljoe/rules.mk
@@ -0,0 +1,3 @@
+SRC += talljoe.c
+
+EXTRAFLAGS+=-flto
diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c
new file mode 100644
index 0000000000..e49a3060d2
--- /dev/null
+++ b/users/talljoe/talljoe.c
@@ -0,0 +1,124 @@
+#include QMK_KEYBOARD_H
+
+#include "talljoe.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT(
+ KC_GRV , 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_BSLS, KC_ESC,
+ 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_BSPC,
+ US_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, KC_SCLN, US_QUOT, US_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, MO_ADJ ,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_APP , KC_RCTL, KC_PTT ),
+ [_WORKMAN] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______,
+ _______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______,
+ _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+ [_NORMAN] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______,
+ _______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______,
+ _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+ [_DVORAK] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______,
+ _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y , KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL , _______,
+ _______, KC_A, KC_O, KC_E, KC_U, KC_I , KC_D, KC_H, KC_T, KC_N, KC_S, US_MINS, _______,
+ _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+ [_COLMAK] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______,
+ _______, KC_A, KC_R, KC_S, KC_T, KC_D , KC_H, KC_N, KC_E, KC_I, KC_O , _______, _______,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+
+#ifdef ENABLE_GAME_LAYER
+ [_GAME] = 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 , KC_BSLS, KC_GRV,
+ 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_BSPC,
+ MO_NAV , 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, MO_ADJ ,
+ KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_PTT ),
+#endif
+ [_NAV] = LAYOUT(
+ KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_TAB , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN2, KC_BTN3, KC_DEL ,
+ US_CAPS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_RCTL, TG_ADJ ,
+ KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, XXXXXXX,
+ KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
+ [_NUM] = LAYOUT(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, XXXXXXX, KC_DEL ,
+ US_CAPS, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_PENT, XXXXXXX,
+ KC_LSFT, KC_EQL, KC_PLUS, KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, XXXXXXX,
+ KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ),
+ // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards)
+ [_ADJUST] = LAYOUT(
+ MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST ,
+ XXXXXXX, H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, KC_DEL ,
+ XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ ,
+ TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX,
+ MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME),
+ // To Reset hit FN + ` + Esc
+ [_RESET] = LAYOUT(
+ RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET ,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ RESET , XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX),
+};
+
+void matrix_scan_user(void) {
+ #ifdef KEYBOARD_gh60
+ if (IS_LAYER_ON(_GAME)) {
+ gh60_wasd_leds_on();
+ } else {
+ gh60_wasd_leds_off();
+ }
+ #endif
+}
+
+void matrix_init_user(void) {
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+}
+
+uint32_t default_layer_state_set_kb(uint32_t state) {
+ // persist changes to default layers
+ eeconfig_update_default_layer(state);
+ return state;
+}
+
+__attribute__ ((weak))
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+// If console is enabled, it will print the matrix position and status of each key pressed
+#ifdef CONSOLE_ENABLE
+ xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed);
+#endif //CONSOLE_ENABLE
+
+ switch (keycode) {
+ case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
+ if (!record->event.pressed) {
+ SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
+
+ #if defined(BOOTLOADER_HALFKAY)
+ ":teensy"
+ #elif defined(BOOTLOADER_CATERINA)
+ ":avrdude"
+ #else
+ ":dfu"
+ #endif
+ SS_TAP(X_ENTER));
+ }
+ return false;
+ break;
+ }
+ return process_record_keymap(keycode, record);
+}
diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h
new file mode 100644
index 0000000000..17e54af699
--- /dev/null
+++ b/users/talljoe/talljoe.h
@@ -0,0 +1,108 @@
+#ifndef USERSPACE
+#define USERSPACE
+
+#include "quantum.h"
+
+enum userspace_custom_keycodes {
+ KC_MAKE = SAFE_RANGE, // can always be here
+ DFAULTS,
+ TOGGLE_BACKLIGHT,
+ EFFECT,
+ EFFECT_END = EFFECT + 10
+};
+
+#ifndef RESET_LAYER
+#define RESET_LAYER 15
+#endif
+
+enum layers {
+ _BASE = 0,
+ _WORKMAN,
+ _NORMAN,
+ _DVORAK,
+ _COLMAK,
+ _GAME,
+ _NAV,
+ _NUM,
+ _ADJUST,
+ _RESET = RESET_LAYER,
+};
+
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+#define MO_NAV MO(_NAV)
+#define MO_ADJ MO(_ADJUST)
+#define MO_RST MO(_RESET)
+#define TG_ADJ TG(_ADJUST)
+#ifdef ENABLE_GAME_LAYER
+ #define TG_GAME TG(_GAME)
+#else
+ #define TG_GAME KC_NO
+#endif
+#define LY_QWER DF(_BASE)
+#define LY_WORK DF(_WORKMAN)
+#define LY_NRMN DF(_NORMAN)
+#define LY_DVRK DF(_DVORAK)
+#define LY_CLMK DF(_COLMAK)
+#define TG_NKRO MAGIC_TOGGLE_NKRO
+#define KC_PTT KC_F24
+#define MS_MID KC_MS_BTN3
+#define FX(x) (EFFECT + x)
+
+#define US_CAPS CTL_T(KC_ESC)
+#define US_QUOT RCTL_T(KC_QUOT)
+#define US_MINS RCTL_T(KC_QUOT)
+#define US_ENT LT(_NUM, KC_ENT)
+
+#ifndef SPACE_COUNT
+ #define SPACE_COUNT 1
+#endif
+#if (SPACE_COUNT == 1)
+ #define KC_SPC1 LT(_NAV, KC_SPC)
+ #define KC_SPC2 XXXXXXX
+ #define KC_SPC3 XXXXXXX
+
+ #define NV_SPC1 _______
+ #define NV_SPC2 _______
+ #define NV_SPC3 _______
+
+ #define NM_SPC1 _______
+ #define NM_SPC2 _______
+ #define NM_SPC3 _______
+#elif (SPACE_COUNT == 3)
+ #define KC_SPC1 KC_BSPC
+ #define KC_SPC2 LT(_NUM,KC_ENT)
+ #define KC_SPC3 LT(_NAV,KC_SPC)
+
+ #define NV_SPC1 KC_SPC
+ #define NV_SPC2 C_S_T(KC_ENT)
+ #define NV_SPC3 KC_SPC
+
+ #define NM_SPC2 XXXXXXX
+ #define NM_SPC1 KC_SPC
+ #define NM_SPC3 KC_0
+#else
+ #error "Unsupported space count:" SPACE_COUNT
+#endif
+
+#ifndef ZEAL_RGB
+ #define BR_INC KC_NO
+ #define BR_DEC KC_NO
+ #define EF_INC KC_NO
+ #define EF_DEC KC_NO
+ #define ES_INC KC_NO
+ #define ES_DEC KC_NO
+ #define H1_INC KC_NO
+ #define H1_DEC KC_NO
+ #define S1_INC KC_NO
+ #define S1_DEC KC_NO
+ #define H2_INC KC_NO
+ #define H2_DEC KC_NO
+ #define S2_INC KC_NO
+ #define S2_DEC KC_NO
+ #define FN_MO13 KC_NO
+ #define FN_MO2 KC_NO
+#endif
+
+#endif