1
0
Fork 0

[Keymap] nstickney's layout for iris (#5045)

This commit is contained in:
Stick 2019-02-26 01:26:39 -05:00 committed by Drashna Jaelre
parent 80ddb34415
commit 7ba2bc765b
8 changed files with 468 additions and 350 deletions

View file

@ -0,0 +1,46 @@
# nstickney's Iris Layout
> Familiar layout for users who regularly switch between Iris and more standard layouts.
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
## Install
For instructions on building and installing this keymap, see the [docs](https://docs.qmk.fm/#/getting_started_make_guide). Below is the command for me; it may be different for you.
```sh
$ make keebio/iris/rev2:nstickney:avrdude
```
## Usage
0. QWERTY `BASE` layer.
* `/`, `\\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters.
* `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`. `'` can also be held for `CTRL`.
* [Space-Cadet Shift](/docs/docs/feature_space_cadet_shift.md) is enabled, so the `SHIFT` keys send `(` and `)` when tapped.
* Hold down `/` or `=` for `ALT`.
* Hold down `\\` or `-` to access the functions layer.
* Upper-center thumb keys are `GUI` and `MENU`.
* Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively.
* Tapping `MENU` 2, 3, or 4 times will toggle the `NUMP`, `SYMB`, and `SYSH` layers, respectively.
0. Unicode-input symbols on `SYMB` and `SYSH` layers. Based (loosely) on US-International layout.
0. `NUMP` layer has number pads on each hand. Number pad `7`-`8`-`9` align with QWERTY `7`-`8`-`9` on right hand.
0. Function, arrow, media, and miscellaneous keys on `FCTN` layer.
* `F1` through `F10` on `1`-`10`. `F11` is on `GUI` and `F12` is on `MENU`.
* Brackets (`[` and `]`) available on `U` and `I`; braces (`{` and `}`) on `O` and `P`.
* Arrow keys on `ESDF` and `HJKL`; familiar for both Vim users and FPS gamers.
* `W` is `HOME`; `R` is `END`. `T` is `PAGE UP` and `G` is `PAGE DOWN`.
* Music controls on lower row of left hand.
* Volume and screen brightness on lower row of right hand.
* `PRINT SCREEN`, `PAUSE`, `SYSREQ`, `INSERT`, and `CLEAR` also mapped, as intelligently as possible.
* `A` toggles the RGB underglow (which changes color to indicate active layer).
* `Q` toggles the Unicode input through Linux, WinCompose, and MacOS.
## Contribute
If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls).
## License
Copyright © 2016-2019 @nstickney. Released under [GPL-2.0](/LICENSE).

View file

@ -0,0 +1,40 @@
/*
Copyright 2017 Danny Nguyen <danny@keeb.io>
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
/* Use I2C or Serial, not both */
#define USE_SERIAL
// #define USE_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
// #undef RGBLED_NUM
// #define RGBLIGHT_ANIMATIONS
// #define RGBLED_NUM 12
// #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8
// Unicode input
#undef UNICODE_SELECTED_MODES
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC

View file

