mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-26 21:26:46 +00:00
db35065e14
* add my config * fix backlight, clean up that code * group background code, restore static var * qwerty is supposed to be in the middle * wrap layer change backlight in ifdef * backlight levels and some more 'emojis'. * Restructure to make it possible to press cmd ent on the right side of the board with one hand. * Expose the period through the number layer. Add Hyper keys to mouse layer * reduce mouse speed * add a : -P key * Thumbs up and down, remove some keys that are duplicated via function keys, clean up * fix build issues * add various emoji * duplicate default Meira keymaps * Miera updates * add documented but unmapped emoji * Sound for the Meira, was stumped by a file size! Thanks drashna! * add docs * docs * revert lib changes... * clean up * clean up * remove make file * Fixes missing key * clean up * add my lets split * add more emoji * add the telophase board (unofficially, I guess...) * add missing files * add/reset files * Review feedback implementation: Not needed. Add #define FLIP_HALF to your config.h file instead. * Review feedback implementation: All of these includes should be replaced with #include QMK_KEYBOARD_H. * Review feedback implementation: [FAILING] You may want to use LAYOUT_ortho_4x12 instead, and move this to /layouts/community/ortho_4x12/ instead. That way, you can use the same keymap for all of the boards. * clean up * add a key for command tilde (osx loves it) * at least its building again * remove adjusts and migrate layer switching to MO(_LAYER) * update the telophase readme * update the telophase readme * grahampheaths -> grahampheath * ONEHAND_ENABLE -> SWAP_HANDS_ENABLE * convert lets split to use ortho_4x12 * Move lets split keyboard layout into community/ortho_4x12 * make telophase use LAYOUT() * I did it?! * Add clap and grin * swap tabs and back and forward * whitespace * Add ellipsis and thanks emoji * Move flip_half to telophase config (conflicts with lets split layout) * Use #pragma once instead of config_user_h * remove unused stuff
302 lines
10 KiB
C
302 lines
10 KiB
C
#include QMK_KEYBOARD_H
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
enum custom_layers {
|
|
_QWERTY,
|
|
_LOWER,
|
|
_RAISE,
|
|
_EMOJI,
|
|
};
|
|
|
|
enum custom_keycodes {
|
|
QWERTY = SAFE_RANGE,
|
|
LOWER,
|
|
RAISE,
|
|
EMOJI,
|
|
ABOVE,
|
|
BUG,
|
|
CONFUSED,
|
|
CRY,
|
|
CLAP,
|
|
ELIP,
|
|
FLIP,
|
|
FNGLEFT,
|
|
FNGRIGHT,
|
|
FROWN,
|
|
GRIN,
|
|
HEART,
|
|
JOY,
|
|
LLAP,
|
|
ROFL,
|
|
SHIT,
|
|
SING,
|
|
SHRUG,
|
|
THINK,
|
|
THMBDN,
|
|
THMBUP,
|
|
TOUNGE,
|
|
THANKS,
|
|
WINK
|
|
};
|
|
|
|
#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for GraveESC
|
|
#define KC_X1 MT(MOD_RSFT, KC_ENT) // Hold for Right Shift, Tap for Enter
|
|
#define KC_X2 MT(MOD_RSFT, LGUI(KC_ENT)) // Send Command Enter
|
|
#define KC_BACK LGUI(KC_LBRC) // Back
|
|
#define KC_FORWARD LGUI(KC_RBRC) // Forward
|
|
#define KC_EMOJ TT(_EMOJI) // Hold for Emoji Layer, or tap 5 times.
|
|
#define KC_QS LGUI(KC_SPC) // Send Command + Space (for QuickSilver).
|
|
#define KC_WTAB LGUI(KC_TILD) // Send Command + ~ (for window changing).
|
|
#define KC_TABR LGUI(KC_RCBR) // Send Command + } (for tab changing).
|
|
#define KC_TABL LGUI(KC_LCBR) // Send Command + { (for tab changing).
|
|
#define HYPR_0 HYPR(KC_TILD) // Send Hyper + ~.
|
|
#define HYPR_1 HYPR(KC_EXLM) // Send Hyper + !.
|
|
#define HYPR_2 HYPR(KC_AT) // Send Hyper + @.
|
|
|
|
// Fillers to make layering more clear
|
|
#define _______ KC_TRNS
|
|
#define XXXXXXX KC_NO
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
/* Qwerty
|
|
* ,-----------------------------------------------------------------------------------.
|
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
* |Emoji | Ctrl | Alt |Lower | Cmd |Space |Space |Raise | Left | Down | Up |Right |
|
|
* `-----------------------------------------------------------------------------------'
|
|
*/
|
|
[_QWERTY] = LAYOUT_ortho_4x12(
|
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
|
KC_X0, KC_A, KC_S, KC_D, KC_F, KC_G, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_X1,
|
|
KC_EMOJ, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
|
),
|
|
|
|
/* Lower
|
|
* ,-----------------------------------------------------------------------------------.
|
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
* |cmd(~)| <- | -> | TAB_L| TAB_R| F5 | F6 | _ | + | { | } | | |
|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
* | | | | | | | | Tab- | Vol- | Vol+ | Tab+ |
|
|
* `-----------------------------------------------------------------------------------'
|
|
*/
|
|
[_LOWER] = LAYOUT_ortho_4x12(
|
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
|
KC_WTAB, KC_BACK, KC_FORWARD, KC_TABL, KC_TABR, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
|
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______,
|
|
_______, _______, _______, _______, _______, KC_QS, KC_QS, _______, _______, _______, _______, _______
|
|
),
|
|
|
|
/* Raise
|
|
* ,-----------------------------------------------------------------------------------.
|
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
* |cmd(~)| F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
* | | | | | | | | Home | PgUp | PgDn | End |
|
|
* `-----------------------------------------------------------------------------------'
|
|
*/
|
|
[_RAISE] = LAYOUT_ortho_4x12(
|
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
|
KC_WTAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
|
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_X2,
|
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
|
),
|
|
|
|
/* Emoji Layer
|
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
|
* │HYPR0│ Q │ ;-) │ E │ 🤣 │ :-P │ 🙏🏼 │ U │:'-( │FLIP │ P │ │
|
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
* │HYPR1│ 👆 │SHRUG│ GRIN│ :-( │ G │ <3 │ :-) │ k │LLAP │ ; │ │
|
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
|
* │HYPR2│🎶^🎶│💭^💭│ 👏 | :-\ │ 🐛 │ n │ :-D │ SHIT│ ... │ / │ │
|
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
|
* │ │ │ │ │Brig-│ Sleep │Brig+│ 👈 │ 👎 | 👍 │ 👉 │
|
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
|
*/
|
|
[_EMOJI] = LAYOUT_ortho_4x12(
|
|
HYPR_0, _______, WINK, _______, ROFL, TOUNGE, THANKS, _______, CRY, FLIP, _______, _______ ,
|
|
HYPR_1, ABOVE, SHRUG, GRIN, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______ ,
|
|
HYPR_2, SING, THINK, CLAP, CONFUSED, BUG, _______, _______, SHIT, ELIP, _______, _______ ,
|
|
_______, _______, _______, _______, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, FNGLEFT, THMBDN, THMBUP, FNGRIGHT
|
|
),
|
|
};
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
|
#endif
|
|
|
|
void persistent_default_layer_set(uint16_t default_layer) {
|
|
eeconfig_update_default_layer(default_layer);
|
|
default_layer_set(default_layer);
|
|
}
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
switch (keycode) {
|
|
case ABOVE:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&above; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case BUG:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&bug;");
|
|
}
|
|
return false;
|
|
break;
|
|
case CONFUSED:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(":-\\");
|
|
}
|
|
return false;
|
|
break;
|
|
case CRY:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(":'-( ");
|
|
}
|
|
return false;
|
|
break;
|
|
case CLAP:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&clap; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case ELIP:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("...");
|
|
}
|
|
return false;
|
|
break;
|
|
case FLIP:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&fliptable;");
|
|
}
|
|
return false;
|
|
break;
|
|
case FNGLEFT:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&fingerleft; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case FNGRIGHT:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&fingerright; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case FROWN:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(":-( ");
|
|
}
|
|
return false;
|
|
break;
|
|
case GRIN:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(":-D ");
|
|
}
|
|
return false;
|
|
break;
|
|
case HEART:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("<3 ");
|
|
}
|
|
return false;
|
|
break;
|
|
case JOY:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(":-) ");
|
|
}
|
|
return false;
|
|
break;
|
|
case LLAP:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&llap; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case ROFL:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&rofl; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case SHIT:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&shit; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case SING:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("_sing_");
|
|
}
|
|
return false;
|
|
break;
|
|
case SHRUG:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&shrug; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case THANKS:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&thanks;");
|
|
}
|
|
return false;
|
|
break;
|
|
case THINK:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("_think_");
|
|
}
|
|
return false;
|
|
break;
|
|
case THMBDN:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&thumbdown; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case THMBUP:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("&thumbup; ");
|
|
}
|
|
return false;
|
|
break;
|
|
case TOUNGE:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(":-P ");
|
|
}
|
|
return false;
|
|
break;
|
|
case WINK:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(";-) ");
|
|
}
|
|
return false;
|
|
break;
|
|
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void matrix_scan_user(void) {
|
|
return;
|
|
};
|
|
|