commit
bd40844e4e
7 changed files with 695 additions and 472 deletions
|
@ -0,0 +1,213 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
/* Keymap 0: Basic Dvorak layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - |
|
||||
* |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------|
|
||||
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A |
|
||||
* `----------------------------------' `------------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | DEL | | | END | HOME |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | SUPER| | PgUp | | |
|
||||
* | BACK | CTRL |------| |------| Enter |SPACE |
|
||||
* | SPACE| | ALT | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[0] = KEYMAP(
|
||||
TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT),
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3),
|
||||
KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2),
|
||||
MO(3), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(2),
|
||||
KC_DELETE, KC_TRNS,
|
||||
KC_LGUI,
|
||||
KC_BSPACE,CTL_T(KC_NO),KC_LALT,
|
||||
|
||||
KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS,
|
||||
KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSHIFT,
|
||||
KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_UNDO, LCTL(KC_A),
|
||||
KC_END, KC_HOME,
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_ENTER, KC_SPACE
|
||||
),
|
||||
|
||||
/* Keymap 1: Hebrew layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[1] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_W, KC_QUOTE, KC_SLASH, KC_R, KC_T, KC_TRNS,
|
||||
KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, 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_E, KC_O, KC_P, KC_TRNS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_TRNS,
|
||||
KC_TRNS, KC_N, KC_M, KC_COMMA, KC_DOT, KC_I, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: Arrows ,Mouse Navigation and F Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | F11 | | | UP | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | LEFT | DOWN | RIGHT| | |
|
||||
* |--------+------+------+------+------+------| | | F12 |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Lclk | Rclk | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[2] = KEYMAP(
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_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, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
KC_F11, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS,
|
||||
KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MS_BTN1, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 3: Numpad Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | NMLK | P/ | P* | P- | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 7 | 8 | 9 | P+ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | 4 | 5 | 6 | P+ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 1 | 2 | 3 | ENTER| |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | 0 | . | ENTER| |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[3] = KEYMAP(
|
||||
// Left 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_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// Right Hand
|
||||
KC_TRNS, KC_TRNS, KC_LOCKING_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_ENTER, KC_TRNS,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_ENTER, 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(1)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
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 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
Binary file not shown.
After Width: | Height: | Size: 286 KiB |
|
@ -0,0 +1,10 @@
|
|||
#Dvorak-Hebrew
|
||||
|
||||
* This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play.
|
||||
|
||||
* The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems.
|
||||
|
||||
* these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout.
|
||||
|
||||
![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png)
|
||||
![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png)
|
|
@ -1,36 +1,36 @@
|
|||
#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
#define KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
#define MOUSEKEY_TIME_TO_MAX 10
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
#define TAPPING_TERM 300
|
||||
#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)) \
|
||||
)
|
||||
|
||||
#ifdef SUBPROJECT_ez
|
||||
#include "ez/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_infinity
|
||||
#include "infinity/config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */
|
||||
#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
#define KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
#define MOUSEKEY_TIME_TO_MAX 10
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
#define TAPPING_TERM 300
|
||||
#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)) \
|
||||
)
|
||||
|
||||
#ifdef SUBPROJECT_ez
|
||||
#include "ez/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_infinity
|
||||
#include "infinity/config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */
|
||||
|
|
|
@ -1,324 +1,324 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define BASE 0 // default layer - helpful for writing in Office-style word processors.
|
||||
#define SYMB 1 // symbol layer - NumPad, etc. - same as Ergodox EZ default but no EEPROM or Version key
|
||||
#define RIMW 2 // rimworld layer - made for the game RimWorld, by Tynan Sylvester | feel free to remap for your favorite game!
|
||||
#define MDIA 3 // media layer - mouse and music - close to Ergodox EZ default media layer
|
||||
|
||||
#define CO_PA M(0) // hold copy, tap paste
|
||||
|
||||
#define W_CUT LCTL(KC_X) // C-x Cut
|
||||
#define W_COPY LCTL(KC_C) // C-c Copy
|
||||
#define W_PASTE LCTL(KC_V) // C-v Paste
|
||||
#define W_UNDO LCTL(KC_Z) // C-z Undo
|
||||
#define W_FIND LCTL(KC_F) // C-v Find
|
||||
#define W_CAD LCTL(LALT(KC_DEL)) // one-tap ctrl-alt-del
|
||||
|
||||
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
CAKEWARP,
|
||||
CTRLALTMDIA,
|
||||
};
|
||||
|
||||
void cake_count (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 2) {
|
||||
layer_on (SYMB); //define double tap here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
else {
|
||||
layer_off (SYMB); //define single tap or hold here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
if (state->count == 3) {
|
||||
layer_on (RIMW); //define triple tap here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
else {
|
||||
layer_off (RIMW); //define single tap or hold here
|
||||
layer_off (MDIA);
|
||||
reset_tap_dance (state);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cad_mdia_fin (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_LCTL);
|
||||
register_code (KC_LALT);
|
||||
register_code (KC_DEL);
|
||||
} else {
|
||||
layer_on (MDIA);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cad_mdia_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code (KC_DEL);
|
||||
unregister_code (KC_LALT);
|
||||
unregister_code (KC_LCTL);
|
||||
} else {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// tap for Layer 0, tap twice to switch to symbol layer, and tap three times to switch to rimworld layer.
|
||||
[CAKEWARP] = ACTION_TAP_DANCE_FN(cake_count)
|
||||
// tap for ctrl-alt-del, tap twice for media layer
|
||||
,[CTRLALTMDIA] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cad_mdia_fin, dance_cad_mdia_reset)
|
||||
// Other declarations would go here, separated by commas, if you have them
|
||||
};
|
||||
|
||||
//In Layer declaration, add tap dance item in place of a key code
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer - TD(one_tap, two_taps, three_taps...)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F12/L1 | Q | W | E | R | T | {/[ | |TD(L0 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
|
||||
* |Caps/Win| A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
* |--------+------+------+------+------+------| }/] | TD(ctrl|------+------+------+------+------+--------|
|
||||
* |LShift/(|Z/Ctrl| X | C | V | B | | |altdel| N | M | , | . | / |RShift/)|
|
||||
* `--------+------+------+------+------+-------------' |L3) |------+------+------+------+------+--------'
|
||||
* | Undo | Cut |CopyPa| Meh | LGui | '------| | Enter| Left | Up | Down | Right |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Esc | VolUp| | F4 | Mute |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | VolDn| | F5 | | |
|
||||
* |Backsp|Delete|------| |------| Tab / |Space |
|
||||
* |ace | | Find | | Alt | CTRL | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// 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,
|
||||
LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
|
||||
GUI_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_RBRC,
|
||||
W_UNDO, W_CUT, CO_PA, MEH_T(KC_NO), KC_LGUI,
|
||||
KC_ESC, KC_VOLU,
|
||||
KC_VOLD,
|
||||
KC_BSPC, KC_DELETE, W_FIND,
|
||||
// right hand
|
||||
KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
TD(CAKEWARP), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
TD(CTRLALTMDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||
KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
|
||||
KC_F4, KC_MUTE,
|
||||
KC_F5,
|
||||
KC_RALT, CTL_T(KC_TAB), KC_SPC
|
||||
),
|
||||
|
||||
/* Keymap 1: Symbol Layer | No EEPROM Or Version keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | xx | | xx | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | |TD(L0 | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| 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_NO,
|
||||
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_NO, 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_MINS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_NO,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: RimWorld Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | C | ,< | W | >. | R | | |TD(L0 | U | B | N | J | M | PGUP |
|
||||
* |--------+------+------+------+------+------| F10 | |L1 L2)|------+------+------+------+------+--------|
|
||||
* | I | F | A | S | D | 8 |------| |------| X | L | P | Y | H | ENTER |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | K | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PGDN |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | F | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* |SPACE | C |------| |------| E |SPACE |
|
||||
* | | | Q | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// RIMWORLD
|
||||
[RIMW] = KEYMAP(
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_C, KC_COMM, KC_W, KC_DOT, KC_R, KC_F10,
|
||||
KC_I, KC_F, KC_A, KC_S, KC_D, KC_8,
|
||||
KC_K, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_C,KC_Q,KC_TRNS,
|
||||
// right hand
|
||||
KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
KC_TRNS, KC_U, KC_B, KC_N, KC_J, KC_M, KC_PGUP,
|
||||
KC_X, KC_L, SFT_T(KC_P), KC_Y, KC_H, KC_ENT,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN,
|
||||
KC_F, KC_LEFT, KC_UP, KC_DOWN,KC_RIGHT,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_E, KC_TRNS
|
||||
),
|
||||
/* Keymap 3: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | Lclk | Rclk |------| |------| |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_BTN1, KC_BTN2, 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
|
||||
),
|
||||
};
|
||||
|
||||
static uint16_t key_timer;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
}
|
||||
else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Anything you want to do once when the keyboard initializes.
|
||||
// Tests LED function when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
wait_ms(500);
|
||||
ergodox_board_led_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_on();
|
||||
wait_ms(200);
|
||||
ergodox_board_led_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 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 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;
|
||||
}
|
||||
|
||||
};
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define BASE 0 // default layer - helpful for writing in Office-style word processors.
|
||||
#define SYMB 1 // symbol layer - NumPad, etc. - same as Ergodox EZ default but no EEPROM or Version key
|
||||
#define RIMW 2 // rimworld layer - made for the game RimWorld, by Tynan Sylvester | feel free to remap for your favorite game!
|
||||
#define MDIA 3 // media layer - mouse and music - close to Ergodox EZ default media layer
|
||||
|
||||
#define CO_PA M(0) // hold copy, tap paste
|
||||
|
||||
#define W_CUT LCTL(KC_X) // C-x Cut
|
||||
#define W_COPY LCTL(KC_C) // C-c Copy
|
||||
#define W_PASTE LCTL(KC_V) // C-v Paste
|
||||
#define W_UNDO LCTL(KC_Z) // C-z Undo
|
||||
#define W_FIND LCTL(KC_F) // C-v Find
|
||||
#define W_CAD LCTL(LALT(KC_DEL)) // one-tap ctrl-alt-del
|
||||
|
||||
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
CAKEWARP,
|
||||
CTRLALTMDIA,
|
||||
};
|
||||
|
||||
void cake_count (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 2) {
|
||||
layer_on (SYMB); //define double tap here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
else {
|
||||
layer_off (SYMB); //define single tap or hold here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
if (state->count == 3) {
|
||||
layer_on (RIMW); //define triple tap here
|
||||
layer_off (MDIA);
|
||||
}
|
||||
else {
|
||||
layer_off (RIMW); //define single tap or hold here
|
||||
layer_off (MDIA);
|
||||
reset_tap_dance (state);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cad_mdia_fin (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_LCTL);
|
||||
register_code (KC_LALT);
|
||||
register_code (KC_DEL);
|
||||
} else {
|
||||
layer_on (MDIA);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cad_mdia_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code (KC_DEL);
|
||||
unregister_code (KC_LALT);
|
||||
unregister_code (KC_LCTL);
|
||||
} else {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// tap for Layer 0, tap twice to switch to symbol layer, and tap three times to switch to rimworld layer.
|
||||
[CAKEWARP] = ACTION_TAP_DANCE_FN(cake_count)
|
||||
// tap for ctrl-alt-del, tap twice for media layer
|
||||
,[CTRLALTMDIA] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cad_mdia_fin, dance_cad_mdia_reset)
|
||||
// Other declarations would go here, separated by commas, if you have them
|
||||
};
|
||||
|
||||
//In Layer declaration, add tap dance item in place of a key code
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer - TD(one_tap, two_taps, three_taps...)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F12/L1 | Q | W | E | R | T | {/[ | |TD(L0 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
|
||||
* |Caps/Win| A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
* |--------+------+------+------+------+------| }/] | TD(ctrl|------+------+------+------+------+--------|
|
||||
* |LShift/(|Z/Ctrl| X | C | V | B | | |altdel| N | M | , | . | / |RShift/)|
|
||||
* `--------+------+------+------+------+-------------' |L3) |------+------+------+------+------+--------'
|
||||
* | Undo | Cut |CopyPa| Meh | LGui | '------| | Enter| Left | Up | Down | Right |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Esc | VolUp| | F4 | Mute |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | VolDn| | F5 | | |
|
||||
* |Backsp|Delete|------| |------| Tab / |Space |
|
||||
* |ace | | Find | | Alt | CTRL | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// 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,
|
||||
LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
|
||||
GUI_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_RBRC,
|
||||
W_UNDO, W_CUT, CO_PA, MEH_T(KC_NO), KC_LGUI,
|
||||
KC_ESC, KC_VOLU,
|
||||
KC_VOLD,
|
||||
KC_BSPC, KC_DELETE, W_FIND,
|
||||
// right hand
|
||||
KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
TD(CAKEWARP), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
TD(CTRLALTMDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||
KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
|
||||
KC_F4, KC_MUTE,
|
||||
KC_F5,
|
||||
KC_RALT, CTL_T(KC_TAB), KC_SPC
|
||||
),
|
||||
|
||||
/* Keymap 1: Symbol Layer | No EEPROM Or Version keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | xx | | xx | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | |TD(L0 | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| 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_NO,
|
||||
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_NO, 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_MINS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_NO,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 2: RimWorld Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | C | ,< | W | >. | R | | |TD(L0 | U | B | N | J | M | PGUP |
|
||||
* |--------+------+------+------+------+------| F10 | |L1 L2)|------+------+------+------+------+--------|
|
||||
* | I | F | A | S | D | 8 |------| |------| X | L | P | Y | H | ENTER |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | K | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PGDN |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | F | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* |SPACE | C |------| |------| E |SPACE |
|
||||
* | | | Q | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// RIMWORLD
|
||||
[RIMW] = KEYMAP(
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_C, KC_COMM, KC_W, KC_DOT, KC_R, KC_F10,
|
||||
KC_I, KC_F, KC_A, KC_S, KC_D, KC_8,
|
||||
KC_K, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_C,KC_Q,KC_TRNS,
|
||||
// right hand
|
||||
KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||
KC_TRNS, KC_U, KC_B, KC_N, KC_J, KC_M, KC_PGUP,
|
||||
KC_X, KC_L, SFT_T(KC_P), KC_Y, KC_H, KC_ENT,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN,
|
||||
KC_F, KC_LEFT, KC_UP, KC_DOWN,KC_RIGHT,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_E, KC_TRNS
|
||||
),
|
||||
/* Keymap 3: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | Lclk | Rclk |------| |------| |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_BTN1, KC_BTN2, 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
|
||||
),
|
||||
};
|
||||
|
||||
static uint16_t key_timer;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
}
|
||||
else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Anything you want to do once when the keyboard initializes.
|
||||
// Tests LED function when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
wait_ms(500);
|
||||
ergodox_board_led_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_on();
|
||||
wait_ms(200);
|
||||
ergodox_board_led_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 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 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;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -1,113 +1,113 @@
|
|||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||
|
||||
Win10 Writer's Block ErgoDox - v1.0
|
||||
|
||||
=======================
|
||||
|
||||
This is a QWERTY layout for QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10.
|
||||
|
||||
Professional writers may find this layout useful -- copywriters, technical writers, novelists, etc.
|
||||
|
||||
I use my ErgoDox with this keymap as a daily driver at my office.
|
||||
|
||||
A gaming layer is unobtrusively built into this layout. I use that layer to play RimWorld.
|
||||
|
||||
Feel free to modify the gaming layer to your personal taste.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [Symbol layer](#symbol-layer)
|
||||
- [Gaming layer](#rimworld-layer)
|
||||
- [Media layer](#media-layer)
|
||||
* [Tools](#tools)
|
||||
- [Layer notification](#layer-notification)
|
||||
* [Building](#building)
|
||||
- [Using on Windows](#using-on-windows)
|
||||
* [License](#license)
|
||||
* [Special Thanks](#special-thanks)
|
||||
|
||||
# Layouts
|
||||
|
||||
* TapDance will teleport you to the layer you want:
|
||||
* One Tap for the Base layer
|
||||
* Two Taps for the Symbol layer
|
||||
* Three Taps for the Rimworld/Gaming layer
|
||||
|
||||
* Where the "Meh" key is located on the Ergodox EZ default layout, I've changed it to another tap dance key:
|
||||
* One Tap for CTRL-ALT-DEL
|
||||
* Two Taps for the Media/Mouse layer
|
||||
|
||||
## Base layer
|
||||
|
||||
[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/8fd9bbdd3a23bbb5a8779de3624a3be1)
|
||||
|
||||
This is a QWERTY layout with some quirks.
|
||||
|
||||
* Enter is located on a key that won't cause as much thumb fatigue.
|
||||
* Copy and Paste work from the same key. Just hold the key to copy and tap the key to paste!
|
||||
* Undo, Find and Cut are also one-touch keys.
|
||||
* F12 is where you would normally find TAB on standard layouts. Quickly save in Word, safely.
|
||||
* You'll find bracket keys below the "6" key.
|
||||
|
||||
* The Meh Key is a single-button CTRL+ALT+SHIFT modifier.
|
||||
|
||||
* Space Cadet Shift: Tap L Shift for "(" and R Shift for ")" -- holding either shift works like a normal shift.
|
||||
* Tap "Z" or Tab to use either normally. Hold them for CTRL.
|
||||
* Tap Caps Lock to use it normally. Hold it for Win key combinations (Win+D to minimize all programs, etc).
|
||||
|
||||
## Symbol layer
|
||||
|
||||
[![Symbol layer](images/symbol-layer.png)](http://www.keyboard-layout-editor.com/#/gists/04eb6458b8b17882e472f64d482f12b4)
|
||||
|
||||
Your standard Ergodox EZ symbol + numpad layout, minus the Version and EEPROM keys.
|
||||
|
||||
* From the base layer, hold the F12 Key to temporarily access this layer (use for quick access to numpad)
|
||||
* Release F12 to return to the base layer.
|
||||
|
||||
## Rimworld layer
|
||||
|
||||
[![Rimworld / Gaming Layer](images/rimworld-layer.png)](http://www.keyboard-layout-editor.com/#/gists/d53af8391e6e443ed0a98ccfbdb4eace)
|
||||
|
||||
This layer was made to play RimWorld, a Sci-Fi Colony Survival Game by Tynan Sylvester and Ludeon Studios, available on Steam.
|
||||
|
||||
* Have fun!
|
||||
|
||||
## Media layer
|
||||
|
||||
[![Media layer](images/media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/3209d09ed4bd997e4f49f28c6ada2ab3)
|
||||
|
||||
This is the standard Ergodox EZ media layout with more options for mouseclick buttons.
|
||||
|
||||
* In this layer, your "space" key changes into a back button for your browser.
|
||||
|
||||
## LED states
|
||||
|
||||
Your LEDs will change to indicate your layer. You'll know you are in the base layer if all LEDs are off.
|
||||
|
||||
# Building
|
||||
|
||||
To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/`
|
||||
|
||||
[qmk]: https://github.com/jackhumbert/qmk_firmware
|
||||
|
||||
```
|
||||
$ make keyboard=ergodox keymap=win10_writers-block
|
||||
```
|
||||
|
||||
## Using on Windows
|
||||
|
||||
This layout is tested in Windows 7 Pro and Windows 10 Home environments.
|
||||
|
||||
# License
|
||||
|
||||
GPL 3+
|
||||
|
||||
# Special Thanks
|
||||
|
||||
* To algernon for his coding help. I'm a novice but I still made this work (and figured out tap dance) with his help.
|
||||
|
||||
* To /r/MechanicalKeyboards for being an all-around great community.
|
||||
|
||||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||
|
||||
Win10 Writer's Block ErgoDox - v1.0
|
||||
|
||||
=======================
|
||||
|
||||
This is a QWERTY layout for QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10.
|
||||
|
||||
Professional writers may find this layout useful -- copywriters, technical writers, novelists, etc.
|
||||
|
||||
I use my ErgoDox with this keymap as a daily driver at my office.
|
||||
|
||||
A gaming layer is unobtrusively built into this layout. I use that layer to play RimWorld.
|
||||
|
||||
Feel free to modify the gaming layer to your personal taste.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [Symbol layer](#symbol-layer)
|
||||
- [Gaming layer](#rimworld-layer)
|
||||
- [Media layer](#media-layer)
|
||||
* [Tools](#tools)
|
||||
- [Layer notification](#layer-notification)
|
||||
* [Building](#building)
|
||||
- [Using on Windows](#using-on-windows)
|
||||
* [License](#license)
|
||||
* [Special Thanks](#special-thanks)
|
||||
|
||||
# Layouts
|
||||
|
||||
* TapDance will teleport you to the layer you want:
|
||||
* One Tap for the Base layer
|
||||
* Two Taps for the Symbol layer
|
||||
* Three Taps for the Rimworld/Gaming layer
|
||||
|
||||
* Where the "Meh" key is located on the Ergodox EZ default layout, I've changed it to another tap dance key:
|
||||
* One Tap for CTRL-ALT-DEL
|
||||
* Two Taps for the Media/Mouse layer
|
||||
|
||||
## Base layer
|
||||
|
||||
[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/8fd9bbdd3a23bbb5a8779de3624a3be1)
|
||||
|
||||
This is a QWERTY layout with some quirks.
|
||||
|
||||
* Enter is located on a key that won't cause as much thumb fatigue.
|
||||
* Copy and Paste work from the same key. Just hold the key to copy and tap the key to paste!
|
||||
* Undo, Find and Cut are also one-touch keys.
|
||||
* F12 is where you would normally find TAB on standard layouts. Quickly save in Word, safely.
|
||||
* You'll find bracket keys below the "6" key.
|
||||
|
||||
* The Meh Key is a single-button CTRL+ALT+SHIFT modifier.
|
||||
|
||||
* Space Cadet Shift: Tap L Shift for "(" and R Shift for ")" -- holding either shift works like a normal shift.
|
||||
* Tap "Z" or Tab to use either normally. Hold them for CTRL.
|
||||
* Tap Caps Lock to use it normally. Hold it for Win key combinations (Win+D to minimize all programs, etc).
|
||||
|
||||
## Symbol layer
|
||||
|
||||
[![Symbol layer](images/symbol-layer.png)](http://www.keyboard-layout-editor.com/#/gists/04eb6458b8b17882e472f64d482f12b4)
|
||||
|
||||
Your standard Ergodox EZ symbol + numpad layout, minus the Version and EEPROM keys.
|
||||
|
||||
* From the base layer, hold the F12 Key to temporarily access this layer (use for quick access to numpad)
|
||||
* Release F12 to return to the base layer.
|
||||
|
||||
## Rimworld layer
|
||||
|
||||
[![Rimworld / Gaming Layer](images/rimworld-layer.png)](http://www.keyboard-layout-editor.com/#/gists/d53af8391e6e443ed0a98ccfbdb4eace)
|
||||
|
||||
This layer was made to play RimWorld, a Sci-Fi Colony Survival Game by Tynan Sylvester and Ludeon Studios, available on Steam.
|
||||
|
||||
* Have fun!
|
||||
|
||||
## Media layer
|
||||
|
||||
[![Media layer](images/media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/3209d09ed4bd997e4f49f28c6ada2ab3)
|
||||
|
||||
This is the standard Ergodox EZ media layout with more options for mouseclick buttons.
|
||||
|
||||
* In this layer, your "space" key changes into a back button for your browser.
|
||||
|
||||
## LED states
|
||||
|
||||
Your LEDs will change to indicate your layer. You'll know you are in the base layer if all LEDs are off.
|
||||
|
||||
# Building
|
||||
|
||||
To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/`
|
||||
|
||||
[qmk]: https://github.com/jackhumbert/qmk_firmware
|
||||
|
||||
```
|
||||
$ make keyboard=ergodox keymap=win10_writers-block
|
||||
```
|
||||
|
||||
## Using on Windows
|
||||
|
||||
This layout is tested in Windows 7 Pro and Windows 10 Home environments.
|
||||
|
||||
# License
|
||||
|
||||
GPL 3+
|
||||
|
||||
# Special Thanks
|
||||
|
||||
* To algernon for his coding help. I'm a novice but I still made this work (and figured out tap dance) with his help.
|
||||
|
||||
* To /r/MechanicalKeyboards for being an all-around great community.
|
||||
|
||||
* To /u/profet23 for his amazing custom Ergodox boards.
|
Loading…
Reference in a new issue