From 53a6501d71cabbe4c5c41652cf24fdc059609e5d Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 15 May 2018 19:34:34 -0700 Subject: Yet another update to drashna keymaps and userspace (EEPROM, RGB indicators) (#2959) * More Iris Tweaks * Mess with iris arrow keys * Massive layout overhaul to make everything more OLKB * Additional tweaks * Cleanup Userspace Remove unused layer code, and properly set userspace eeprom structure. * EEPROM stuff * Only use indicators if layer indication is enabled * Iris and Orthodox Tweaks (Status Indicators) * Additional tweaks to finish tri layer conversion * Disable ProMicro ligths globally * Add Pro Micro hacking info * Successfully get mod indication working on thumb clusters * Enable printing when console is enabled * Make Modifier Indicator lights more modular * Keymap cleanup * Tapping test changes * Cleanup and minor tweaks --- keyboards/orthodox/keymaps/drashna/keymap.c | 73 ++++++++++++++++++++--------- keyboards/orthodox/keymaps/drashna/rules.mk | 1 + 2 files changed, 51 insertions(+), 23 deletions(-) (limited to 'keyboards/orthodox/keymaps') diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 3c99e9cb8..bcc59268c 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -22,6 +22,14 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "drashna.h" +#ifdef INDICATOR_LIGHTS +extern userspace_config_t userspace_config; + +uint8_t last_mod; +uint8_t last_led; +uint8_t last_osm; +bool has_mods_changed = false; +#endif // 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. @@ -33,6 +41,7 @@ along with this program. If not, see . #define XXXXXXX KC_NO + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper(\ @@ -65,27 +74,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper(\ 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______ + _______, _________________FUNC_LEFT_________________, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ ), [_RAISE] = LAYOUT_wrapper(\ KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______ ), [_ADJUST] = LAYOUT_wrapper(\ - KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), - KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY + KC_MAKE, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RESET, + VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, EPRM, + TG(_MODS),RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY ) }; -#ifdef RGBLIGHT_ENABLE +void matrix_init_keymap(void) { +#ifdef INDICATOR_LIGHTS + last_mod = get_mods(); + last_led = host_keyboard_leds(); + last_osm =get_oneshot_mods(); +#endif +} + uint32_t layer_state_set_keymap (uint32_t state) { +#ifdef INDICATOR_LIGHTS uint8_t modifiders = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); uint8_t one_shot = get_oneshot_mods(); @@ -103,41 +120,49 @@ uint32_t layer_state_set_keymap (uint32_t state) { rgblight_sethsv_at(120, 255, 255, 7); rgblight_sethsv_at(120, 255, 255, 8); } +#endif return state; } void matrix_scan_keymap (void) { - static uint8_t current_mods; - static uint8_t current_host_leds; - static uint8_t current_oneshot_mods; - static bool has_status_changed = true; - - if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) { - has_status_changed = true; - current_mods = get_mods(); - current_host_leds = host_keyboard_leds(); - current_oneshot_mods = get_oneshot_mods(); + +#ifdef INDICATOR_LIGHTS + uint8_t current_mod = get_mods(); + uint8_t current_led = host_keyboard_leds(); + uint8_t current_osm =get_oneshot_mods(); + + if (last_mod == current_mod) { + last_mod = current_mod; + has_mods_changed = true; + } + if (last_led == current_led) { + last_led = current_led; + has_mods_changed = true; } - if (has_status_changed) { - has_status_changed = false; + if (last_osm == current_osm) { + last_osm = current_osm; + has_mods_changed = true; + } + - if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1< Date: Fri, 18 May 2018 15:32:50 -0700 Subject: Updating my maps in upstream master (#2987) * Adding Rama M10-A Macropad * ch-ch-ch changes... * Major overhaul based on SMT's keymap. * more changes. * Moved the FKeys to the ADJUST layer. * More rearranging. * Alias in Atreus62 keymap to make it more legible Added config.h to fix tapping_term issue for Caps Lock key in OSX * Added OrthoDox layout. * More layout changes. * Fixing things with the keyboard. * Finishing touches. Set left-hand master in config.h Embedded the arrow keys in keymap.c * Revised keymap making this easier to use. * additions and changes. * changes to various keymaps. * Minor adjustments to OrthoDox layout. * Added Eco keymap. Updated Let's Split keymap. * Added gherkin * Removed my M10A keymap * Planck Keymap Updates Updated my Planck keymap and created a simple keymap for Seph's Preonic. * Added readme * readme fixes * Update readme.md more clarification * Keymap Tweaks Removed the Power button setting from the keymap. It was in a horrible location. I'll work on getting it setup somewhere else sometime later. * Added Readme I finally got around to adding a readme to this keymap. I've also added minor changes to the layout. * Fixed Keymap Error * Fixed Readme * adding iris and levinson keymaps * Tweaks to keymap * added youngJZ keymap * Changes to keymap Added a readme.md * Levinson changes Added the readme.md and rules.mk files. Configured RGB underglow and backlighting. * fixed readme * changes to keymaps * Updated keymap * Updated readme.md * Updated Readme (again) * Updated Readme Fixed formatting. Again. * Updated readme This is the last readme update for this keyboard update. I hope. * Added Contra keymap * Kinesis Keymap Update * Updated Keymaps I've updated my Kinesis (Stapelberg) layout and my Clueboard 66 layout. I've also updated my Kinesis Readme. * Clueboard Keymap update Added media keys to my Clueboard 66 Rev2 layout. * Added keymap Added Minidox keymap & rules. Added user function to Let's Split keymap that turns off the red LEDs on the Pro Micros. * New Zen keymap Added Zen keyboard to my list of keyboards, so had to generate a new keymap for it. Also adding some changes to my MiniDox keymap and config.h, as well as my Levinson's config.h. The config.h file changes enable ee_hands. * A few changes for useability I made a few changes to the Minidox keymap to see if I can't make it more useable. I'm also working on streamlining the Zen keyboard keymap to reduce layers. * Re-vamped Iris keymap. * changes * minor keymap change This was a minor keymap change to use mod_tap for the backspace key: ALT when held, BSPC when tapped. * Added Fourier keymap * Keymap Cleanup Moved KC_ESC to KC_CAPS, and changed KC_ESC to KC_GRV This is because of muscle memory, I kept hitting ESC when trying to hit TAB. * Keymap Adjustments Swapped Caps/Esc, put Caps in Raise/Lower layers, put Grv in normal Esc position. Adjusted the readme.md to reflect these changes. * minor tweaks Added code to disable red ProMicro LEDs after flashing. * Clean-up * Corrections to keymap. Fixed a foul-up in the Zen keymap where the lctrl was where the LOWER should have been. * Changes to make this fall in line with the new Layout features * Moving to LAYOUTs for 4x12 boards * fixed config.h file * standardization changes * Reverted Atreus62 keymap to LAYOUT format * Switch Preonic and Nyquist to ortho_5x12 * Corrections to config.h * config.h file tweaks * config.h file tweaks --- keyboards/orthodox/keymaps/xyverz/config.h | 38 +++++++ keyboards/orthodox/keymaps/xyverz/keymap.c | 157 ++++++++++++++++++++++++++++ keyboards/orthodox/keymaps/xyverz/readme.md | 101 ++++++++++++++++++ 3 files changed, 296 insertions(+) create mode 100644 keyboards/orthodox/keymaps/xyverz/config.h create mode 100644 keyboards/orthodox/keymaps/xyverz/keymap.c create mode 100644 keyboards/orthodox/keymaps/xyverz/readme.md (limited to 'keyboards/orthodox/keymaps') diff --git a/keyboards/orthodox/keymaps/xyverz/config.h b/keyboards/orthodox/keymaps/xyverz/config.h new file mode 100644 index 000000000..fc6d5d23b --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/config.h @@ -0,0 +1,38 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +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 + +#include "../../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/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..2b6551e19 --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -0,0 +1,157 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +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 . +*/ + +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.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 _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = LAYOUT ( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT \ +), + +[_QWERTY] = LAYOUT ( \ + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT \ +), + +[_COLEMAK] = LAYOUT ( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT \ +), + +[_LOWER] = LAYOUT ( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_INS, _______, _______, _______, KC_UP, KC_DOWN, _______, _______ \ +), + +[_RAISE] = LAYOUT ( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_INS, _______, _______, _______, KC_UP, KC_DOWN, _______, _______ \ +), + +[_ADJUST] = LAYOUT ( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +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 QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + 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; + } + return true; +} diff --git a/keyboards/orthodox/keymaps/xyverz/readme.md b/keyboards/orthodox/keymaps/xyverz/readme.md new file mode 100644 index 000000000..43229cd0a --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/readme.md @@ -0,0 +1,101 @@ +# Xyverz's Orthodox Keymap + +## About this keymap: + +This is my OrthoDox keymap, and the first iteration of my readme. I've based this keymap on both my Planck and ErgoDox/Kinesis Advantage keymaps. + +## Still to do: + + * Re-evaluate the placement of the arrow keys after some time using this keyboard. + +### Layer 0: Dvorak layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | ' | , | . | P | Y || F | G | C | R | L | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | O | E | U | I || D | H | T | N | S | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | X || B | M | W | V | Z | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### Layer 1: Qwerty layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | Q | W | E | R | T || Y | U | I | O | P | BSPC | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | S | D | F | G || H | J | K | L | ; | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### Keymap 2: Colemak layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | Q | W | F | P | G || J | L | U | Y | ; | BSPC | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | R | S | T | D || H | N | E | I | O | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || K | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### layer 3 : Lower layer + + ,-------------------------------------------.,-------------------------------------------. + | ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | | Mute | Vol- | Vol+ | || | _ | + | { | } | | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Left | Rght | | || | | Up | Down | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | Home || PgUp | | + ,------|------|------||------+------+------. + | | Del | End || PgDn | Ins | | + `--------------------'`--------------------' + +### Keymap 4: Raise layer + + ,-------------------------------------------.,-------------------------------------------. + | ~ | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | | Prev | Play | Next | || | - | = | [ | ] | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Left | Rght | | || | | Up | Down | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | Home || PgUp | | + ,------|------|------||------+------+------. + | | Del | End || PgDn | Ins | | + `--------------------'`--------------------' + +### Keymap 5: Adjust Layer + + ,-------------------------------------------.,-------------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | |Reset | | | | || |Qwerty|Colemk|Dvorak| | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | | | | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | || | | + ,------|------|------||------+------+------. + | | | || | | | + `--------------------'`--------------------' + + -- cgit v1.2.3-24-g4f1b From 5018892fa80ae1f68ea1b8924b840b7b160adad1 Mon Sep 17 00:00:00 2001 From: rfvizarra Date: Tue, 22 May 2018 16:04:53 +0200 Subject: A personal layout for the orthodox keyboard (#3006) * A personal layout for the orthodox keyboard * Added layout readme.md * Consolidated inclues with #include QMK_KEYBOARD_H * Moved layer tones setup to config.h * Replace persistent_default_layer_set calls with set_single_persistent_default_layer * Simplified the process_record_user function using layer_state_set_user function and MO() to set the lower, raise, nav and media layers * Removed AUDIO_ENABLE ifdefs and persistent_default_layer_set() as they are not needed any more --- keyboards/orthodox/keymaps/rfvizarra/config.h | 45 ++++++++ keyboards/orthodox/keymaps/rfvizarra/keymap.c | 138 +++++++++++++++++++++++++ keyboards/orthodox/keymaps/rfvizarra/readme.md | 19 ++++ keyboards/orthodox/keymaps/rfvizarra/rules.mk | 0 4 files changed, 202 insertions(+) create mode 100644 keyboards/orthodox/keymaps/rfvizarra/config.h create mode 100644 keyboards/orthodox/keymaps/rfvizarra/keymap.c create mode 100644 keyboards/orthodox/keymaps/rfvizarra/readme.md create mode 100644 keyboards/orthodox/keymaps/rfvizarra/rules.mk (limited to 'keyboards/orthodox/keymaps') diff --git a/keyboards/orthodox/keymaps/rfvizarra/config.h b/keyboards/orthodox/keymaps/rfvizarra/config.h new file mode 100644 index 000000000..7ac207f0d --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/config.h @@ -0,0 +1,45 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +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 + +#include "config_common.h" + +#ifdef AUDIO_ENABLE +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ +} +#endif + +/* 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/keyboards/orthodox/keymaps/rfvizarra/keymap.c b/keyboards/orthodox/keymaps/rfvizarra/keymap.c new file mode 100644 index 000000000..55f0fa016 --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/keymap.c @@ -0,0 +1,138 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +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 . +*/ + +#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 _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _NAV 5 +#define _NAV2 6 +#define _MEDIA 7 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LGUI, KC_LALT, MO(_MEDIA) , KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + MO(_NAV),KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_LOWER), KC_LSFT, CTL_T(KC_ENT), KC_RALT, KC_SPC, MO(_RAISE), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI \ + ), + + [_COLEMAK] = LAYOUT(\ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_LOWER), KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, MO(_RAISE), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_LGUI \ + ), + + [_DVORAK] = LAYOUT(\ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_LOWER), KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, MO(_RAISE), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LGUI \ + ), + + [_LOWER] = LAYOUT( \ + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCTL, _______, _______, KC_RCTL, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \ + ), + + [_RAISE] = LAYOUT( \ + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \ + ), + + [_NAV] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_NAV2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_MEDIA] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ) + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _LOWER, _NAV, _NAV2); + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/orthodox/keymaps/rfvizarra/readme.md b/keyboards/orthodox/keymaps/rfvizarra/readme.md new file mode 100644 index 000000000..922832c17 --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/readme.md @@ -0,0 +1,19 @@ +# A personal Orthodox Layout + +![Orthodox](https://i.imgur.com/RQ5SKj4.jpg) + +This is the layout for my daily driver orthodox. It's based on a custom handwire keyboard that I've been using for quite some time. It's based on Plank's/Let's split layouts for the lower/raise layers. I added the shift, control/enter, alt/altgr and del to the thumb cluster. + +To build the firmware run from qmk's project folder + + make orthodox/rev3:rfvizarra:avrdude + +And to flash it, run + + make orthodox/rev3:rfvizarra:avrdude + +reset your keyboard pro micro while connected to the PC with a micro usb cable. + +Repeat on both halves. + +See [install build tools](https://docs.qmk.fm/install-build-tools) then the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) for more information. diff --git a/keyboards/orthodox/keymaps/rfvizarra/rules.mk b/keyboards/orthodox/keymaps/rfvizarra/rules.mk new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3-24-g4f1b From 3d1349b280d9c0a57e37b5347a405426de6dba10 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 31 May 2018 22:11:06 -0700 Subject: Big overhaul to Drashna keymaps and userspace (#3097) * Optimize secrets code * Orthodox tweaks * rules.mk features * Minor cleanup * Revert mod bits * Force Hold breaks One Shot Tap Toggle * Cleanup * Moke keymaps more consistent * minor ergodox tweak * More OSM for the Orthodox * Cleanup of userspace * Toggle Secrets * Add hidden process record for super secret macros * Make sure secret macros always compiles * finish up making them super secret * Add ColinTA's rgb twinkle as WIP * Optimize RGB Twinkling for typing Also, tweak RGB indicators. AND WTF, I HAVE NO IDEA WHY THE INDICATORS ONLY WORK AS IS. The logical method for getting them working doesn't ... and it's beyond bizarre * Make console logging more configurable * Indicator travisty * Clean up userspace rgb code * Optimize RGB Twinking to work on default layer only, and to base it's color on the curent hue * Eff it... rgblight_sethsv_at runs at every matrix scan * RGB Twinkle cleanup * Update Iris code for new board * Move RGB Indicator and RGB Twinkle into userspace * Move RGB Indicator code to rgb_stuff.c * Major cleanup of RGB Code in userspace * Additional cleanup of RGB code in userspace * Use noeeprom functions to save my boards! * Enable RGB Sleep on all boards now * Add old iris board * tapping tweak * Use byte 19 for eeprom to prepare for possible merge of eeconfig function pr * Add code to fix default layer after eeprom reset --- keyboards/orthodox/keymaps/drashna/config.h | 10 +++ keyboards/orthodox/keymaps/drashna/keymap.c | 116 ++++++---------------------- keyboards/orthodox/keymaps/drashna/rules.mk | 3 + 3 files changed, 38 insertions(+), 91 deletions(-) (limited to 'keyboards/orthodox/keymaps') diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 1c3620616..8c283e7ca 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -76,4 +76,14 @@ along with this program. If not, see . #define QMK_LED B0 #define QMK_SPEAKER C6 + +#define SHFT_LED1 5 +#define SHFT_LED2 10 + +#define CTRL_LED1 6 +#define CTRL_LED2 9 + +#define GUI_LED1 7 +#define GUI_LED2 8 + #endif diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index bcc59268c..c65e21cb0 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -28,7 +28,6 @@ extern userspace_config_t userspace_config; uint8_t last_mod; uint8_t last_led; uint8_t last_osm; -bool has_mods_changed = false; #endif // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -46,25 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper(\ KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, - KC_TAB, _________________QWERTY_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________QWERTY_R2_________________, KC_QUOT, - KC_MLSF, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_LGUI + KC_TAB, _________________QWERTY_L2_________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________QWERTY_R2_________________, KC_QUOT, + KC_MLSF, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_MRSF ), [_COLEMAK] = LAYOUT_wrapper(\ KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, - KC_TAB, _________________COLEMAK_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________COLEMAK_R2________________, KC_QUOT, - KC_MLSF, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_LGUI + KC_TAB, _________________COLEMAK_L2________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________COLEMAK_R2________________, KC_QUOT, + KC_MLSF, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_MRSF ), [_DVORAK] = LAYOUT_wrapper(\ KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, - KC_TAB, _________________DVORAK_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________DVORAK_R2_________________, KC_MINS, - KC_MLSF, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_LGUI + KC_TAB, _________________DVORAK_L2_________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________DVORAK_R2_________________, KC_MINS, + KC_MLSF, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_MRSF ), [_WORKMAN] = LAYOUT_wrapper(\ KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, - KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, - KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI + KC_TAB, _________________WORKMAN_L2________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________WORKMAN_R2________________, KC_MINS, + KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_MRSF ), [_MODS] = LAYOUT_wrapper(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -73,105 +72,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = LAYOUT_wrapper(\ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - _______, _________________FUNC_LEFT_________________, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ + 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_F11, _________________FUNC_LEFT_________________, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_F12, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ ), [_RAISE] = LAYOUT_wrapper(\ KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC, - _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______ ), [_ADJUST] = LAYOUT_wrapper(\ KC_MAKE, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RESET, - VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, EPRM, + VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, KC_NUKE, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, EPRM, TG(_MODS),RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY ) }; -void matrix_init_keymap(void) { -#ifdef INDICATOR_LIGHTS - last_mod = get_mods(); - last_led = host_keyboard_leds(); - last_osm =get_oneshot_mods(); -#endif -} -uint32_t layer_state_set_keymap (uint32_t state) { +bool indicator_is_this_led_used(uint8_t index) { + switch (index) { #ifdef INDICATOR_LIGHTS - uint8_t modifiders = get_mods(); - uint8_t led_usb_state = host_keyboard_leds(); - uint8_t one_shot = get_oneshot_mods(); - - - if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1<