1
0
Fork 0

More work on Talljoe layout including adding layout support for HHKB and TKL. (#2946)

* Add tap-dancing semicolon.

* Infinity60 was running out of USB space.

* Rename common layout variable so it doesn't collide with some keyboards.

* Godspeed!!!

* Patch the number of LEDs for 1up60rgb

* Don't light up if rgblight is off.

* Add HHKB layout.

* Add HHKB to Talljoe's layout.

* Bring back bananasplit keymap.

* info.json

* Userspace config.h doesn't seem to be setting PREVENT_STUCK_MODIFIERS

* Remove 1uprgb workaround

* Add TKL to talljoe keymap.

Also introduces the tkl layout.
This commit is contained in:
Joe Wasson 2018-05-12 09:54:35 -07:00 committed by Drashna Jaelre
parent 48a68dcf10
commit 6dda0d6e34
26 changed files with 407 additions and 28 deletions

View file

@ -63,4 +63,19 @@
K400, K401, K403, K406, K410, K411, K413, K414 \
)
/* HHKB Variant */
#define LAYOUT_60_hhkb( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
K401, K403, K406, K411, K413 \
) LAYOUT_all( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \
K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \
)
#endif

View file

@ -19,6 +19,9 @@
"LAYOUT_60_ansi_split_bs_rshift": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
},
"LAYOUT_60_hhkb": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}]
}
}
}

View file

@ -55,4 +55,4 @@ BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= yes
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb

View file

@ -0,0 +1,23 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#define PREVENT_STUCK_MODIFIERS
#define SPACE_COUNT 3
#define TEMPLATE( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
{ K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\
}
#endif

View file

@ -0,0 +1 @@
// This space intentionally left blank

View file

@ -87,4 +87,6 @@
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
}
#define LAYOUT_tkl_ansi KEYMAP_TKL
#endif

View file

@ -68,4 +68,6 @@ AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
CUSTOM_MATRIX = yes
SRC += matrix.c
SRC += matrix.c
LAYOUTS = tkl_ansi

View file

@ -3,9 +3,10 @@
#include QMK_KEYBOARD_CONFIG_H
#define PREVENT_STUCK_MODIFIERS
#define ENABLE_GAME_LAYER
#define LAYOUT( \
#define TEMPLATE( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \

View file

@ -3,9 +3,10 @@
#include QMK_KEYBOARD_CONFIG_H
#define PREVENT_STUCK_MODIFIERS
#define ENABLE_GAME_LAYER
#define LAYOUT( \
#define TEMPLATE( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \

View file

@ -0,0 +1,23 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#define PREVENT_STUCK_MODIFIERS
#define ENABLE_GAME_LAYER
#define TEMPLATE( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \
) LAYOUT_60_hhkb( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K41, K42, K45, K48, K4C \
)
#endif //CONFIG_USER_H

View file

@ -0,0 +1 @@
// This space intentionally left blank

View file

@ -0,0 +1 @@
USER_NAME := talljoe

View file

@ -4,7 +4,7 @@
#include QMK_KEYBOARD_CONFIG_H
#define SPACE_COUNT 3
#define LAYOUT( \
#define TEMPLATE( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \

View file

@ -0,0 +1,25 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#define PREVENT_STUCK_MODIFIERS
#define ENABLE_GAME_LAYER
#define TEMPLATE_TKL(\
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
) LAYOUT_tkl_ansi( \
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
KN2,KC_NO,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
)
#endif //CONFIG_USER_H

View file