@ -0,0 +1,165 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Layers
#define BASE 0 // Base layer
#define SYMB 1 // Symbols
#define SYSH 2 // Symbols, shifted
#define NUMP 4 // Numpad
#define FCTN 8 // Functions
// Tap Dancing
void dance_lock (qk_tap_dance_state_t *state, void *user_data) {
switch (state->count){
case 1: // Press once for LGUI
tap_code(KC_LGUI);
break;
case 2: // Press twice for NUMLOCK
tap_code(KC_NLCK);
break;
case 3: // Press thrice for CAPSLOCK
tap_code(KC_CAPS);
break;
case 4: // Press four times for SCROLLOCK
tap_code(KC_SLCK);
break;
default:
break;
}
};
void dance_layer (qk_tap_dance_state_t *state, void *user_data) {
switch (state -> count) {
case 1: // Press once for MENU
tap_code(KC_APP);
break;
case 2: // Press twice for NUMPAD
layer_invert(NUMP);
break;
case 3: // Press thrice for SYMBOLS
layer_invert(SYMB);
break;
case 4: // Press four times for SYMBOLS, SHIFTED
layer_invert(SYSH);
break;
default:
break;
}
};
enum tap_dances {LOCKS = 0, LAYERS = 1};
qk_tap_dance_action_t tap_dance_actions[] = {
[LOCKS] = ACTION_TAP_DANCE_FN(dance_lock),
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
};
// Make layering more clear
#define CC_ESC LCTL_T(KC_ESC)
#define CC_QUOT RCTL_T(KC_QUOT)
#define AC_SLSH LALT_T(KC_SLSH)
#define AC_EQL RALT_T(KC_EQL)
#define FC_BSLS LT(FCTN, KC_BSLS)
#define FC_MINS LT(FCTN, KC_MINS)
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_BSPC,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TD(LOCKS), TD(LAYERS),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
AC_SLSH, FC_BSLS, KC_SPC, KC_ENT, FC_MINS, AC_EQL
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
),
[SYMB] = LAYOUT(
// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
UC(0x00EF),UC(0x00A1),UC(0x00B2),UC(0x00B3),UC(0x00A4),UC(0x20AC), UC(0x00BC),UC(0x00BD),UC(0x00BE),UC(0x2018),UC(0x2019),_______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00E4),UC(0x00E5),UC(0x00E9),UC(0x00AE),UC(0x00FE), UC(0x00FC),UC(0x00FA),UC(0x00ED),UC(0x00F3),UC(0x00F6),_______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00E1),UC(0x00DF),UC(0x00F0),UC(0x00EC),UC(0x00ED), UC(0x00EE),UC(0x00E0),UC(0x00E2),UC(0x00F8),UC(0x00B6),UC(0x00B4),
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00E6),UC(0x00E8),UC(0x00A9),UC(0x00EA),UC(0x00EB),_______, _______, UC(0x00F1),UC(0x00FD),UC(0x00E7),UC(0x00F4),UC(0x00BF),_______,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
UC(0x00BF),UC(0x00AC),_______, _______, UC(0x00B1),UC(0x00D7)
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
),
[SYSH] = LAYOUT(
// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
UC(0x00CF),UC(0x00B9),UC(0x2200),UC(0x2201),UC(0x00A3),UC(0x00A5), UC(0x00B5),UC(0x00AB),UC(0x00BB),UC(0x201C),UC(0x201D),_______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00C4),UC(0x00C5),UC(0x00C9),UC(0x2122),UC(0x00DE), UC(0x00DC),UC(0x00DA),UC(0x00CD),UC(0x00D3),UC(0x00D6),_______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00C1),UC(0x00A7),UC(0x00D0),UC(0x00CC),UC(0x00CD), UC(0x00CE),UC(0x00C1),UC(0x00C2),UC(0x00D8),UC(0x00B0),UC(0x00A8),
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00C6),UC(0x00C8),UC(0x00A2),UC(0x00CA),UC(0x00CB),_______, _______, UC(0x00D1),UC(0x00DD),UC(0x00C7),UC(0x00D4),UC(0x203D),_______,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
UC(0x203D),UC(0x00A6),_______, _______, UC(0x00AA),UC(0x00F7)
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
),
[NUMP] = LAYOUT(
// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
_______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
_______, _______, _______, KC_PENT, _______, _______
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
),
[FCTN] = LAYOUT(
// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
KC_PSCR, UC_MOD, KC_HOME, KC_UP, KC_END, KC_PGUP, UC(0x2014),KC_LBRC, KC_RBRC, S(KC_LBRC),S(KC_RBRC),KC_INS,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
KC_PAUS, RGB_TOG, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR,
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, KC_F11, KC_F12, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, _______,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
_______, _______, _______, _______, _______, _______
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
)
};
// Initialize rgblight
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
for (int i = 360; i > 0; i--) {
rgblight_sethsv_noeeprom(i, 255, 255);
}
layer_state_set_user(layer_state);
};
// Turn on RGB underglow according to active layer
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case FCTN:
rgblight_sethsv_noeeprom(136, 255, 255);
break;
case NUMP:
rgblight_sethsv_noeeprom(228, 255, 255);
break;
case SYMB:
case SYSH:
rgblight_sethsv_noeeprom(320, 255, 255);
break;
default: // for any other layers, or the default layer
rgblight_sethsv_noeeprom(19, 255, 255);
break;
}
return state;
};

