summaryrefslogtreecommitdiff
path: root/keyboards/levinson/keymaps/jyh2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/levinson/keymaps/jyh2')
-rw-r--r--keyboards/levinson/keymaps/jyh2/config.h33
-rw-r--r--keyboards/levinson/keymaps/jyh2/keymap.c222
-rw-r--r--keyboards/levinson/keymaps/jyh2/readme.md32
-rw-r--r--keyboards/levinson/keymaps/jyh2/rules.mk2
4 files changed, 289 insertions, 0 deletions
diff --git a/keyboards/levinson/keymaps/jyh2/config.h b/keyboards/levinson/keymaps/jyh2/config.h
new file mode 100644
index 0000000000..f50674bb88
--- /dev/null
+++ b/keyboards/levinson/keymaps/jyh2/config.h
@@ -0,0 +1,33 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+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 <http://www.gnu.org/licenses/>.
+*/
+#pragma once
+
+/* Select hand configuration */
+#define MASTER_LEFT
+
+/* Tap Dance timing */
+#define TAPPING_TERM 150
+
+/* Toggling layer requires # taps */
+#define TAPPING_TOGGLE 3
+
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+
diff --git a/keyboards/levinson/keymaps/jyh2/keymap.c b/keyboards/levinson/keymaps/jyh2/keymap.c
new file mode 100644
index 0000000000..4b7442928e
--- /dev/null
+++ b/keyboards/levinson/keymaps/jyh2/keymap.c
@@ -0,0 +1,222 @@
+#include QMK_KEYBOARD_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 _LOWER 3 /* Symbols, Media */
+#define _RAISE 4 /* Numbers, Arrows */
+#define _FUNC 5 /* Function Keys */
+#define _NUMS 6 /* Numpad */
+#define _ADJUST 16
+
+/* short layer aliases */
+#define _QW _QWERTY
+#define _LW _LOWER
+#define _RS _RAISE
+#define _NM _NUMS
+#define _AD _ADJUST
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST,
+ MKITPNK,
+ DYNAMIC_MACRO_RANGE
+};
+
+#include "dynamic_macro.h"
+
+#define DREC_1 DYN_REC_START1
+#define DREC_2 DYN_REC_START2
+#define DPLAY_1 DYN_MACRO_PLAY1
+#define DPLAY_2 DYN_MACRO_PLAY2
+#define DSTOP DYN_REC_STOP
+
+
+// Mod Tap Definitions
+// -------------------
+ // Tap Hold
+ // ------------------
+#define GUI_GRV MT(MOD_LGUI, KC_GRV) // ` Meta
+#define CTL_ESC MT(MOD_LCTL, KC_ESC) // Esc Left Control
+#define SFT_MIN MT(MOD_LSFT, KC_MINS) // - Left Shift
+#define MEH_LBC MT(MOD_MEH, KC_LBRC) // [ Meh
+#define CTL_BSP MT(MOD_LCTL, KC_BSPC) // Bkspce Left Control
+#define HPR_RBC MT(MOD_HYPR, KC_RBRC) // ] Hyper
+#define SFT_EQL MT(MOD_RSFT, KC_EQL) // = Right Shift
+#define GUI_BSL MT(MOD_RGUI, KC_BSLS) // \ Meta
+
+#define NUM_TAB LT(_NUMS, KC_TAB) // Tab Layer Numpad
+
+#define CTL_DEL MT(MOD_LCTL, KC_DEL) // Del Left Control
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ` | Q | W | E | R | T | | Y | U | I | O | P | \ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | - | Z | X | C | V | B | | N | M | , | . | / | = |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | [ | Meta | Alt | Lower| Bksp | | Space| Raise| Alt | Meta | ] | Enter|
+ * `-----------------------------------------' `-----------------------------------------'
+ * with Hold (Emacs-oriented)
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | Meta | | | | | | | | | | | | Meta |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Ctrl | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Shift| | | | | | | | | | | | Shift|
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Numpd| Meh | | | | Ctrl | | | | | | Hyper| |
+ * `-----------------------------------------' `-----------------------------------------'
+ */
+ [_QW] = LAYOUT_ortho_4x12(
+ GUI_GRV, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , GUI_BSL,
+ CTL_ESC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT,
+ SFT_MIN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, SFT_EQL,
+ NUM_TAB, MEH_LBC, KC_LGUI, KC_LALT, LOWER , CTL_BSP, KC_SPC , RAISE , KC_RALT, KC_RGUI, HPR_RBC, KC_ENT
+ ),
+
+/* Raise
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | Left | Up | Down | Right| ; | | ' | 4 | 5 | 6 | * | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | { | } | ( | ) | , | | - | 1 | 2 | 3 | / | = |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | |Adjust| | | | RAISE| . | 0 | + | Enter|
+ * `-----------------------------------------' `-----------------------------------------'
+ */
+ [_RS] = LAYOUT_ortho_4x12(
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______,
+ _______, KC_LEFT, KC_UP , KC_DOWN, KC_RGHT, KC_SCLN, KC_QUOT, KC_4 , KC_5 , KC_6 , KC_ASTR, _______,
+ _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_COMM, KC_MINS, KC_1 , KC_2 , KC_3 , KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT , KC_0 , KC_PLUS, _______
+ ),
+
+/* Lower
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Del | Vol+ | Mute | Play | PgUp | Home | | F1 | F2 | F3 | F4 | F5 | F6 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | Vol- | < M | M > | PgDn | End | | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | |LOWER | | | |Adjust| | | | Enter|
+ * `-----------------------------------------' `-----------------------------------------'
+ */
+ [_LW] = LAYOUT_ortho_4x12(
+ _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ CTL_DEL, KC_VOLU, KC_MUTE, KC_MPLY, KC_PGUP, KC_HOME, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 ,
+ _______, KC_VOLD, KC_MPRV, KC_MNXT, KC_PGDN, KC_END , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+/* Numpad
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | | PrSc | ScrLk| Pause| | | | 7 | 8 | 9 | 0 | Lock |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | Ins | Home | PgUp | | | | 4 | 5 | 6 | / | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | Del | End | PgDn | | | | 1 | 2 | 3 | * | = |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |NUMPAD| | | | | | | | 0 | . | + | - | Enter|
+ * `-----------------------------------------' `-----------------------------------------'
+ */
+ [_NM] = LAYOUT_ortho_4x12(
+ XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_7 , KC_8 , KC_9 , KC_0 , TO(_NM),
+ XXXXXXX, XXXXXXX, KC_INS , KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, KC_4 , KC_5 , KC_6 , KC_SLSH, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_DEL , KC_END , KC_PGDN, XXXXXXX, XXXXXXX, KC_1 , KC_2 , KC_3 , KC_ASTR, KC_EQL ,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, KC_0 , KC_DOT , KC_PLUS, KC_MINS, _______
+ ),
+
+/* Adjust
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | Reset| | Up | | | Rec1 | | Rec2 | Plain| Snake|Gradnt| | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Caps | Left | Down | Right|MkItPk| Play1| | Play2| RGB | HUE+ | SAT+ | BRI+ | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | Stop1| | Stop2| MODE | HUE- | SAT- | BRI- | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | | |
+ * `-----------------------------------------' `-----------------------------------------'
+ */
+ [_ADJUST] = LAYOUT_ortho_4x12(
+ RESET , XXXXXXX, KC_UP , XXXXXXX, XXXXXXX, DREC_1 , DREC_2 , RGB_M_P, RGB_M_SN,RGB_M_G, XXXXXXX, KC_DEL ,
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, MKITPNK, DPLAY_1, DPLAY_2, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DSTOP , DSTOP , RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+void make_it_pink_blue(void) {
+ uint16_t blue_hue = 210;
+ uint16_t pink_hue = 315;
+
+ /* key is pressed */
+ uint16_t hue = rgblight_get_hue();
+ uint8_t sat = rgblight_get_sat();
+ uint8_t val = rgblight_get_val();
+
+ if (hue != blue_hue)
+ rgblight_sethsv(blue_hue, sat, val);
+ else
+ rgblight_sethsv(pink_hue, sat, val);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_dynamic_macro(keycode, record))
+ return false;
+
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ case MKITPNK:
+ if (record->event.pressed)
+ make_it_pink_blue();
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/levinson/keymaps/jyh2/readme.md b/keyboards/levinson/keymaps/jyh2/readme.md
new file mode 100644
index 0000000000..45ca956922
--- /dev/null
+++ b/keyboards/levinson/keymaps/jyh2/readme.md
@@ -0,0 +1,32 @@
+# jyh's levinson layout
+
+[Levinson](https://keeb.io/products/levinson-lets-split-w-led-backlight)
+built on rev2 PCBs. A split 4x12 keyboard with LED backlights.
+
+The layout is oriented towards needs for programming, Emacs, XMonad,
+and experience with 60% keyboards with no base layer arrow keys
+(Poker). It makes heavy use of modifiers and layers. It is influenced
+by good ideas from the Atreus keyboard layout.
+
+## Layout features
+
+ * Extensive use of _Mod Tap_, e.g.
+ * Tap sends Esc, Hold sends Left Control
+ * Tap sends Tab, Hold activates Numpad layer
+ * Tap sends - , Hold sends Shift
+ * ... and many more
+ * Places Tab and Enter on bottom corners, for hitting with palm
+ * Meta is available on top corners, for controlling XMonad
+ * Control on center key, for Emacs (among other things)
+ * Backspace (Control Hold) and Space on center keys
+ * All 60% keys available on base layer, except for numbers
+ * Hyper and Meh keys
+ * Right modifier keys in place of arrow keys
+ * Arrows are instead available in two alternate locations:
+ * WASD arrows on _Adjust_
+ * Arrow cluster on _Raise_ (inspired by hexwire)
+ * Numpad and Numrow on _Raise_ layer. Each is faster in some contexts
+ * Function keys on _Lower_
+ * Dynamic macros from QMK firmware on _Adjust_
+ * Redunant keys where it is convenient to have characters together
+ on one layer
diff --git a/keyboards/levinson/keymaps/jyh2/rules.mk b/keyboards/levinson/keymaps/jyh2/rules.mk
new file mode 100644
index 0000000000..fbb3b49d6b
--- /dev/null
+++ b/keyboards/levinson/keymaps/jyh2/rules.mk
@@ -0,0 +1,2 @@
+RGBLIGHT_ENABLE=yes
+BOOTMAGIC_ENABLE=no