@ -0,0 +1,89 @@
#ifdef KEYBOARD_zeal60
#include "config.h"
#include "zeal60.h"
#include "zeal_backlight.h"
#include "action_layer.h"
#include "solarized.h"
#include "talljoe.h"
// from zeal_backlight.c
// we want to be able to set indicators for the spacebar stabs
// but they are not represented by a row/index.
extern zeal_backlight_config g_config;
void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led );
void set_backlight_defaults(void) {
uint8_t space;
uint8_t caps_lock;
map_row_column_to_led(3, 12, &caps_lock);
map_row_column_to_led(4, 7, &space);
zeal_backlight_config default_values = {
.use_split_backspace = USE_SPLIT_BACKSPACE,
.use_split_left_shift = USE_SPLIT_LEFT_SHIFT,
.use_split_right_shift = USE_SPLIT_RIGHT_SHIFT,
.use_7u_spacebar = USE_7U_SPACEBAR,
.use_iso_enter = USE_ISO_ENTER,
.disable_when_usb_suspended = 1,
.disable_after_timeout = 0,
.brightness = 255,
.effect = 10,
.color_1 = solarized.base2,
.color_2 = solarized.base02,
.caps_lock_indicator = { .index = caps_lock, .color = solarized.red },
.layer_1_indicator = { .index = space, .color = solarized.blue },
.layer_2_indicator = { .index = space, .color = solarized.yellow },
.layer_3_indicator = { .index = 254, .color = solarized.red },
.alphas_mods = {
BACKLIGHT_ALPHAS_MODS_ROW_0,
BACKLIGHT_ALPHAS_MODS_ROW_1,
BACKLIGHT_ALPHAS_MODS_ROW_2,
BACKLIGHT_ALPHAS_MODS_ROW_3,
BACKLIGHT_ALPHAS_MODS_ROW_4 }
};
memcpy(&g_config, &default_values, sizeof(zeal_backlight_config));
backlight_config_save();
solarized_t* S = &solarized;
HSV alphas = S->base2;
HSV custom_color_map[MATRIX_ROWS][MATRIX_COLS] = CM(
S->red, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->red,
S->orange, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->orange,
S->green, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->green,
S->blue, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->blue, S->blue,
S->violet, S->magenta, S->yellow, alphas, S->yellow, S->magenta, S->violet, S->green
);
for (uint8_t row = 0; row < MATRIX_ROWS; ++row) {
for (uint8_t col = 0; col < MATRIX_COLS; ++col) {
backlight_set_key_color(row, col, custom_color_map[row][col]);
}
}
}
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
static uint8_t last_effect;
switch (keycode) {
case DFAULTS:
if (IS_PRESSED(record->event)) set_backlight_defaults();
return false;
case BL_TOGG:
if (IS_PRESSED(record->event)) {
if (g_config.effect) {
last_effect = g_config.effect;
g_config.effect = 0;
} else {
g_config.effect = last_effect;
}
}
return false;
case EFFECT...EFFECT_END:
if (IS_PRESSED(record->event)) {
uint8_t effect = keycode - EFFECT;
g_config.effect = effect;
backlight_config_save();
}
return false;
}
return true;
}
#endif

View file

@ -0,0 +1 @@
USER_NAME := talljoe

View file

@ -0,0 +1,65 @@
#include QMK_KEYBOARD_H
#define BASE 0
#define HHKB 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* BASE Level: Default Layer
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
| Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
|------+------+-----------------------+------+------|
| LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
|------+------+-----------------------+------+------|
*/
[BASE] = LAYOUT_60_hhkb( // default layer
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, \
KC_LCTL, 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(HHKB), \
KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
/* Layer HHKB: HHKB mode (HHKB Fn)
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
| Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
| Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
| | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
| | | | | | | + | - | End | PgD | Dow | | | | |
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|------+------+----------------------+------+------+
| **** | **** | ******************** | **** | **** |
|------+------+----------------------+------+------+
*/
[HHKB] = LAYOUT_60_hhkb(
KC_PWR, 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_INS, KC_DEL, \
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
};

View file

@ -0,0 +1,5 @@
["Esc","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=","|\n\\","~\n`"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"Delete"],
[{w:1.75},"Control","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"],
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:1.75},"Shift","Fn"],
[{x:1.5},"Os",{w:1.5},"Alt",{a:7,w:7},"",{a:4,w:1.5},"Alt","Os"]

View file

@ -0,0 +1,3 @@
# 60_hhkb
LAYOUT_60_hhkb

View file

@ -0,0 +1,11 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_ansi(\
KC_ESC, 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_PSCR,KC_SLCK,KC_PAUS, \
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_BSPC, KC_INS ,KC_HOME,KC_PGUP, \
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 ,KC_END ,KC_PGDN, \
KC_CAPS, 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_NUBS, 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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \
};

View file

