Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
@ -1,63 +0,0 @@
|
||||
|
||||
#include <avr/io.h>
|
||||
#include "backlight.h"
|
||||
#include "atomic.h"
|
||||
|
||||
|
||||
#define CHANNEL OCR1C
|
||||
|
||||
void backlight_init_ports()
|
||||
{
|
||||
|
||||
// Setup PB7 as output and output low.
|
||||
DDRB |= (1<<7);
|
||||
PORTB &= ~(1<<7);
|
||||
|
||||
// Use full 16-bit resolution.
|
||||
ICR1 = 0xFFFF;
|
||||
|
||||
// I could write a wall of text here to explain... but TL;DW
|
||||
// Go read the ATmega32u4 datasheet.
|
||||
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
|
||||
|
||||
// Pin PB7 = OCR1C (Timer 1, Channel C)
|
||||
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
|
||||
// (i.e. start high, go low when counter matches.)
|
||||
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
|
||||
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
|
||||
|
||||
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
|
||||
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
|
||||
backlight_init();
|
||||
}
|
||||
|
||||
void backlight_set(uint8_t level)
|
||||
{
|
||||
if ( level == 0 )
|
||||
{
|
||||
// Turn off PWM control on PB7, revert to output low.
|
||||
TCCR1A &= ~(_BV(COM1C1));
|
||||
CHANNEL = 0x0;
|
||||
// Prevent backlight blink on lowest level
|
||||
PORTB &= ~(_BV(PORTB7));
|
||||
}
|
||||
else if ( level == BACKLIGHT_LEVELS )
|
||||
{
|
||||
// Prevent backlight blink on lowest level
|
||||
PORTB &= ~(_BV(PORTB7));
|
||||
// Turn on PWM control of PB7
|
||||
TCCR1A |= _BV(COM1C1);
|
||||
// Set the brightness
|
||||
CHANNEL = 0xFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Prevent backlight blink on lowest level
|
||||
PORTB &= ~(_BV(PORTB7));
|
||||
// Turn on PWM control of PB7
|
||||
TCCR1A |= _BV(COM1C1);
|
||||
// Set the brightness
|
||||
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
|
||||
}
|
||||
}
|
@ -0,0 +1,385 @@
|
||||
[
|
||||
{
|
||||
"name": "Beginner's Keymap for Ergodox-EZ",
|
||||
"author": "Anand Babu Periasamy"
|
||||
},
|
||||
[
|
||||
{
|
||||
"x": 3.5
|
||||
},
|
||||
"#\n3\n\n\nF3",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
")\n0\n\n\nF10"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"@\n2\n\n\nF2",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"$\n4\n\n\nF4",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"(\n9\n\n\nF9",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"_\n-\n\n\nF11"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"%\n5\n\n\nF5",
|
||||
"^\n6\n\n\nF6",
|
||||
{
|
||||
"x": 4.5
|
||||
},
|
||||
"&\n7\n\n\nF7",
|
||||
"*\n8\n\n\nF8"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"w": 1.5
|
||||
},
|
||||
"~\n`\n\n\nEsc",
|
||||
"!\n1\n\n\nF1",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"+\n=\n\n\nF12",
|
||||
{
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"Backspace\n\n\n\nBackspace"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5
|
||||
},
|
||||
"E\n\n\n\n<i class=\"fa fa-caret-up\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"I"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.8799999999999999,
|
||||
"x": 2.5
|
||||
},
|
||||
"W"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.9950000000000001,
|
||||
"x": 4.5,
|
||||
"a": 4
|
||||
},
|
||||
"R",
|
||||
{
|
||||
"x": 8.5,
|
||||
"a": 7
|
||||
},
|
||||
"U",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"O"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"T",
|
||||
{
|
||||
"h": 1.5
|
||||
},
|
||||
"<i class=\"fa fa-chevron-circle-left\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"<i class=\"fa fa-chevron-circle-right\" aria-hidden=\"true\"></i>",
|
||||
"Y"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"Tab",
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"Q",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"P",
|
||||
{
|
||||
"a": 4,
|
||||
"w": 1.5
|
||||
},
|
||||
"|\n\\"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"a": 7
|
||||
},
|
||||
"D\n\n\n\n<i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"K"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"S\n\n\n\n<i class=\"fa fa-caret-left\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"F\n\n\n\n<i class=\"fa fa-caret-right\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"J",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"L"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"G",
|
||||
{
|
||||
"x": 6.5
|
||||
},
|
||||
"H"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"a": 4,
|
||||
"fa": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
"w": 1.5
|
||||
},
|
||||
"\n\n\nCtrl\n\n\nCaps",
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"A",
|
||||
{
|
||||
"x": 14.5,
|
||||
"a": 4
|
||||
},
|
||||
":\n;",
|
||||
{
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"Enter"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.625,
|
||||
"x": 6.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"PgUp",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"PgDn"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 3.5
|
||||
},
|
||||
"C",
|
||||
{
|
||||
"x": 10.5,
|
||||
"a": 4
|
||||
},
|
||||
"<\n,"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"a": 7
|
||||
},
|
||||
"X",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"V",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"M",
|
||||
{
|
||||
"x": 1,
|
||||
"a": 4
|
||||
},
|
||||
">\n."
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"a": 7
|
||||
},
|
||||
"B",
|
||||
{
|
||||
"x": 6.5
|
||||
},
|
||||
"N"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"w": 1.5
|
||||
},
|
||||
"Shift",
|
||||
"Z",
|
||||
{
|
||||
"x": 14.5,
|
||||
"a": 4
|
||||
},
|
||||
"?\n/",
|
||||
{
|
||||
"w": 1.5
|
||||
},
|
||||
"\"\n'"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"a": 7
|
||||
},
|
||||
"Alt\n\n\n\n<i class=\"fa fa-hand-o-left\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"<i class=\"fa fa-long-arrow-down\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-down'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"<i class='fa fa-linux'></i>",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"Alt\n\n\n\n<i class=\"fa fa-hand-o-right\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"<i class=\"fa fa-long-arrow-left\" aria-hidden=\"true\"></i>",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"<i class=\"fa fa-long-arrow-up\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-up'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 0.5
|
||||
},
|
||||
"Ctrl\n\n\n\n<i class='fa fa-download'></i>",
|
||||
"Esc",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"<i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-off'></i>",
|
||||
"Fn"
|
||||
],
|
||||
[
|
||||
{
|
||||
"r": 30,
|
||||
"rx": 6.5,
|
||||
"ry": 4.25,
|
||||
"y": -1,
|
||||
"x": 1
|
||||
},
|
||||
"<i class=\"fa fa-clone\" aria-hidden=\"true\"></i>",
|
||||
"("
|
||||
],
|
||||
[
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Space",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Del",
|
||||
"["
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 2
|
||||
},
|
||||
"{"
|
||||
],
|
||||
[
|
||||
{
|
||||
"r": -30,
|
||||
"rx": 13,
|
||||
"y": -1,
|
||||
"x": -3
|
||||
},
|
||||
")",
|
||||
"<i class=\"fa fa-paste\" aria-hidden=\"true\"></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3
|
||||
},
|
||||
"]",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Enter",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"<i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3
|
||||
},
|
||||
"}"
|
||||
]
|
||||
]
|
After Width: | Height: | Size: 78 KiB |
@ -0,0 +1,140 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define FN1 1 // media layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BSpace |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | Fwd | | Back | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |Caps/Ctl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter |
|
||||
* |--------+------+------+------+------+------| PgUp | | PgDn |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | ' |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Ctrl | Esc | LGui | Alt | Alt | | Left | Up | Dn | Right| Fn |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Copy | ( | | ) | Paste|
|
||||
* ,------|------+------| |------+------+------.
|
||||
* | | | [ | | ] | | |
|
||||
* |Space | Del |------| |------| Enter|BSpace|
|
||||
* | | | { | | } | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// 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_WBAK,
|
||||
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,
|
||||
KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, KC_LALT,
|
||||
LCTL(KC_C), KC_LCBR,
|
||||
KC_LPRN,
|
||||
KC_SPC, KC_DEL, KC_LBRC,
|
||||
// right hand
|
||||
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_WFWD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
|
||||
KC_UP, KC_LEFT, KC_RIGHT,KC_DOWN, TG(FN1),
|
||||
KC_RCBR, LCTL(KC_V),
|
||||
KC_RPRN,
|
||||
KC_RBRC, KC_ENT, KC_BSPC
|
||||
),
|
||||
/* Keymap 1: Fn Keys, media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | BSpace |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Teensy| | | Lclk | Rclk | | |VolUp |VolDn | Mute | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------+------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// FN1 Layer
|
||||
[FN1] = KEYMAP(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
RESET, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// 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) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,21 @@
|
||||
# Beginner's keymap for Ergodox-EZ
|
||||
Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get comfortable with the Ergodox-EZ, you may fork this keymap and customize it for your own needs or find a suitable one from the community contributed keymaps.
|
||||
|
||||
![Beginner's Keymap](keyboard-layout.png)
|
||||
|
||||
#### Pros
|
||||
* Easier to switch between regular keyboards and Ergodox-EZ.
|
||||
* Easy on beginners. It has everything you need for your day to day usage.
|
||||
|
||||
#### Cons
|
||||
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboard/ergodox_ez/keymaps/default/readme.md)
|
||||
* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.
|
||||
|
||||
#### Notes
|
||||
* Ideally number key [6] should have started from the right-hand side of the keyboard. Doing so breaks the familiar QWERTY layout.
|
||||
* Quote key ['] should have been placed between [:] and [Enter]. Due to lack of key space, it is placed below [Enter].
|
||||
* Double [Alt] keys are placed adjacent to each other for convenience.
|
||||
* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users.
|
||||
* Additional bracket keys are placed in the center of the keyboard for programmer's convenience.
|
||||
|
||||
|
@ -0,0 +1,185 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_extras/keymap_german.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | K | . | O | , | Y | L1 | | L1 | V | G | C | L | ß | Z |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | H | A | E | I | U |------| |------| D | T | R | N | S | F |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |X/Ctrl| Q | Ä | Ü | Ö | | | | B | P | W | M | J | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Enter |------| |------| Tab |RShift|
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB),
|
||||
KC_BSPC, DE_H, DE_A, DE_E, DE_I, DE_U,
|
||||
KC_LSFT, CTL_T(DE_X), DE_Q, DE_AE, DE_UE, DE_OE, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_ENT ,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), DE_V, DE_G, DE_C, DE_L, DE_SS, DE_Z,
|
||||
DE_D, DE_T, DE_R, DE_N, LT(MDIA, DE_S), GUI_T(KC_F),
|
||||
MEH_T(KC_NO),KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_RSFT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// 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) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
# Basic implementation for k.o,y variant of the adnw layout
|
||||
|
||||
adnw is a layout optimised for usage with german and english language
|
||||
k.o,y is a variant of this layout
|
||||
http://www.adnw.de/index.php?n=Main.SeitlicheNachbaranschl%C3%A4ge
|
||||
|
||||
The os must use the de_DE layout
|
@ -0,0 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config.h"
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
#define ONESHOT_TIMEOUT 3000
|
||||
|
||||
#endif
|
@ -0,0 +1,5 @@
|
||||
# Having a file like this allows you to override Makefile definitions
|
||||
# for your own particular keymap
|
||||
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 62 KiB |
@ -0,0 +1,27 @@
|
||||
[{x:3.5,a:7},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{c:"#ff4444",a:4},"Esc",{x:4.5,c:"#cccccc",a:7},"",""],
|
||||
[{y:-0.875,c:"#000000",t:"#ff0000",a:4,w:1.5},"Special\n\n\n\n\n\nShift",{c:"#ff4444",t:"#000000"},"Esc",{x:14.5,c:"#54d6de"},"Back\n\n\n\n\n\nspace",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
||||
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{h:1.5},"",{x:4.5,h:1.5},"",""],
|
||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
|
||||
[{y:-0.375,x:3.5},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
|
||||
[{y:-0.625,x:6.5,h:1.5},"",{x:4.5,h:1.5},""],
|
||||
[{y:-0.75,x:3.5},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.875,x:5.5},"",{x:6.5},""],
|
||||
[{y:-0.875,w:1.5},"","",{x:14.5},"",{c:"#2277ff",w:1.5},"RShift"],
|
||||
[{y:-0.375,x:3.5,c:"#cccccc"},"",{x:10.5},""],
|
||||
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
|
||||
[{y:-0.75,x:0.5},"","",{x:14.5},"",""],
|
||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""],
|
||||
[{h:2},"",{h:2},"",""],
|
||||
[{x:2},""],
|
||||
[{r:-30,rx:13,y:-1,x:-3},"",""],
|
||||
[{x:-3},"",{h:2},"",{h:2},""],
|
||||
[{x:-3},""]
|
||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 297 KiB |
@ -0,0 +1,22 @@
|
||||
|
||||
# Ergodox und Ergodox-EZ experimentelles Layout
|
||||
|
||||
dieses layout ist experimentell und wird im Lufe der Zeit viele Änderungen und Verbesserungen durchlaufen. Falls diese sich als vorteilhaft erweisen, werden sie evtl. auch in das `osx_de` layout übernommen.
|
||||
|
||||
|
||||
|
||||
# Erstellt Mit Dem ErgodoxLayoutGenerator
|
||||
|
||||
Der ErgodoxLayoutGenerator (ELG) ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein.
|
||||
Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar).
|
||||
---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Ergodox and Ergodox-EZ experimental layout
|
||||
|
||||
This is an experimental layout which will undergo heavy changes over time. If changes prove to be good, they might also move into the `osx_de` layout.
|
||||
|
||||
Created Using the ErgodoxLayoutGenerator
|
||||
|
||||
The ErgodoxLayoutGenerator (ELG) is a little tool, which makes the creation and maintenance of keycaps a lot easier. It was written in Java and can be downloaded [here](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases). To use the tool, you need to have a current version of Oracles JDK installed.
|
||||
|
||||
The documentation of the ELG can be viewed [here](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/).
|
@ -0,0 +1,45 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5,
|
||||
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS,
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT,
|
||||
//
|
||||
/*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
/*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
|
||||
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
|
||||
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
||||
KC_MPLY, KC_MNXT,
|
||||
KC_MPRV,
|
||||
KC_RALT, KC_QUOT, KC_SPC
|
||||
)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
};
|
@ -0,0 +1,28 @@
|
||||
# Roman's Layout
|
||||
|
||||
There is only one layer based on [Norman layout](https://normanlayout.info/).
|
||||
|
||||
Looking for multiple-layer layouts?
|
||||
|
||||
- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/)
|
||||
|
||||
[![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195)
|
||||
|
||||
## Functional Keys
|
||||
|
||||
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
|
||||
- Tap `F2` to copy screenshot to the clipboard.
|
||||
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
|
||||
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
|
||||
|
||||
## CTRL/ESC
|
||||
|
||||
CTRL and ESC are frequently used in Vim.
|
||||
|
||||
- Tap `CTRL/ESC` to send `ESC`.
|
||||
- Hold `CTRL/ESC` to use as `CTRL`.
|
||||
|
||||
## Activate N-rollover
|
||||
|
||||
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.
|
After Width: | Height: | Size: 95 KiB |
@ -0,0 +1,73 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0
|
||||
#define QWRT 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5,
|
||||
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS,
|
||||
KC_LCTL, KC_A, KC_S, KC_E, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT,
|
||||
//
|
||||
/*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
/*-*/ TG(QWRT), KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
|
||||
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
|
||||
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
||||
KC_MPLY, KC_MNXT,
|
||||
KC_MPRV,
|
||||
KC_RALT, KC_QUOT, KC_SPC
|
||||
),
|
||||
[QWRT] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_E, KC_R, KC_T, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_D, KC_F, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
//
|
||||
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TRNS,
|
||||
/*-*/ /*-*/ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_TRNS,
|
||||
/*-*/ KC_TRNS, KC_N, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
// 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 QWRT:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
@ -0,0 +1,34 @@
|
||||
# Roman's Layout
|
||||
|
||||
There are two layers:
|
||||
|
||||
- **BASE** is [Norman layout](https://normanlayout.info/).
|
||||
- **QWRT** is QWERTY.
|
||||
|
||||
[![keyboard-layout](romanzolotarev-norman-qwerty-osx.png)](http://www.keyboard-layout-editor.com/#/gists/3b236f450da474dc506a5a80390c3cc7)
|
||||
|
||||
## Switching
|
||||
|
||||
- Tap `QWRT` to toggle **QWRT**.
|
||||
|
||||
## LEDs
|
||||
|
||||
- Red: QWRT is on.
|
||||
|
||||
## Functional Keys
|
||||
|
||||
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
|
||||
- Tap `F2` to copy screenshot to the clipboard.
|
||||
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
|
||||
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
|
||||
|
||||
## CTRL/ESC
|
||||
|
||||
Both CTRL and ESC are frequently used in Vim.
|
||||
|
||||
- Tap `CTRL/ESC` to send `ESC`.
|
||||
- Hold `CTRL/ESC` to use as `CTRL`.
|
||||
|
||||
## Activate N-rollover
|
||||
|
||||
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.
|
After Width: | Height: | Size: 98 KiB |
@ -0,0 +1,6 @@
|
||||
# ergodox_keymap
|
||||
|
||||
Based on the default Ergodox EZ firmware
|
||||
|
||||
Replaced the left side Bksp with a Crtl/Esc, this really helps in vim.
|
||||
Removed the Ctrls from the Z and / keys.
|
@ -0,0 +1,187 @@
|
||||
// Based on `default_osx`
|
||||
// Replace left Bksp with Ctrl/Esc
|
||||
// Remove the Ctrl from Z and /
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L |; / L2| LGui |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// 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) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,231 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media
|
||||
#define CNTL 3 // control layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | L1/` | 1 | 2 | 3 | 4 | 5 |CmdSpc| | - | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* |Meh/Tab | Q | W | E | R | T | STab | | L3 | Y | U | I | O | P | Meh/\ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |Hyp/Esc | L3/A | S | D | F | G |------| |------| H | J | K | L | L2/; | Hyp/' |
|
||||
* |--------+------+------+------+------+------| Tab | |AltGui|------+------+------+------+------+--------|
|
||||
* | LShift | L3/Z | X | C | V | B | | | | N | M | , | . | L2// | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | LAlt | LGui |Left |Right | | UP | Down | [ | ] | L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | LCtl | LGui | | LAlt |ShfGui|
|
||||
* ,-------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Backsp|Delete|------| |------| Enter | Space |
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `-----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
LT(SYMB,KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(KC_SPC),
|
||||
MEH_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, S(KC_TAB),
|
||||
ALL_T(KC_ESC), LT(CNTL,KC_A), KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, LT(CNTL,KC_Z), KC_X, KC_C, KC_V, KC_B, KC_TAB,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RIGHT,
|
||||
KC_LCTL, KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_BSPC, KC_DELETE, KC_END,
|
||||
// right hand
|
||||
KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
KC_FN3, KC_Y, KC_U, KC_I, KC_O, KC_P, MEH_T(KC_BSLS),
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA,KC_SCLN), ALL_T(KC_QUOT),
|
||||
LALT(KC_LGUI), KC_N, KC_M, KC_COMM, KC_DOT, LT(MDIA,KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
|
||||
KC_LALT, S(KC_LGUI),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_ENT, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | < | | > | : | 7 | 8 | 9 | / | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| ; | 4 | 5 | 6 | * | Prnt |
|
||||
* |--------+------+------+------+------+------| F14 | | F15 |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | - | Entr |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | . | = | + | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,S(KC_COMM),
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_F14,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
S(KC_DOT), KC_COLN, KC_7, KC_8, KC_9, KC_BSLS, KC_F12,
|
||||
KC_SCLN, KC_4, KC_5, KC_6, KC_ASTR, KC_PSCR,
|
||||
KC_F15, KC_AMPR, KC_1, KC_2, KC_3, KC_MINS, KC_ENT,
|
||||
KC_0, KC_DOT, KC_EQL, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Prev | Next | | Prev | Next |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | VolUp| | VolUp| | |
|
||||
* | Play | Mute |------| |------| Mute | Play |
|
||||
* | | | VolDn| | VolDn| | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// Control
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MPRV, KC_MNXT,
|
||||
KC_VOLU,
|
||||
KC_MPLY, KC_MUTE, KC_VOLD,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MPRV, KC_MNXT,
|
||||
KC_VOLU,
|
||||
KC_VOLD, KC_MUTE, KC_MPLY
|
||||
),
|
||||
/* Keymap 3: Control Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Sleep | | | | | | Pwr | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| Lclk |------| |------| Lft | Down | Up | Right| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | Rclk | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// Control
|
||||
[CNTL] = KEYMAP(
|
||||
KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PWR,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB),
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA),
|
||||
[3] = ACTION_LAYER_TAP_TOGGLE(CNTL) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// 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) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
# Techtomas Configuration
|
||||
|
||||
## Base Layer
|
||||
|
||||
The base layer is a merge of what I liked with the default layout and the ordinary layout. The thumb cluster is more like the Kinesis advantage and the top row of the cluster is convient for use on the mac.
|
||||
|
||||
* The Caps Lock postion handles [Hyper/Esc](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
|
||||
* The Tab key toggles MEH.
|
||||
* The two vertical mods on the left board are Shift+Tab and Tab.
|
||||
* The two vertical mods on the right board are Control Layer tap/toggle and Alt+Cmd.
|
||||
* The HYPER and MEH key are made in the same location on the right side of the board as well. Using Keyboard Maestro for OS X makes one-handed shortcuts very easy.
|
||||
|
||||
## Symbol Layer
|
||||
The symbol layer can be tap/toggled through the bottom right key and also toggled holding the tilde/grave key in the upper left corner. I haven't used the symbol layer enough to tell if this was a good place or not but it made sense in my head
|
||||
|
||||
The bottom two vertical mods are set to F14 and F15 which is the default for changing screen brightness on the mac
|
||||
|
||||
## Media Layer
|
||||
/ & ; will toggle the media layer which has play and volume controls assigned to the thumb cluster. I found this an easy way to quickly play/pause
|
||||
|
||||
## Control Layer
|
||||
The a and z keys toggle the control layer.
|
||||
|
||||
On the left board you have mouse control with left & right click in the location of the G and B keys.
|
||||
On the right board you have vim-style arrow keys using hjkl
|
||||
|
||||
The thumb cluster and mods all pass down to this layer.
|
||||
|
||||
## Changelog
|
||||
|
||||
* Apr 29, 2016 (V1.1):
|
||||
* Added F14 and F15 to symbol layer
|
||||
* Added control layer toggle to A key.
|
||||
|
||||
* Apr 28, 2016 (V1.0):
|
||||
* Modified config based on the default layout plus inspiration from the ordinary layout
|
@ -0,0 +1,92 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x1307
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER ErgoDox EZ
|
||||
#define PRODUCT ErgoDox EZ
|
||||
#define DESCRIPTION t.m.k. keyboard firmware for Ergodox
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 14
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
#define MOUSEKEY_TIME_TO_MAX 10
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
|
||||
#define ROWS (int []){ D0, D5, B5, B6 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 2
|
||||
#define TAPPING_TERM 200
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
// #define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
//#define DEBUG_MATRIX_SCAN_RATE
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
#define ONESHOT_TIMEOUT 3000
|
||||
|
||||
#endif
|
@ -0,0 +1,285 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "action_util.h"
|
||||
#include "led.h"
|
||||
#include "keymap_common.h"
|
||||
#include "timer.h"
|
||||
|
||||
/*
|
||||
|
||||
# Why this Layout
|
||||
|
||||
This layout was based on Kinesis layout and other ErgoDox user layouts
|
||||
available. It's target to be used on a MacOS but I'm pretty sure it can be
|
||||
addapted to Windows and/or Linux easily.
|
||||
|
||||
## Function Key
|
||||
|
||||
The `fn` key work almost like it would in any other keyboard with the exception
|
||||
it has a semi-sticky behavior. What does that mean?
|
||||
|
||||
Well, if you press the `fn` and release it, the keyboard will be put on the
|
||||
_function layout_ and the next key stroke will be processed as if the `fn` key
|
||||
was pressed. Aftwards, the leyout get back to _normal_. If you hold `fn` and
|
||||
press any other key, when you release them, the keyboard leyout is back to
|
||||
_normal_.
|
||||
|
||||
While pressing the `fn` with the left hand and strikeing the other keys on the
|
||||
right hand is farly easy, the same cannot being said for the other keys on the
|
||||
left side. So, instead of trying to do contorcionism with my left hand, I
|
||||
decided to do a semi-sticky version of `fn`. This way, I can press the `fn`
|
||||
key with my pinky, release it and press the `1` key to issue an `F1` to the
|
||||
operating system.
|
||||
|
||||
## Key-Pad Key
|
||||
|
||||
The `key pad` key is a layout switch key. If pressed, it will put the keyboard
|
||||
on the _key pad layout_ and stay there until key is pressed again.
|
||||
|
||||
This is used to make the keyboard behave mostly like a **num pad keyboard**.
|
||||
|
||||
## Notes
|
||||
- Regardless in which layout you are, keys from other layouts are not
|
||||
accessible. This means that if you are on the _key pad layout_, the left hand
|
||||
will be pretty much unusable.
|
||||
Of course that like anything else, there are exceptions to this rule.
|
||||
Modifiers should remain accessible throughout the layers.
|
||||
- The _shift key_ is, like the _function key_, also configured to have a sticky
|
||||
behavior.
|
||||
- All sticky keys have a timeout of 3 seconds.
|
||||
|
||||
*/
|
||||
#define BASE 0
|
||||
#define KEYPAD 1
|
||||
#define FN 2
|
||||
|
||||
#define MACRO_TMUX_ESC 10
|
||||
#define MACRO_TMUX_PASTE 11
|
||||
#define MACRO_OSX_COPY 12
|
||||
#define MACRO_OSX_PASTE 13
|
||||
|
||||
#define M_TESC M(MACRO_TMUX_ESC)
|
||||
#define M_TPASTE M(MACRO_TMUX_PASTE)
|
||||
#define M_OSXCPY M(MACRO_OSX_COPY)
|
||||
#define M_OSXPST M(MACRO_OSX_PASTE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Base Layer
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | `~ | 1 | 2 | 3 | 4 | 5 | ESC | | Pwr | 6 | 7 | 8 | 9 | 0 | - _ |
|
||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||
* | Tab | Q | W | E | R | T | F16 | | F17 | Y | U | I | O | P | = + |
|
||||
* |-----------+------+------+------+------+------| Meh | | Meh |------+------+------+------+------+-----------|
|
||||
* | \ (Ctrl) | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " (Ctrl)|
|
||||
* |-----------+------+------+------+------+------| F18 | | F19 |------+------+------+------+------+-----------|
|
||||
* | LShift | Z | X | C | V | B | Hyper| | Hyper| N | M | , | . | / | RShift |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | FN | KPAD |LCtrl | LAlt | LGui | | RGui | RAlt | RCtrl| KPAD | FN |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | M(0) | M(1) | | M(2) | M(3) |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* |Backsp| Del |------| |------| Enter| Space|
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `--------------------'
|
||||
*
|
||||
* M(0) = Ctrk+A Esc
|
||||
* (this is used to issue the Esc key to the Tmux application)
|
||||
* M(1) = Ctrk+A P
|
||||
* (this is used to issue the Paste key to the Tmux application)
|
||||
* M(2) = Cmd+C
|
||||
* M(3) = Cmd+V
|
||||
*/
|
||||
[BASE]=KEYMAP(//left half
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_F16),
|
||||
CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_FN2, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_F18),
|
||||
KC_FN1, TG(KEYPAD), KC_LCTRL, KC_LALT, KC_LGUI,
|
||||
M_TESC, M_TPASTE,
|
||||
KC_HOME,
|
||||
KC_BSPC, KC_DELT, KC_END,
|
||||
//right half
|
||||
KC_POWER, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
MEH_T(KC_F17), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTL_T(KC_QUOT),
|
||||
ALL_T(KC_F19), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN2,
|
||||
KC_RGUI, KC_RALT, CTL_T(KC_LBRC), KC_FN3, KC_FN1,
|
||||
M_OSXCPY, M_OSXPST,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_ENT, KC_SPC),
|
||||
|
||||
/* Keymap 1: KeyPad Layer
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | | | LClk | RClk | MClk | | | | BTab | Clear| / | * | ^ | ( | |
|
||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||
* | M.Accel 2 | |ScrlUp| U |ScrlDn| | | | Tab | 7 | 8 | 9 | + | ) | |
|
||||
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||
* | M.Accel 1 | | L | D | R | |------| |------| 4 | 5 | 6 | - | | |
|
||||
* |-----------+------+------+------+------+------| | |Return|------+------+------+------+------+-----------|
|
||||
* | M.Accel 0 | |ScrlL | |ScrlR | | | | | 1 | 2 | 3 | = | | |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | | XXXX | | | | | 0 | . | , | XXXX | |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | XXXX | |
|
||||
* | | |------| |------| XXXX | |
|
||||
* | | | | | | XXXX | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[KEYPAD]=KEYMAP(//left half
|
||||
KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO,
|
||||
KC_MS_ACCEL2, KC_NO, KC_MS_WH_UP, KC_MS_U, KC_MS_WH_DOWN, KC_NO, KC_NO,
|
||||
KC_MS_ACCEL1, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
|
||||
KC_MS_ACCEL0, KC_NO, KC_MS_WH_LEFT, KC_NO, KC_MS_WH_RIGHT, KC_NO, KC_NO,
|
||||
KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
//right half
|
||||
LSFT(KC_TAB), KC_CLEAR, KC_KP_SLASH, KC_KP_ASTERISK, KC_CIRCUMFLEX, KC_LPRN, KC_NO,
|
||||
KC_TAB, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_RPRN, KC_NO,
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_NO, KC_NO,
|
||||
KC_KP_ENTER, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_EQUAL, KC_NO, KC_NO,
|
||||
KC_KP_0, KC_KP_DOT, KC_KP_COMMA, KC_TRNS, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_TRNS, KC_NO),
|
||||
|
||||
/* Keymap 2: Functions Layer
|
||||
*
|
||||
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | Vol. Up |
|
||||
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
|
||||
* | | Stop | Rw | Rec | FF | | XXXX | | XXXX | | | | | | Vol. Down |
|
||||
* |-----------+------+------+------+------+------| XXXX | | XXXX |------+------+------+------+------+-----------|
|
||||
* | CapsLock | Eject| Prev | Play | Next | |------| |------| Left | Down | Up | Right| | Mute |
|
||||
* |-----------+------+------+------+------+------| XXXX | | XXXX |------+------+------+------+------+-----------|
|
||||
* | L Shift | | | | | | XXXX | | XXXX | | | | | | R Shift |
|
||||
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||
* | XXXXX | | XXXX | XXXX | XXXX | | XXXX | XXXX | XXXX | | XXXXX |
|
||||
* `-----------------------------------' `-----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*
|
||||
* XXX = These keys are transparent keys that, when pressed, they issue the key from the previous layer.
|
||||
*/
|
||||
[FN]=KEYMAP(//left half
|
||||
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_NO, KC_MEDIA_STOP, KC_MEDIA_REWIND, KC_MEDIA_SELECT, KC_MEDIA_FAST_FORWARD, KC_NO, KC_TRNS,
|
||||
KC_CAPS, KC_MEDIA_EJECT, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_NO,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
//right half
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLU,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_MUTE,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO)};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_ONESHOT(FN),
|
||||
[2] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift.
|
||||
[3] = ACTION_LAYER_TAP_KEY(KEYPAD, KC_RBRC),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case MACRO_TMUX_ESC:
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTRL), T(A), U(LCTRL), D(ESC), END);
|
||||
}
|
||||
return MACRO(U(ESC), END);
|
||||
case MACRO_TMUX_PASTE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTRL), T(A), U(LCTRL), D(P), END);
|
||||
}
|
||||
return MACRO(U(P), END);
|
||||
case MACRO_OSX_COPY:
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LGUI), D(C), END);
|
||||
}
|
||||
return MACRO(U(C), U(LGUI), END);
|
||||
case MACRO_OSX_PASTE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LGUI), D(V), END);
|
||||
}
|
||||
return MACRO(U(V), U(LGUI), END);
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
uint8_t current_layer = BASE;
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_led_all_off();
|
||||
ergodox_led_all_set(LED_BRIGHTNESS_LO);
|
||||
|
||||
switch (layer) {
|
||||
case BASE:
|
||||
current_layer = BASE;
|
||||
break;
|
||||
case KEYPAD:
|
||||
current_layer = KEYPAD;
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
// layer leds
|
||||
if (current_layer == KEYPAD) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
|
||||
// capslock
|
||||
if (host_keyboard_leds() & (3<<USB_LED_CAPS_LOCK)) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
|
||||
// Temporary leds
|
||||
|
||||
// The function layer takes over other layers and we need to reflect that on the leds.
|
||||
// If the current layer is the BASE, we simply turn on the FN led, but if the current
|
||||
// layer is the KEYPAD, than we must turn it off before turning on the FN led.
|
||||
if (layer == FN && !has_oneshot_layer_timed_out()) {
|
||||
ergodox_right_led_3_off();
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
|
||||
// if the shifted is pressed I show the case led in a brighter color. This is nice to
|
||||
// differenciate the shift from the capslock.
|
||||
// Notice that I make sure that we're not using the shift on a chord shortcut (pressing
|
||||
// shift togather with other modifiers).
|
||||
if((keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) && // is shift pressed and there is no other
|
||||
!(keyboard_report->mods & (~MOD_BIT(KC_LSFT) & ~MOD_BIT(KC_RSFT)))) || // modifier being pressed as well
|
||||
(get_oneshot_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) && !has_oneshot_mods_timed_out())) { // or the one shot shift didn't timed out
|
||||
ergodox_right_led_1_set(LED_BRIGHTNESS_HI);
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
};
|
@ -0,0 +1,4 @@
|
||||
# I don't want my keyboard blinking lights when is suppose to be asleep.
|
||||
SLEEP_LED_ENABLE = no
|
||||
|
||||
CONFIG_H = keymaps/$(KEYMAP)/config.h
|
@ -0,0 +1,77 @@
|
||||
# Townk's Keymap
|
||||
|
||||
Trying to take care of an enjury on my arm I borrow an ergonomic keyboard from
|
||||
a frient ([Kinesis Advantage](http://www.kinesis-ergo.com/shop/advantage-pro-for-pc-mac/)).
|
||||
|
||||
I really enjoyed my time with it but there were some anoyancies:
|
||||
|
||||
* The curvature on the keys bothered me since I'm a Vim user and using the
|
||||
motion keys on my editor was awkard.
|
||||
* I had to spend too much time remapping the keyboard to make some symbol keys
|
||||
more accessible to me.
|
||||
* The fact that my hands had to stay close to each other was a bit stressfull
|
||||
to my sholders.
|
||||
|
||||
After a long research I find out that Ergodox EZ would be perfect for my needs
|
||||
and purchase one. Before the keyboard even got in my hands I started to think
|
||||
on the layout I would use on it and soon enough I planed couple adjustments
|
||||
from the Kinesis I was using so far.
|
||||
|
||||
## The layout
|
||||
|
||||
Here are the layout mapping in images so you can have a glimpse on it:
|
||||
|
||||
![Base Layout](townk_osx_base.png)
|
||||
![fn Layout](townk_osx_fn.png)
|
||||
![Keypad & Mouse Layout](townk_osx_keypad.png)
|
||||
|
||||
Notice that, differently from the default behavior, my layer keys are not transparent
|
||||
by default, which means that if you press any non-labeled white key, nothing will be
|
||||
handled to the OS.
|
||||
|
||||
### One shot keys
|
||||
|
||||
It all started with the access to the function keys (F1, F2, F3...), since
|
||||
those keys are located on a different layer I needed a way to press them with
|
||||
minimal effort without disrupting my flow.
|
||||
|
||||
For me, togglihg a layer to press a button and than toggle it back is a waste
|
||||
of time (although I admit it's a single tap from what I have), so I decided to
|
||||
do it as a one shot key. I could press it and the next pressed key would be
|
||||
handled by the target layer which just after it delivers the key to the OS it
|
||||
would get back to the previous layer.
|
||||
|
||||
After setting up my layout to do just that I realized that occasionally I
|
||||
would stop myseld on the middle of the process and the one shot layer would be
|
||||
still triggered until I press any other key. So to prevent me from tapping
|
||||
keys I don't want I added a timeout of 3 seconds for the one shot actions.
|
||||
|
||||
Ultimately I tested the shift key as a one shot one and really like it, so
|
||||
here you have it, all the one shot keys on my layout.
|
||||
|
||||
## Glossary
|
||||
|
||||
If you're not familiar with the Mac symbols used on some keys, here is a
|
||||
reference to them:
|
||||
|
||||
| Symbol | Description |
|
||||
| :----: | ------------------- |
|
||||
| ⌘ | Command |
|
||||
| ⇪ | Caps Lock |
|
||||
| ⇧ | Shift |
|
||||
| ⌥ | Option (alt) |
|
||||
| ⎋ | Esc |
|
||||
| ⇥ | Tab forward |
|
||||
| ⇤ | Tab backward |
|
||||
| ⌃ | Control |
|
||||
| ␣ | Space |
|
||||
| ⌫ | Backspace |
|
||||
| ⌦ | Delete |
|
||||
| ⏎ | Enter |
|
||||
| ⌤ | Return |
|
||||
| ⌽ | Power on/off button |
|
||||
| ↖ | Home |
|
||||
| ↘ | End |
|
||||
| ⇞ | Page up |
|
||||
| ⇟ | Page down |
|
||||
| ⌧ | Clear |
|
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 381 KiB |
After Width: | Height: | Size: 414 KiB |
@ -0,0 +1,187 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | ← | | → | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | ⌦ | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ⌫ | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' / L⌘ |
|
||||
* |--------+------+------+------+------+------| L⌘ | | L⌘ |------+------+------+------+------+--------|
|
||||
* | L⇧ | Z | X | C | V | B | | | | N | M | , | . | / / ⌃| R⇧ |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | L⌃ | L⌥ | L⌘ | ← | → | | ↑ | ↓ | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,---------------.
|
||||
* | `~ | '" | | ⎋ | ⌫ |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | PgUp | | PgDn | | |
|
||||
* | | ⌫ |------| |------| ⇥ |Enter |
|
||||
* | | | L⌥ | | L⌃ | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI,
|
||||
KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT,
|
||||
KC_GRV, KC_QUOT,
|
||||
KC_PGUP,
|
||||
KC_SPC,KC_BSPC,KC_LALT,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_ESC, KC_BSPC,
|
||||
KC_PGDN,
|
||||
KC_LCTL, KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | [ | ] | { | } | | | | | / | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | < | > | ( | ) | |------| |------| - | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | & | 1 | 2 | 3 | = | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | . | ← | → | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | Home | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | End | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_EQL, KC_TRNS,
|
||||
KC_0, KC_DOT, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_HOME,
|
||||
KC_END , KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | ⌥⇧⇥ | ⌥⇥ | Power |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | PgUp | | | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | Home | PgDn | End | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | |L⇧+Spc| Spc | ⏮ | ⏭ | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| ⌘C | ⌘V |
|
||||
* | | | | | ⌘X | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_F14 , KC_F15 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, /* F14 dims screen, F15 brightens */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END , KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), LALT(LSFT(KC_TAB)), LALT(KC_TAB), KC_PWR,
|
||||
KC_TRNS, LGUI(KC_RBRC), LGUI(LALT(KC_UP)), KC_UP , LGUI(LALT(KC_DOWN)), KC_TRNS, KC_TRNS,
|
||||
LGUI(KC_LBRC), KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, LSFT(KC_SPC), KC_SPC , KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
LGUI(KC_X), LGUI(KC_C), LGUI(KC_V)
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
// action_get_macro() is unused — remove the “#if 0” and “#endif” lines to reenable
|
||||
#if 0
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
#endif
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// 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) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -1,61 +0,0 @@
|
||||
|
||||
#include <avr/io.h>
|
||||
#include "backlight.h"
|
||||
|
||||
#define CHANNEL OCR1C
|
||||
|
||||
void backlight_init_ports()
|
||||
{
|
||||
|
||||
// Setup PB7 as output and output low.
|
||||
DDRB |= (1<<7);
|
||||
PORTB &= ~(1<<7);
|
||||
|
||||
// Use full 16-bit resolution.
|
||||
ICR1 = 0xFFFF;
|
||||
|
||||
// I could write a wall of text here to explain... but TL;DW
|
||||
// Go read the ATmega32u4 datasheet.
|
||||
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
|
||||
|
||||
// Pin PB7 = OCR1C (Timer 1, Channel C)
|
||||
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
|
||||
// (i.e. start high, go low when counter matches.)
|
||||
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
|
||||
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
|
||||
|
||||
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
|
||||
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
|
||||
backlight_init();
|
||||
}
|
||||
|
||||
void backlight_set(uint8_t level)
|
||||
{
|
||||
if ( level == 0 )
|
||||
{
|
||||
// Turn off PWM control on PB7, revert to output low.
|
||||
TCCR1A &= ~(_BV(COM1C1));
|
||||
CHANNEL = 0x0;
|
||||
// Prevent backlight blink on lowest level
|
||||
PORTB &= ~(_BV(PORTB7));
|
||||
}
|
||||
else if ( level == BACKLIGHT_LEVELS )
|
||||
{
|
||||
// Prevent backlight blink on lowest level
|
||||
PORTB &= ~(_BV(PORTB7));
|
||||
// Turn on PWM control of PB7
|
||||
TCCR1A |= _BV(COM1C1);
|
||||
// Set the brightness
|
||||
CHANNEL = 0xFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Prevent backlight blink on lowest level
|
||||
PORTB &= ~(_BV(PORTB7));
|
||||
// Turn on PWM control of PB7
|
||||
TCCR1A |= _BV(COM1C1);
|
||||
// Set the brightness
|
||||
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
# The Default Planck Layout
|
||||
|
@ -0,0 +1,333 @@
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
// this is the style you want to emulate.
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
|
||||
#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 _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _PLOVER 5
|
||||
#define _ADJUST 16
|
||||
|
||||
// Macro name shortcuts
|
||||
#define QWERTY M(_QWERTY)
|
||||
#define COLEMAK M(_COLEMAK)
|
||||
#define DVORAK M(_DVORAK)
|
||||
#define LOWER M(_LOWER)
|
||||
#define RAISE M(_RAISE)
|
||||
#define M_BL 5
|
||||
#define PLOVER M(12)
|
||||
#define EXT_PLV M(13)
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{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_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_ENT },
|
||||
{M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{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_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{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_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||
{M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{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_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{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_NUHS, KC_NUHS, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{440.0*pow(2.0,(31)/12.0), 12},
|
||||
{440.0*pow(2.0,(28)/12.0), 8},
|
||||
{440.0*pow(2.0,(19)/12.0), 8},
|
||||
{440.0*pow(2.0,(24)/12.0), 8},
|
||||
{440.0*pow(2.0,(28)/12.0), 20}
|
||||
};
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
|
||||
float goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case _QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
break;
|
||||
case _COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
break;
|
||||
case _DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_DVORAK);
|
||||
}
|
||||
break;
|
||||
case _LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
#endif
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
break;
|
||||
case _RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
#endif
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
break;
|
||||
case M_BL:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // stops the tick
|
||||
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
void play_goodbye_tone(void)
|
||||
{
|
||||
PLAY_NOTE_ARRAY(goodbye, false, 0);
|
||||
_delay_ms(150);
|
||||
}
|
||||
#endif
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
#define LEADER_TIMEOUT 300
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_ONE_KEY(KC_F) {
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_A, KC_S) {
|
||||
register_code(KC_H);
|
||||
unregister_code(KC_H);
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_S);
|
||||
unregister_code(KC_S);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
MIDI_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,56 @@
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
//Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users.
|
||||
//Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck.
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
#define _QW 0
|
||||
#define _LW 1
|
||||
#define _RS 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = { /* Qwerty */
|
||||
{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_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, MT(MOD_RSFT, KC_ENT)},
|
||||
{KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
[_RS] = { /* RAISE */
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
|
||||
{KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[_LW] = { /* LOWER */
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
}
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|