From 10c636a1eeaff65292edabe7f01c781110ba871f Mon Sep 17 00:00:00 2001 From: Graham P Heath Date: Sun, 19 Aug 2018 15:29:11 -0500 Subject: Keyboard: add Telophase board (and Graham's keymaps) (#3244) * 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 --- layouts/community/ortho_4x12/grahampheath/config.h | 39 +++ layouts/community/ortho_4x12/grahampheath/keymap.c | 287 +++++++++++++++++++++ layouts/community/ortho_4x12/grahampheath/rules.mk | 3 + 3 files changed, 329 insertions(+) create mode 100644 layouts/community/ortho_4x12/grahampheath/config.h create mode 100644 layouts/community/ortho_4x12/grahampheath/keymap.c create mode 100644 layouts/community/ortho_4x12/grahampheath/rules.mk (limited to 'layouts/community/ortho_4x12') diff --git a/layouts/community/ortho_4x12/grahampheath/config.h b/layouts/community/ortho_4x12/grahampheath/config.h new file mode 100644 index 0000000000..21d647921c --- /dev/null +++ b/layouts/community/ortho_4x12/grahampheath/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define FLIP_HALF + +#include "keyboards/lets_split/config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/layouts/community/ortho_4x12/grahampheath/keymap.c b/layouts/community/ortho_4x12/grahampheath/keymap.c new file mode 100644 index 0000000000..e2421e9a7e --- /dev/null +++ b/layouts/community/ortho_4x12/grahampheath/keymap.c @@ -0,0 +1,287 @@ +#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, + FLIP, + FNGLEFT, + FNGRIGHT, + FROWN, + GRIN, + HEART, + JOY, + LLAP, + ROFL, + SHIT, + SING, + SHRUG, + THINK, + THMBDN, + THMBUP, + TOUNGE, + 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 │ Y │ 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, _______, _______, CRY, FLIP, _______, _______ , + HYPR_1, ABOVE, SHRUG, GRIN, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______ , + HYPR_2, SING, THINK, CLAP, CONFUSED, BUG, _______, _______, SHIT, _______, _______, _______ , + _______, _______, _______, _______, 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 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 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; +}; + diff --git a/layouts/community/ortho_4x12/grahampheath/rules.mk b/layouts/community/ortho_4x12/grahampheath/rules.mk new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/layouts/community/ortho_4x12/grahampheath/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3