@ -0,0 +1,6 @@
["Esc",{x:1},"F1","F2","F3","F4",{x:0.5},"F5","F6","F7","F8",{x:0.5},"F9","F10","F11","F12",{x:0.25},"PrtSc","Scroll Lock","Pause\nBreak"],
[{y:0.5},"~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.25},"Insert","Home","PgUp"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\",{x:0.25},"Delete","End","PgDn"],
[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"],
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift",{x:1.25},"↑"],
[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl",{x:0.25},"←","↓","→"]

View file

@ -0,0 +1,3 @@
# tkl_ansi
LAYOUT_tkl_ansi

View file

@ -1,3 +1,7 @@
SRC += talljoe.c
SRC += talljoe.c tapdance.c
EXTRAFLAGS+=-flto
TAP_DANCE_ENABLE=yes
CONSOLE_ENABLE=no
COMMAND_ENABLE=no

View file

@ -3,66 +3,67 @@
#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(
[_BASE] = TEMPLATE_TKL(
KC_ESC, 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_PSCR, KC_SLCK, MO_ADJ ,
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_INS , KC_HOME, KC_PGUP,
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, KC_DEL , KC_END , KC_PGDN,
US_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_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, KC_UP ,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT),
[_WORKMAN] = TEMPLATE(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______,
_______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_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(
[_NORMAN] = TEMPLATE(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______,
_______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , US_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(
[_DVORAK] = TEMPLATE(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______,
_______, US_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[_COLMAK] = LAYOUT(
[_COLMAK] = TEMPLATE(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______,
_______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, US_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(
[_GAME] = TEMPLATE(
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(
[_NAV] = TEMPLATE(
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_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP ,
KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
[_NUM] = LAYOUT(
[_NUM] = TEMPLATE(
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_LSFT, KC_EQL, KC_PLUS, KC_BSLS, KC_PIPE, KC_SCLN, 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(
[_ADJUST] = TEMPLATE(
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),
MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_STEP, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME),
// To Reset hit FN + ` + Esc
[_RESET] = LAYOUT(
[_RESET] = TEMPLATE(
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,
@ -98,6 +99,27 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_ENABLE
static uint32_t savedRgbMode;
static uint16_t savedHue;
static uint8_t savedSat;
static uint8_t savedVal;
if (keycode == KC_ESC) {
if (record->event.pressed) {
savedRgbMode = rgblight_get_mode();
savedHue = rgblight_get_hue();
savedSat = rgblight_get_sat();
savedVal = rgblight_get_val();
rgblight_mode(1);
rgblight_setrgb(255, 0, 0);
} else {
rgblight_mode(savedRgbMode);
rgblight_sethsv(savedHue, savedSat, savedVal);
}
}
#endif
// 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);

View file

@ -28,6 +28,10 @@ enum layers {
_RESET = RESET_LAYER,
};
enum tap_dancers {
TD_SEMICOLON
};
#define _______ KC_TRNS
#define XXXXXXX KC_NO
@ -53,6 +57,7 @@ enum layers {
#define US_CAPS CTL_T(KC_ESC)
#define US_QUOT RCTL_T(KC_QUOT)
#define US_MINS RCTL_T(KC_QUOT)
#define US_SCLN TD(TD_SEMICOLON)
#define US_ENT LT(_NUM, KC_ENT)
#ifndef SPACE_COUNT
@ -105,4 +110,37 @@ enum layers {
#define FN_MO2 KC_NO
#endif
#ifdef TEMPLATE_TKL
#define _X_ KC_NO
#define TEMPLATE( \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KJ6, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KA5, \
KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1 \
) TEMPLATE_TKL ( \
KJ6, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, KA5, \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, _X_, _X_, _X_, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, _X_, _X_, _X_, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, _X_, \
KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, _X_, _X_, _X_ \
)
#else
#define TEMPLATE_TKL( \
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
) TEMPLATE( \
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KJ6, \
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, \
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KA5, \
KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1 \
)
#endif
#endif

34
users/talljoe/tapdance.c Normal file
View file

@ -0,0 +1,34 @@
//Tap Dance
#include "talljoe.h"
// Send semin-colon + enter on two taps
void tap_dance_semicolon(qk_tap_dance_state_t *state, void *user_data) {
switch(state->count) {
case 1:
register_code(KC_SCLN);
unregister_code(KC_SCLN);
break;
case 2:
register_code(KC_SCLN);
unregister_code(KC_SCLN);
uint8_t mods = get_mods();
if (mods) {
clear_mods();
}
register_code(KC_ENT);
unregister_code(KC_ENT);
if (mods) {
set_mods(mods);
}
reset_tap_dance(state);
break;
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_SEMICOLON] = ACTION_TAP_DANCE_FN(tap_dance_semicolon),
};