View file

@ -0,0 +1,4 @@
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
TAP_DANCE_ENABLE=yes
UNICODE_ENABLE = yes

View file

@ -1,69 +0,0 @@
# ErgoDox Familiar Layout
Familiar layout for those who regularly switch back and forth from ErgoDox to "normal" QWERTY.
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](../../../../license_GPLv3.md) [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
## Table of Contents
- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Layers](#layers)
- [Contribute](#contribute)
- [Issues](#issues)
- [License](#license)
## Background
This layout is built to be as familiar as possible for users coming directly from a default (QWERTY US) keyboard, while gaining as much advantage as possible from the ErgoDox and QMK featureset. I use an ErgoDoxEZ at home, but I don't have a regular office (CS grad student) so I regularly use either my laptop or a default-setup lab computer; I context switch daily so this layout is meant to reduce the mental overhead as much as possible.
The default ErgoDoxEZ layout is probably more optimized as a solo daily driver - as are a lot of the others available keymaps. The focus of this layout is to get as much from the 'Dox as possible without overly disrupting long-established muscle memory.
Key features of the familiar layout:
1. QWERTY default layout.
1. International symbols layer, mapped in the US-International layout default positions, through [UCIS](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable).
1. Numpad layer on right hand.
1. Thumb cluster holds spacebar and access to secondary layers.
1. Function-layer arrow keys in both the first-person-shooter (actually ESDF instead of WASD) and vim (HJKL) locations.
## Install
If you are on Windows or Mac, choose the proper line in [`keymap.c`](keymap.c) for [unicode/international character support](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable) (starts at line 253).
```c
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX); // Linux
//set_unicode_input_mode(UC_OSX); // Mac OSX
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
};
```
For instructions on building and installing this keymap, [go to the wiki](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox#build-dependencies). Below is the command for me; it may be different for you.
```sh
$ make ergodox-ez-familiar-teensy
```
## Usage
[![Familiar Layout](http://i.imgur.com/6nLN9UT.png)](https://gist.github.com/nstickney/13508a9f99cff381d58b7be6f7dcc644)
### Layers
1. Base Layer: QWERTY, with arrow keys at bottom right.
1. UCIS Layer: US-International symbols layer, plus —. Accessed by toggling the `SYMB` layer using the UCIS key (bottom of left thumb cluster).
1. UCIS-Shifted Layer: Making shift work for UCIS characters. An ugly workaround. Any ideas? Accessed by holding shift while the `SYMB` layer is active (toggles the `CSYM` layer).
1. Numpad Layer: Right hand number pad. Accessed by toggling the `NUMP` layer using the NUMP key (bottom of right thumb cluster).
1. Function Layer: F1-F12, arrows on ESDF and HJKL, media player controls. Accessed by holding either FN key (center key of each thumb cluster), which toggles the `ARRW` layer. I know, I need to work on my naming conventions.
## Contribute
[Contributor Covenant](http://contributor-covenant.org/)
I'm terrible at this; I have no background in human-computer interaction, kinesiology, or keyboard-ology. Please send comments/issues/pull requests/angry tweets/etc. If you think there is a better way to take advantage of the ErgoDox/QMK comination without straying far from 84/101-key QWERTY, I want to know it.
### Issues
1. The `CSYM` layer is an ugly workaround. I should write a function for doing different things in the `SYMB` layer depending on whether SHIFT is being held. Or something. Ideas?
1. Right now, the thumb cluster function keys double as slash and whack... this really isnt a great solution.
1. `MENU` and `LEAD` are useless, at the moment.
## License
QMK is licensed ([mostly](https://github.com/qmk/qmk_firmware/issues/1038)) under the [GPLv2](../../../../license_GPLv2.md). Accordingly, to whatever extent applicable, this keymap is licensed under the [GPLv3](../../../../license_GPLv3.md).

View file

@ -1,281 +0,0 @@
#include QMK_KEYBOARD_H
#include "debug.h"
#include "action_layer.h"
#include "version.h"
// Layers
#define BASE 0 // default layer
#define SYMB 1 // international symbols
#define CSYM 2 // international symbols shifted
#define NUMP 3 // numpad
#define ARRW 4 // function, media, arrow keys
// Tap Dancing
void dance_lock (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { // Press once for NUMLOCK
register_code (KC_NLCK);
unregister_code (KC_NLCK);
} else if (state->count == 2) { // Press twice for CAPSLOCK
register_code (KC_CAPS);
unregister_code (KC_CAPS);
} else if (state->count == 3) { //Press thrice for SCROLLLOCK
register_code (KC_SLCK);
unregister_code (KC_SLCK);
}
}
enum {LOCKS = 0};
qk_tap_dance_action_t tap_dance_actions[] = {
[LOCKS] = ACTION_TAP_DANCE_FN(dance_lock)
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
/* layer 0 : default
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ' | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER |
* |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------|
* | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCTRL | LGUI | MENU | LEAD | LALT | |[/RALT|]/RCTL| LEFT | DOWN | RIGHT |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* |PRTSCR| ESC | | VOL- | VOL+ |
* ,------|------|------| |------+------+------.
* | |SLASH/| LOCKS| | MUTE |WHACK/| |
* | SPC | MO(4)|------| |------|MO(4) | SPC |
* | | | TO(1)| |TO(3) | | |
* `--------------------' `--------------------'
*/
[BASE] = LAYOUT_ergodox(
// left hand
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
KC_QUOT, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END,
KC_LCTL, KC_LGUI, KC_MENU, KC_LEAD, KC_LALT,
KC_PSCR, KC_ESC,
TD(LOCKS),
KC_SPC, LT(ARRW, KC_SLSH), TG(SYMB),
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER,
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC,
MT(MOD_RALT, KC_LBRC), MT(MOD_RCTL, KC_RBRC), KC_LEFT, KC_DOWN, KC_RGHT,
KC_VOLD, KC_VOLU,
KC_MUTE,
TG(NUMP), LT(ARRW, KC_BSLS), KC_SPC
),
/* layer 1: International symbols, etc
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | ¡ | ² | ³ | ¤ | | ¼ | | ½ | ¾ | | | ¥ | × | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ´ | á | ß | ð | | |------| |------| | | | ø | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |MO(CSYM)| æ | ¿ | © | ¬ | | | | | ñ | µ | ç | | |MO(CSYM)|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | « | » | | | |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[SYMB] = LAYOUT_ergodox(
// left hand
_______, UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC),
_______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______,
UC(0x00B4), UC(0x00E1), UC(0x00DF), UC(0x00F0), _______, _______,
MO(CSYM), UC(0x00E6), UC(0x00BF), _______, UC(0x00AC), UC(0x00A9), _______,
_______, _______, _______, _______, _______,
_______, _______,
_______,
_______, _______, _______,
// right hand
UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______,
_______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______,
_______, _______, _______, UC(0x00F8), UC(0x00B6), _______,
_______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(CSYM),
UC(0x00AB), UC(0x00BB), _______, _______, _______,
_______, _______,
_______,
_______, _______, _______
),
/* layer 2 : international symbols, shifted
* This layer is an ugly workaround; it pretends that SHIFT still works normally on keys
* which don't produce an "upper case" or "shifted" international symobol.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | ¹ | | | £ | | | | | | | | | ÷ | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ¨ | Á | § | Ð | | |------| |------| | | | Ø | ° | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | Æ | | ¢ | ¦ | | | | | Ñ | | Ç | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[CSYM] = LAYOUT_ergodox(
// left hand
_______, UC(0x00B9), _______, _______, UC(0x00A3), _______, _______,
_______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______,
UC(0x00A8), UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G),
_______, UC(0x00C6), UC(0x00A6), UC(0x00A2), S(KC_V), S(KC_B), _______,
_______, _______, _______, _______, _______,
_______, _______,
_______,
_______, _______, _______,
// right hand
_______, _______, _______, _______, UC(0x2014), UC(0x00F7), _______,
_______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______,
S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______,
_______, UC(0x00D1), _______, UC(0x00C7), S(KC_DOT), _______, _______,
UC(0x201C), UC(0x201D), _______, _______, _______,
_______, _______,
_______,
_______, _______, _______
),
/* layer 3: numberpad
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | ( | ) | / | * | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | 7 | 8 | 9 | - | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | 1 | 2 | 3 | = | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | |0/RALT|./RCTL| , | ENTER| |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[NUMP] = LAYOUT_ergodox(
// left hand
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______,
_______,
_______, _______, _______,
// right hand
_______, _______, S(KC_9), S(KC_0), KC_PSLS, KC_PAST, _______,
_______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______,
_______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______,
_______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, _______,
MT(MOD_RALT, KC_KP_0), MT(MOD_RCTL, KC_KP_DOT),KC_PCMM, KC_PENT, _______,
_______, _______,
_______,
_______, _______, _______
),
/* layer 4 : functions and arrows
* This layer is at the top so that the functions still work no matter what layers are active.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | UP | | | | | | | | | | | INSERT |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | HOME | PGDN | END |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | SYSRQ| PAUSE| | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[ARRW] = LAYOUT_ergodox(
// left hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
_______, _______, _______, KC_UP, _______, _______, _______,
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
_______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______,
_______, _______, _______, _______, _______,
KC_SYSREQ, KC_PAUSE,
_______,
_______, _______, _______,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
_______, _______, _______, _______, _______, _______, KC_INS,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, KC_PGUP, _______,
_______, _______, KC_HOME, KC_PGDN, KC_END,
_______, _______,
_______,
_______, _______, _______
),
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX); // Linux
//set_unicode_input_mode(UC_OSX); // Mac OSX
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case SYMB:
case CSYM:
ergodox_right_led_1_on();
break;
case NUMP:
ergodox_right_led_2_on();
break;
case ARRW:
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};

View file

@ -0,0 +1,213 @@
#include QMK_KEYBOARD_H
/*
* This keymap simulates the key limitations of an Iris on an ErgoDox. See the
* matching iris layout (/keyboards/iris/keymaps/nstickney) for further
* information.
*/
// Layers
#define BASE 0 // Base layer
#define SYMB 1 // Symbols
#define SYSH 2 // Symbols, shifted
#define NUMP 4 // Numpad
#define FCTN 8 // Function
// Tap Dancing
void dance_lock (qk_tap_dance_state_t *state, void *user_data) {
switch (state->count){
case 1: // Press once for LGUI
tap_code(KC_LGUI);
break;
case 2: // Press twice for NUMLOCK
tap_code(KC_NLCK);
break;
case 3: // Press thrice for CAPSLOCK
tap_code(KC_CAPS);
break;
case 4: // Press four times for SCROLLOCK
tap_code(KC_SLCK);
break;
default:
break;
}
};
void dance_layer (qk_tap_dance_state_t *state, void *user_data) {
switch (state -> count) {
case 1: // Press once for MENU
tap_code(KC_APP);
break;
case 2: // Press twice for NUMPAD
layer_invert(NUMP);
break;
case 3: // Press thrice for SYMBOLS
layer_invert(SYMB);
break;
case 4: // Press four times for SYMBOLS, SHIFTED
layer_invert(SYSH);
break;
default:
break;
}
};
enum tap_dances {LOCKS = 0, LAYERS = 1};
qk_tap_dance_action_t tap_dance_actions[] = {
[LOCKS] = ACTION_TAP_DANCE_FN(dance_lock),
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
};
// Make layering more clear
enum custom_keycodes {
__________ = KC_TRNS,
XXX = KC_NO,
CC_ESC = LCTL_T(KC_ESC),
CC_QUOT = RCTL_T(KC_QUOT),
AC_SLSH = LALT_T(KC_SLSH),
AC_EQL = RALT_T(KC_EQL),
FC_BSLS = LT(FCTN, KC_BSLS),
FC_MINS = LT(FCTN, KC_MINS),
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT_ergodox(
// left hand
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, XXX,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXX,
CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, XXX,
XXX, XXX, XXX, XXX, AC_SLSH,
TD(LOCKS), XXX,
XXX,
FC_BSLS, KC_SPC, XXX,
// right hand
XXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
XXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT,
XXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
AC_EQL, XXX, XXX, XXX, XXX,
XXX, TD(LAYERS),
XXX,
XXX, KC_ENT, FC_MINS
),
[SYMB] = LAYOUT_ergodox(
// left hand
UC(0x00EF), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), __________,
__________, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), __________,
__________, UC(0x00E1), UC(0x00DF), UC(0x00F0), UC(0x00EC), UC(0x00ED),
__________, UC(0x00E6), UC(0x00E8), UC(0x00A9), UC(0x00EA), UC(0x00EB), __________,
__________, __________, __________, __________, UC(0x00BF),
__________, __________,
__________,
UC(0x00AC), __________, __________,
// right hand
__________, UC(0x00BC), UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), __________,
__________, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), __________,
UC(0x00EE), UC(0x00E0), UC(0x00E2), UC(0x00F8), UC(0x00B6), UC(0x00B4),
__________, UC(0x00F1), UC(0x00FD), UC(0x00E7), UC(0x00F4), UC(0x00BF), __________,
UC(0x00D7), __________, __________, __________, __________,
__________, __________,
__________,
__________, __________, UC(0x00B1)
),
[SYSH] = LAYOUT_ergodox(
// left hand
UC(0x00CF), UC(0x00B9), UC(0x2200), UC(0x2201), UC(0x00A3), UC(0x00A5), __________,
__________, UC(0x00C4), UC(0x00C5), UC(0x00C9), UC(0x2122), UC(0x00DE), __________,
__________, UC(0x00C1), UC(0x00A7), UC(0x00D0), UC(0x00CC), UC(0x00CD),
__________, UC(0x00C6), UC(0x00C8), UC(0x00A2), UC(0x00CA), UC(0x00CB), __________,
__________, __________, __________, __________, UC(0x203D),
__________, __________,
__________,
UC(0x00A6), __________, __________,
// right hand
__________, UC(0x00B5), UC(0x00AB), UC(0x00BB), UC(0x201C), UC(0x201D), __________,
__________, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), __________,
UC(0x00CE), UC(0x00C1), UC(0x00C2), UC(0x00D8), UC(0x00B0), UC(0x00A8),
__________, UC(0x00D1), UC(0x00DD), UC(0x00C7), UC(0x00D4), UC(0x203D), __________,
UC(0x00F7), __________, __________, __________, __________,
__________, __________,
__________,
__________, __________, UC(0x00AA)
),
[NUMP] = LAYOUT_ergodox(
// left hand
__________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________,
__________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________,
__________, __________, KC_P1, KC_P2, KC_P3, KC_PMNS,
__________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________,
__________, __________, __________, __________, __________,
__________, __________,
__________,
__________, __________, __________,
// right hand
__________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________,
__________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________,
__________, KC_P1, KC_P2, KC_P3, KC_PMNS, __________,
__________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________,
__________, __________, __________, __________, __________,
__________, __________,
__________,
__________, KC_PENT, __________
),
[FCTN] = LAYOUT_ergodox(
// left hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, __________,
KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, __________,
KC_PAUS, __________, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
__________, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, __________,
__________, __________, __________, __________, __________,
KC_F11, __________,
__________,
__________, __________, __________,
// right hand
__________, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ,
__________, UC(0x2014), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR,
__________, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, __________,
__________, __________, __________, __________, __________,
__________, KC_F12,
__________,
__________, __________, __________
),
};
void eeconfig_init_user(void) {
set_unicode_input_mode(UC_LNX); // Linux
//set_unicode_input_mode(UC_OSX); // Mac OSX
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
ergodox_board_led_off();
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
if (IS_LAYER_ON(SYMB) || IS_LAYER_ON(SYSH)) {
ergodox_right_led_1_on();
} else {
ergodox_right_led_1_off();
}
if (IS_LAYER_ON(NUMP)) {
ergodox_right_led_2_on();
} else {
ergodox_right_led_2_off();
}
if (IS_LAYER_ON(FCTN)) {
ergodox_right_led_3_on();
} else {
ergodox_right_led_3_off();
}
};