Merge pull request #22 from qmk/master

Merge from QMK
This commit is contained in:
Damien 2017-05-26 15:57:08 +02:00 committed by GitHub
commit 0a4a966c66
199 changed files with 3571 additions and 515 deletions

View File

@ -1,8 +1,7 @@
FROM debian:jessie
MAINTAINER Erik Dasque <erik@frenchguys.com>
RUN apt-get update
RUN apt-get install --no-install-recommends -y build-essential \
RUN apt-get update && apt-get install --no-install-recommends -y build-essential \
gcc \
unzip \
wget \
@ -15,10 +14,8 @@ RUN apt-get install --no-install-recommends -y build-essential \
gcc-arm-none-eabi \
binutils-arm-none-eabi \
libnewlib-arm-none-eabi \
git
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
git \
&& rm -rf /var/lib/apt/lists/*
ENV keyboard=ergodox
ENV subproject=ez

View File

@ -147,6 +147,21 @@
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \
}
#define KEYMAP_MAX( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \
}
void matrix_init_user(void);
void matrix_scan_user(void);

View File

@ -0,0 +1,61 @@
// 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 "amj60.h"
// 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 _DEF 0
#define _SPC 1
// dual-role shortcuts
#define SPACEDUAL LT(_SPC, KC_SPACE)
// increase readability
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _DEF: Default Layer
* ,-----------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | ~ |
* |-----------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| bspc|
* |-----------------------------------------------------------|
* |Caps | A| S| D| F| G| H| J| K| L| ;| '| Return |
* |-----------------------------------------------------------|
* |Sft | Fn0| Z| X| C| V| B| N| M| ,| .| /| Sft |Fn2|
* |-----------------------------------------------------------|
* |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl|
* `-----------------------------------------------------------'
*/
[_DEF] = KEYMAP_MAX(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, F(0), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, F(1), \
KC_LCTL, KC_LALT, KC_LGUI, SPACEDUAL, KC_RGUI, KC_RALT, KC_RCTL, F(2)),
/* Keymap 1: F-and-vim Layer, modified with Space (by holding space)
* ,-----------------------------------------------------------.
* |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
* |-----------------------------------------------------------|
* | |Paus| Up| [ | ] | | | | ( | ) | | | | Del |
* |-----------------------------------------------------------|
* | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY |
* |-----------------------------------------------------------|
* | | | | | < | > | |M0 | | | | | Vol+ | |
* |-----------------------------------------------------------|
* | | | | |Alt |Prev|Vol-|Next|
* `-----------------------------------------------------------'
*/
[_SPC] = KEYMAP_MAX(
KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
_______, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \
_______, _______, _______, _______, _______, _______, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
};

View File

@ -255,7 +255,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
#endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer)
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
@ -366,7 +366,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case MACRO_QWERTY:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_QWERTY);
persistent_default_layer_set(1UL<<LAYER_QWERTY);
}
break;

View File

@ -168,7 +168,7 @@ const uint16_t PROGMEM fn_actions[] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -177,25 +177,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case DVORMAC:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORMAC);
persistent_default_layer_set(1UL<<_DVORMAC);
}
return false;
break;

View File

@ -119,7 +119,7 @@ const uint16_t PROGMEM fn_actions[] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -128,25 +128,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case WOW:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_WOW);
persistent_default_layer_set(1UL<<_WOW);
}
return false;
break;

View File

@ -50,35 +50,28 @@ const uint16_t PROGMEM fn_actions[] = {
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed;
static bool mod_flag;
switch (id) {
case 0:
/* Handle the combined Grave/Esc key
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (record->event.pressed) {
/* The key is being pressed.
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (mods_pressed) {
mod_flag = true;
add_key(KC_GRV);
send_keyboard_report();
register_code(KC_GRV);
} else {
add_key(KC_ESC);
send_keyboard_report();
register_code(KC_ESC);
}
} else {
/* The key is being released.
*/
if (mod_flag) {
mod_flag = false;
del_key(KC_GRV);
send_keyboard_report();
if (mods_pressed) {
mods_pressed = false;
unregister_code(KC_GRV);
} else {
del_key(KC_ESC);
send_keyboard_report();
unregister_code(KC_ESC);
}
}
break;

View File

@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \

View File

@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \

View File

@ -0,0 +1,181 @@
#include "clueboard.h"
// 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 _FL 3
#define _CL 4
enum planck_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK
};
// Helpful defines
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
// Custom macros
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt)
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _QWERTY: Base Layer (Default Layer)
* ,-----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU|
* |-----------------------------------------------------------| |---|
* |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| BS| |PgD|
* |-----------------------------------------------------------| `---'
* |CtlEsc| A| S| D| F| G| H| J| K| L| ;| '| | Ent|
* |--------------------------------------------------------------.
* |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up|
* |------------------------------------------------------------------.
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _COLEMAK: Base Layer
* ,-----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU|
* |-----------------------------------------------------------| |---|
* |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD|
* |-----------------------------------------------------------| `---'
* |CtlEsc| A| R| S| T| D| H| N| E| I| O| '| | Ent|
* |--------------------------------------------------------------.
* |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up|
* |------------------------------------------------------------------.
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \
CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _DVORAK: Base Layer
* ,-----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU|
* |-----------------------------------------------------------| |---|
* |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD|
* |-----------------------------------------------------------| `---'
* |CtlEsc| A| O| E| U| I| D| H| T| N| S| -| | Ent|
* |--------------------------------------------------------------.
* |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up|
* |------------------------------------------------------------------.
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
[_DVORAK] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \
HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, \
CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \
KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, \
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
/* Keymap _CL: Control layer
*/
[_CL] = KEYMAP(
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
_______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
_______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
};
/* This is a list of user defined functions. F(N) corresponds to item N
of this list.
*/
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(0), // Calls action_function()
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed;
static bool mod_flag;
switch (id) {
case 0:
/* Handle the combined Grave/Esc key
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (record->event.pressed) {
/* The key is being pressed.
*/
if (mods_pressed) {
mod_flag = true;
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
/* The key is being released.
*/
if (mod_flag) {
mod_flag = false;
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
}
}
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
}
return true;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -0,0 +1,30 @@
```
___ _____ _ _ _ __ __ _ __
|__ \ / ____| | | | | | / / / /(_) / /
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
```
# smt Clueboard Layout (HHKB variant)
![Clueboard Layout Image](layout.png)
This is smt's HHKB variant layout, based on the default layout that comes
flashed on every Clueboard. The primary differences from the default are:
- The Backspace key is moved down into the traditional `\` position
- `\` and `` ` `` are assigned to the "split-backspace" positions
- The right Shift is split to allow for a Fn key to its right
- The modifiers on the right side now mirror the left side (`Alt`/`Super`/`Ctrl`)
For the most part, it's a straightforward and easy to follow layout. There
are a few special keys:
- The Esc key sends `Esc` when tapped, `` ` `` when `Alt`/`Super`/`Ctrl`/`Fn` is held, or `~` when `Shift` is held
- The Tab key sends `Tab` when tapped, or `Super+Ctrl+Alt+Shift` (a.k.a. [Hyper]) when held
- The key traditionally in the Caps-Lock position has been re-mapped to send `Esc` when tapped, or `Ctrl` when held
- The left Shift key sends `Enter` when tapped, or `Shift` when held
[Hyper]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/

View File

@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -266,25 +266,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
/* layout switcher */
case LAY_QWE:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<QWE);
persistent_default_layer_set(1UL<<QWE);
}
return false;
break;
case LAY_COL:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<COL);
persistent_default_layer_set(1UL<<COL);
}
return false;
break;
case LAY_WOR:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<WOR);
persistent_default_layer_set(1UL<<WOR);
}
return false;
break;
case LAY_DVO:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<DVO);
persistent_default_layer_set(1UL<<DVO);
}
return false;
break;

View File

@ -3,8 +3,8 @@
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 5
#define MOUSEKEY_MAX_SPEED 2
#define MOUSEKEY_TIME_TO_MAX 40
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
#define TAPPING_TOGGLE 1

View File

@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBW 1
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
#define DEBOUNCE 15
#define USB_MAX_POWER_CONSUMPTION 500

View File

@ -53,11 +53,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
static uint8_t debouncing = DEBOUNCE;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
// Debouncing: store for each key the number of scans until it's eligible to
// change. When scanning the matrix, ignore any changes in keys that have
// already changed in the last DEBOUNCE scans.
static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
static matrix_row_t read_cols(uint8_t row);
static void init_cols(void);
@ -113,7 +116,9 @@ void matrix_init(void)
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
for (uint8_t j=0; j < MATRIX_COLS; ++j) {
debounce_matrix[i * MATRIX_COLS + j] = 0;
}
}
#ifdef DEBUG_MATRIX_SCAN_RATE
@ -134,14 +139,36 @@ void matrix_power_up(void) {
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
#ifdef DEBUG_MATRIX_SCAN_RATE
matrix_timer = timer_read32();
matrix_scan_count = 0;
#endif
}
// Returns a matrix_row_t whose bits are set if the corresponding key should be
// eligible to change in this scan.
matrix_row_t debounce_mask(uint8_t row) {
matrix_row_t result = 0;
for (uint8_t j=0; j < MATRIX_COLS; ++j) {
if (debounce_matrix[row * MATRIX_COLS + j]) {
--debounce_matrix[row * MATRIX_COLS + j];
} else {
result |= (1 << j);
}
}
return result;
}
// Report changed keys in the given row. Resets the debounce countdowns
// corresponding to each set bit in 'change' to DEBOUNCE.
void debounce_report(matrix_row_t change, uint8_t row) {
for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
if (change & (1 << i)) {
debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
}
}
}
uint8_t matrix_scan(void)
@ -178,26 +205,12 @@ uint8_t matrix_scan(void)
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
select_row(i);
wait_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols(i);
if (matrix_debouncing[i] != cols) {
matrix_debouncing[i] = cols;
if (debouncing) {
debug("bounce!: "); debug_hex(debouncing); debug("\n");
}
debouncing = DEBOUNCE;
}
unselect_rows();
}
matrix_row_t mask = debounce_mask(i);
matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask);
debounce_report(cols ^ matrix[i], i);
matrix[i] = cols;
if (debouncing) {
if (--debouncing) {
wait_us(1);
// this should be wait_ms(1) but has been left as-is at EZ's request
} else {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debouncing[i];
}
}
unselect_rows();
}
matrix_scan_quantum();
@ -205,9 +218,8 @@ uint8_t matrix_scan(void)
return 1;
}
bool matrix_is_modified(void)
bool matrix_is_modified(void) // deprecated and evidently not called.
{
if (debouncing) return false;
return true;
}

View File

@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* TL2 TL3
* LSHFT Ü Ö Ä P Z B M , . J Shift
*
* CTL ALT MO1 Win Mod4 Mod4 Win MO1 Alt CTL
* CTL ALT MO1 Win Mod4 Mod4 Win MO1 ALT CTL
*
*
*
@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS,
NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R,
TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT,
NEO_L2_R,KC_RGUI,MO(FMU),KC_RALT,KC_RCTL,
NEO_L2_R,KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT,
KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC
@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* (TL2) (TL3)
* LSHFT Ä Q R W N J M , . Shift
*
* CTL ALT MO1 Win MO4 M04 Win MO1 Alt CTL
* CTL ALT MO1 Win MO4 M04 Win MO1 ALT CTL
*
*
*
@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, DE_B, DE_A, DE_S, DE_G, DE_V, DE_Y,
DE_U, DE_MINS,DE_Z, DE_E, DE_X, NEO_L1_R,
KC_TRNS, DE_J, DE_M, DE_COMM,DE_DOT, DE_SS, KC_RSFT,
MO(NHL),KC_RGUI,MO(FMU),KC_RALT,KC_RCTL,
MO(NHL),KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT,
KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC
@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* (TL2) (TL3)
* LSHFT Ü Ö Ä P Z B M , . J Shift
*
* CTL ALT MO1 Win MO4 M04 Win MO1 Alt CTL
* CTL ALT MO1 Win MO4 M04 Win MO1 ALT CTL
*
*
*
@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS,
DE_S, DE_N, DE_R, DE_T, DE_D, KC_NO,
KC_TRNS, DE_B, DE_M, KC_COMM,KC_DOT, DE_J, KC_RSFT,
MO(NHL),KC_RGUI,MO(FMU),KC_RALT,KC_RCTL,
MO(NHL),KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT,
KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC
@ -135,13 +135,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 3: F-keys, Mouse and Unicode
*
*
* F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
*
* F9 F10 F11 F12
*
*
* F5 F6 F7 F8
*
* (TL2) (TL3)
* F1 F2 F3 F4
*
*
* (MO1) (MO4) (MO4) (MO1)
*
@ -154,23 +154,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[FMU] = KEYMAP(
// left hand
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS,
KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715),
KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),UC(0x2194),UC(0x21D4),KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_MS_L, KC_MS_U,
KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x3008),UC(0x3009),
KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MS_L, KC_MS_U,
KC_BTN1,
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_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
KC_TRNS,KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS,
KC_TRNS, KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
KC_TRNS, UC(0x2194),UC(0x2190),UC(0x2192),UC(0x2191),UC(0x2193),KC_TRNS,
KC_TRNS, UC(0x2713),UC(0x2715),UC(0x2022),UC(0x2236),KC_TRNS,
KC_TRNS, UC(0x21D4),UC(0x21D0),UC(0x21D2),UC(0x21D1),UC(0x21D3),KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MS_D, KC_MS_R,
KC_BTN2,
KC_TRNS, KC_TRNS,KC_TRNS
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Layer 4: Neos software layer 4 rebuilt in Hardware
@ -294,11 +294,10 @@ void unicode_input_start (void) {
// Override method to use NEO_A instead of KC_A
uint16_t hex_to_keycode(uint8_t hex)
{
if (hex == 0x0) {
if(hex == 0x0) {
return KC_0;
} else if (hex < 0xA) {
return KC_1 + (hex - 0x1);
} else {
}
else if(hex >= 0xA) {
switch(hex) {
case 0xA:
return NEO_A;
@ -316,4 +315,6 @@ uint16_t hex_to_keycode(uint8_t hex)
return KC_NO;
}
}
return KC_1 + (hex - 0x1);
}

View File

@ -4,10 +4,18 @@ The idea of this layout is to use it for [Neo2](http://www.neo-layout.org) but a
The main goal of the default layer is to provide a complete symmetric layout with each modifier equally placed for both hands (mirror, of course).
It also features a layer for additional keys like F-keys (F1 F12), some mouse keys and (hopefully in the near future) some useful Unicode symbols.
It also features a layer for additional keys like F-keys (F1 F12), some mouse keys and some useful Unicode symbols.
## Layers
## Build
```
make clean
make coderkun_neo2
```
## Keymap
0. Default layer for Neo2
1. Poor mans QWERTZ
@ -16,16 +24,106 @@ It also features a layer for additional keys like F-keys (F1 F12), some mous
4. Neos software layers 4 rebuilt in hardware
## Build
### Layer 0: Default layer for Neo2
1. Enable Unicode in Makefile
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ ` │ │ ´ │ 6 │ 7 │ 8 │ 9 │ 0 │ BKSPC │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ Y │ X │ V │ L │ C │ W │ HOM │ │ END │ K │ H │ G │ F │ Q │ ß │
├───────┼─────┼─────┼─────╆─────╅─────┤ E │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ Mod3 │ U │ I │ A │ E │ O ├─────┤ ├─────┤ S │ N │ R │ T │ D │ Mod3 │
├───────┼─────┼─────┼─────╄─────╃─────┤ TL2 │ │ TL3 ├─────╄─────╃─────┼─────┼─────┼───────┤
│ LSHFT │ Ü │ Ö │ Ä │ P │ Z │ │ │ │ B │ M │ , │ . │ J │ Shift │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ CTL │ ALT │ MO1 │ Win │ Mod4│ │ Mod4│ Win │ MO1 │ Alt │ CTL │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ ← │ ↑ │ │ ↓ │ → │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ ─ │ │ ─ │ │ │
│ SPC │ RTN ├─────┤ ├─────┤ RTN │ SPC │
│ │ │ HYP │ │ MEH │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
```
UNICODE_ENABLE = yes
```
2. Build as usual
```
make clean
make KEYMAP=coderkun_neo2
```
### Layer 1: Poor mans QWERTZ
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ ` │ │ ´ │ 6 │ 7 │ 8 │ 9 │ 0 │ BKSPC │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ C │ P │ T │ F │ K │ L │ HOM │ │ END │ B │ A │ S │ G │ V │ Y │
├───────┼─────┼─────┼─────╆─────╅─────┤ E │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ Mod3 │ D │ H │ Ö │ O │ I ├─────┤ ├─────┤ U │ - │ Z │ E │ X │ Mod3 │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ LSHFT │ Ä │ Q │ R │ W │ N │ │ │ │ J │ M │ , │ . │ ẞ │ Shift │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ CTL │ ALT │ MO1 │ Win │ MO4 │ │ M04 │ Win │ MO1 │ Alt │ CTL │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ ← │ ↑ │ │ ↓ │ → │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ ─ │ │ ─ │ │ │
│ SPC │ RTN ├─────┤ ├─────┤ RTN │ SPC │
│ │ │ HYP │ │ MEH │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
### Layer 2: Poor mans Neo
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ ` │ │ ´ │ 6 │ 7 │ 8 │ 9 │ 0 │ BKSPC │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ Y │ X │ V │ L │ C │ W │ HOM │ │ END │ K │ H │ G │ F │ Q │ ß │
├───────┼─────┼─────┼─────╆─────╅─────┤ E │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ Mod3 │ U │ I │ A │ E │ O ├─────┤ ├─────┤ S │ N │ R │ T │ D │ Mod3 │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ LSHFT │ Ü │ Ö │ Ä │ P │ Z │ │ │ │ B │ M │ , │ . │ J │ Shift │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ CTL │ ALT │ MO1 │ Win │ MO4 │ │ M04 │ Win │ MO1 │ Alt │ CTL │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ ← │ ↑ │ │ ↓ │ → │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ ─ │ │ ─ │ │ │
│ SPC │ RTN ├─────┤ ├─────┤ RTN │ SPC │
│ │ │ HYP │ │ MEH │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
### Layer 3: F-keys, mouse keys und Unicode symbols
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ │ ┌ │ ┬ │ ┐ │ ─ │ │ │ │ │ │ ↔ │ ← │ → │ ↑ │ ↓ │ │
├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ │ ├ │ ┼ │ ┤ │ 〈 │ 〉 ├─────┤ ├─────┤ │ ✓ │ ✕ │ • │ │ │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ │ └ │ ┴ │ ┘ │ │ │ │ │ │ ⇔ │ ⇐ │ ⇒ │ ⇑ │ ⇓ │ │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ Ms← │ Ms↑ │ │ Ms↓ │ Ms→ │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ MLC │ │ MRC │ │ │
│ │ ├─────┤ ├─────┤ │ │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
### Layer 4: Neos software layers 4 rebuilt in hardware
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ │ PgUp│ BSpc│ ↑ │ Del │ PgDn│ │ │ │ │ 7 │ 8 │ 9 │ + │
├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ │ Home│ ← │ ↓ │ → │ End ├─────┤ ├─────┤ │ 4 │ 5 │ 6 │ , │ . │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ │ Esc │ Tab │ Ins │ Ret │ Undo│ │ │ │ │ 1 │ 2 │ 3 │ │ │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ │ │ │ │ │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ │ │ │ │ │
│ │ ├─────┤ ├─────┤ │ │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘

View File

@ -0,0 +1,331 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "keymap_nordic.h"
#include "keymap_norwegian.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // mouse keys
#define DEVL 3 // dev keys
#define MACRO_PUBLIC 10
#define MACRO_PRIVATE 11
#define MACRO_PROT 12
#define MACRO_SHARED 13
#define MACRO_CONST 14
#define MACRO_DIM 15
#define MACRO_STRING 16
#define MACRO_INT 17
#define MACRO_DEC 18
#define MACRO_BOOL 19
#define MACRO_RETURN 20
#define MACRO_NOTHING 21
#define MACRO_TODO 22
#define MACRO_SAVE 24
#define MACRO_BUILD 25
#define MACRO_DEBUG 26
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | L3 | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | - | , | . | P | Y | LT1 | | LT1 | F | G | C | R | L | Å |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | WIN | A | O | E | U | I |------| |------| D | H | T | N | S | Ä |
* |--------+------+------+------+------+------| LT2 | | LT2 |------+------+------+------+------+--------|
* | LShift | Ö | Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | CTRL | 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
MO(DEVL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB),
KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA),
CTL_T(KC_NO), MO(SYMB), 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_BSLASH,
TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, NO_AM,
KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE,
TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), 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 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | @ | { | } | [ | ] | | | | < | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | ( | ) | \ | / |------| |------| > | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | . | 0 | = | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS,
KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH,
KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), 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, NO_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12,
LSFT(NO_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS,
KC_TRNS, NO_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS,
KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// 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_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
),
/* Keymap 3: Developer keys in vb.net
* shortened in layout beneth, for example int-> integer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| priv | publ |shared| prot | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | const| dim |return|nothin| | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[DEVL] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(MACRO_BOOL), M(MACRO_INT), M(MACRO_STRING), M(MACRO_DEC), M(MACRO_TODO), KC_TRNS,
M(MACRO_PRIVATE), M(MACRO_PUBLIC), M(MACRO_SHARED), M(MACRO_PROT), KC_TRNS, KC_TRNS,
KC_TRNS, M(MACRO_CONST), M(MACRO_DIM), M(MACRO_RETURN), M(MACRO_NOTHING), 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) // 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;
case MACRO_PUBLIC:
if (record->event.pressed) {
return MACRO( T(P), T(U), T(B), T(L), T(I), T(C), T(SPACE),END);
}
break;
case MACRO_PRIVATE:
if (record->event.pressed) {
return MACRO( T(P), T(R), T(I), T(V), T(A), T(T), T(E), T(SPACE),END);
}
break;
case MACRO_PROT:
if (record->event.pressed) {
return MACRO( T(P), T(R), T(O), T(T), T(E), T(C), T(T), T(E), T(D), T(SPACE),END);
}
break;
case MACRO_SHARED:
if (record->event.pressed) {
return MACRO( T(S), T(H), T(A), T(R), T(E), T(D), T(SPACE), END);
}
break;
case MACRO_CONST:
if (record->event.pressed) {
return MACRO( T(C), T(O), T(N), T(S), T(T), T(SPACE), END);
}
break;
case MACRO_DIM:
if (record->event.pressed) {
return MACRO( T(D), T(I), T(M), T(SPACE), END);
}
break;
case MACRO_STRING:
if (record->event.pressed) {
return MACRO( T(S), T(T), T(R), T(I), T(N), T(G), T(SPACE), END);
}
break;
case MACRO_BOOL:
if (record->event.pressed) {
return MACRO( T(B), T(O), T(O), T(L), T(E), T(A), T(N), T(SPACE), END);
}
break;
case MACRO_INT:
if (record->event.pressed) {
return MACRO( T(I), T(N), T(T), T(SPACE), END);
}
break;
case MACRO_DEC:
if (record->event.pressed) {
return MACRO( T(D), T(E), T(C), T(I), T(M), T(A), T(L), T(SPACE), END);
}
break;
case MACRO_RETURN:
if (record->event.pressed) {
return MACRO( T(R), T(E), T(T), T(U),T(R),T(N), T(SPACE), END);
}
break;
case MACRO_NOTHING:
if (record->event.pressed) {
return MACRO( T(N), T(O), T(T), T(H), T(I), T(N), T(G), T(SPACE), END);
}
case MACRO_TODO:
if (record->event.pressed) {
return MACRO( KC_BSLASH, D(LSHIFT) ,T(T), T(O), T(D), T(O), KC_DOT, U(LSHIFT), T(SPACE),END);
}
break;
case MACRO_SAVE:
if (record->event.pressed) {
return MACRO( D(LCTL) ,T(S), U(LCTL),END);
}
break;
case MACRO_BUILD:
if (record->event.pressed) {
return MACRO( D(LCTL), D(LSHIFT) ,T(B), U(LSHIFT), U(LCTL),END);
}
break;
case MACRO_DEBUG:
if (record->event.pressed) {
return MACRO( KC_F5 ,END);
}
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;
}
};

View File

@ -0,0 +1,28 @@
# ErgoDox EZ Dvorak Programmer SWEDISH
Dvorak layout adjusted for a suitable programmer layout and swedish special characters added:
* åäö characters added
* Layout for common vb.net keywords
* Common Visual Studio commands like Save, Build, Debug
TODO:
* (Layer 4 is qwerty (for easier gaming & less fortunate keyboard users)) Like this idea, will add it later on
Known issues:
* Keymap 2 modifier has not gotten its place yet..
* Print screen, where?
## Changelog
* 2017-05-16
* Initial release
# Author
Christian Westerlund
cwesterlund @ github
Thanks to the author of keymap csharp_dev for inspiration!

View File

@ -254,7 +254,7 @@ const uint16_t PROGMEM fn_actions[] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -265,17 +265,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) {
case _DV:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV);
persistent_default_layer_set(1UL<<_DV);
}
break;
case _QW:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW);
persistent_default_layer_set(1UL<<_QW);
}
break;
case _CM:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM);
persistent_default_layer_set(1UL<<_CM);
}
break;
}

View File

@ -0,0 +1,23 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
UNICODEMAP_ENABLE = yes # unicodemap
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
TAP_DANCE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@ -0,0 +1,24 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define TAPPING_TERM 300
#define LEADER_TIMEOUT 400
#define DISABLE_SPACE_CADET_ROLLOVER
#define UNICODE_TYPE_DELAY 0
#define LSPO_KEY KC_9
#define RSPC_KEY KC_0
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
// place overrides here
#endif

View File

@ -0,0 +1,224 @@
#include "frosty_flake.h"
#include "action_layer.h"
#include "eeconfig.h"
#include "process_unicode.h"
#include "process_unicodemap.h"
#include "quantum.h"
#define _______ KC_TRNS
//declarations for tap dancing emojis
void register_hex32(uint32_t hex);
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
void cycleHands(qk_tap_dance_state_t *state, void *user_data);
void tap(uint16_t keycode){
register_code(keycode);
unregister_code(keycode);
};
//Tap Dance Declarations
enum taps{
TD_CTCPS = 0,
EMOJIS,
ANIMAL,
HAND
};
enum unicode_name { // split every five emojis
THINK = 1, // thinking face 🤔
GRIN, // grinning face 😊
SMRK, // smirk 😏
WEARY, // good shit 😩
UNAMU, // unamused 😒
SNEK, // snke 🐍
PENGUIN, // 🐧
DRAGON, // 🐉
MONKEY, // 🐒
CHICK, // 🐥
OKOK, // 👌
EFFU, // 🖕
INUP, // 👆
THUP, // 👍
THDN, // 👎
BBB, // dat B 🅱
POO, // poop 💩
HUNDR, // 100 💯
EGGPL, // EGGPLANT 🍆
WATER, // wet 💦
LIT // fire 🔥
};
enum my_macros {
NEWDESK = 0,
LEFTDESK,
RIGHTDESK,
CLOSEDESK
};
enum quick {
DISFACE = 0,
TFLIP,
TPUT,
SHRUG,
FACE,
RANDIG
};
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// Tap once for CTRL, twice for Caps Lock
[TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
[EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, NULL),
[ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, NULL),
[HAND] = ACTION_TAP_DANCE_FN_ADVANCED(cycleHands, NULL, NULL)
// Other declarations would go here, separated by commas, if you have them
};
// macros
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch(id) {
case NEWDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(D), U(LGUI), U(LCTL), U(D), END ); // NEW DESKTOP
}
break;
case LEFTDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(LEFT), U(LGUI), U(LCTL), U(LEFT), END ); // LEFT DESKTOP
}
break;
case RIGHTDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(RGHT), U(LGUI), U(LCTL), U(RGHT), END ); // RIGHT DESKTOP
}
break;
case CLOSEDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(F4), U(LGUI), U(LCTL), U(F4), END ); // CLOSE DESKTOP
}
break;
}
return MACRO_NONE;
};
// emojis in unicode
const uint32_t PROGMEM unicode_map[] = {
[THINK] = 0x1F914,
[GRIN] = 0x1F600,
[BBB] = 0x1F171,
[POO] = 0x1F4A9,
[HUNDR] = 0x1F4AF,
[SMRK] = 0x1F60F,
[WEARY] = 0x1F629,
[EGGPL] = 0x1F346,
[WATER] = 0x1F4A6,
[LIT] = 0x1F525,
[UNAMU] = 0x1F612,
[SNEK] = 0x1F40D,
[PENGUIN] = 0x1F427,
[MONKEY] = 0x1F412,
[CHICK] = 0x1F425,
[DRAGON] = 0x1F409,
[OKOK] = 0x1F44C,
[EFFU] = 0x1F595,
[INUP] = 0x1F446,
[THDN] = 0x1F44E,
[THUP] = 0x1F44D
};
// Layouts
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSPO,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
[1] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
TD(EMOJIS),TD(ANIMAL),TD(HAND),X(SMRK),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, TG(2),_______ , KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
[2] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, KC_D, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, _______, _______, KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
};
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_TWO_KEYS(KC_A, KC_A) { // select all and copy
register_code(KC_LCTL);
tap(KC_A);
tap(KC_C);
unregister_code(KC_LCTL);
}
}
}
void matrix_init_user(void) {
_delay_ms(500);
set_unicode_input_mode(UC_WINC);
};
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count]));
unicode_input_finish();
}
else if(state->count <= 5) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count]));
unicode_input_finish();
}
};
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
unicode_input_finish();
}
else if(state->count <= 5) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
unicode_input_finish();
}
};
void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
unicode_input_finish();
}
else if(state->count <= 5) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
unicode_input_finish();
}
};

View File

@ -0,0 +1,24 @@
# The Nikchi's keymap for frosty_flake
### FEATURING
-SPACE CADET
-Caps Lock is now LCTRL
-LCTRL is Tap(LCTRL, Caps Lock)
### LEADER KEY - RALT
COMBOS
-a,a => Select All, Copy
### FN REBINDS for Windows
```
[W] [New Desktop]
[A][S][D] [Left Desk][Delete Desk][Right Desk]
[Ins][Hom][PUp] [RW][PP][FF]
[Del][End][PDn] [MU][VD][VU]
Arrows are Mouskeys, left three mods are clicks
```

View File

@ -54,8 +54,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work

View File

@ -121,7 +121,7 @@ const uint16_t PROGMEM fn_actions[] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -131,17 +131,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) {
case _DV:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV);
persistent_default_layer_set(1UL<<_DV);
}
break;
case _QW:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW);
persistent_default_layer_set(1UL<<_QW);
}
break;
case _CM:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM);
persistent_default_layer_set(1UL<<_CM);
}
break;
}

View File

@ -147,7 +147,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -0,0 +1,15 @@
#define COLOR_BLANK 0, 0, 0
#define COLOR_BLACK 0, 0, 0
#define COLOR_WHITE 15,15,15
#define COLOR_GRAY 7, 7, 7
#define COLOR_RED 15, 0, 0
#define COLOR_GREEN 0,15, 0
#define COLOR_BLUE 0, 0,15
#define COLOR_YELLOW 15,15, 0
#define COLOR_MAGENTA 15, 0,15
#define COLOR_CYAN 0,15,15
#define COLOR_ORANGE 15, 5, 0

View File

@ -153,7 +153,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#define PS2_INIT_DELAY 3000
#define PS2_MOUSE_INIT_DELAY 2000
#define BATTERY_PIN 9
#define BATTERY_POLL 30000
#define MAX_VOLTAGE 4.2
@ -205,7 +205,7 @@ enum led_sequence {
LED_RSFT,
LED_RCTL,
LED_RGUI,
LED_RALT,
LED_SLSH,
LED_SCLN,
LED_P,
@ -213,9 +213,9 @@ enum led_sequence {
LED_O,
LED_L,
LED_DOT,
LED_RALT,
LED_RGUI,
LED_EMOJI,
LED_GREEK,
LED_COMM,
LED_K,
LED_I,
@ -234,35 +234,35 @@ enum led_sequence {
LED_TRACKPOINT2,
LED_TRACKPOINT1,
LED_LSPC,
LED_B,
LED_G,
LED_T,
LED_G,
LED_B,
LED_LSPC,
LED_R,
LED_F,
LED_V,
LED_NUM,
LED_V,
LED_F,
LED_R,
LED_PUNC,
LED_C,
LED_D,
LED_E,
LED_W,
LED_S,
LED_X,
LED_LALT,
LED_D,
LED_C,
LED_EMPTY,
LED_LGUI,
LED_Z,
LED_A,
LED_Q,
LED_X,
LED_S,
LED_W,
LED_Q,
LED_A,
LED_Z,
LED_LALT,
LED_TAB,
LED_ESC,
LED_LSFT,
LED_LCTL,
LED_LSFT,
LED_ESC,
LED_TAB,
LED_TOTAL
};

View File

@ -14,6 +14,7 @@
#define PREVENT_STUCK_MODIFIERS
#define RGBSPS_ENABLE
#define RGBSPS_DEMO_ENABLE
#define UNICODE_TYPE_DELAY 0

View File

@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
#ifdef RGBSPS_ENABLE
#include "rgbsps.h"
#include "rgbtheme.h"
#endif
#ifdef PS2_MOUSE_ENABLE
#include "ps2_mouse.h"
@ -42,13 +43,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#undef FAUXCLICKY_OFF
#define FAUXCLICKY_OFF do { \
fauxclicky_enabled = false; \
rgbsps_set(LED_AUDIO, 0, 0, 0); \
rgbsps_set(LED_AUDIO, COLOR_BLANK); \
fauxclicky_stop(); \
} while (0)
#undef FAUXCLICKY_ON
#define FAUXCLICKY_ON do { \
fauxclicky_enabled = true; \
rgbsps_set(LED_AUDIO, 8, 0, 8); \
rgbsps_set(LED_AUDIO, THEME_COLOR_AUDIO); \
} while (0)
#endif
#endif
@ -144,6 +145,7 @@ enum planck_keycodes {
#ifndef MODULE_ADAFRUIT_BLE
OUT_BT,
#endif
RGBDEMO,
KEYCODE_END
};
@ -434,10 +436,10 @@ const uint8_t PROGMEM LED_MODS[] = {
};
const uint8_t PROGMEM LED_FN[] = {
LED_PUNC,
LED_EMPTY,
LED_NUM,
LED_FUN,
LED_EMOJI
LED_GREEK
};
const uint8_t PROGMEM LED_INDICATORS[] = {
@ -468,16 +470,37 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = {
void led_turnoff_keys(void) {
for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0);
rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), COLOR_BLACK);
}
for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0);
rgbsps_set(pgm_read_byte(&LED_MODS[i]), COLOR_BLACK);
}
for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0);
rgbsps_set(pgm_read_byte(&LED_FN[i]), COLOR_BLACK);
}
}
#ifdef RGBSPS_DEMO_ENABLE
void led_demo(void) {
rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX);
rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE);
rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS);
rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY);
rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT);
rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH);
rgbsps_set(LED_IND_USB, THEME_COLOR_USB);
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI);
rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN);
rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM);
rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC);
rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK);
rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI);
rgbsps_send();
}
#endif
void led_reset(void) {
switch (glow_mode) {
case GLOW_NONE:
@ -486,26 +509,26 @@ void led_reset(void) {
case GLOW_MIN:
led_turnoff_keys();
for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 8, 8, 8);
rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW1_HOME);
}
rgbsps_set(LED_F, 15, 0, 0);
rgbsps_set(LED_J, 15, 0, 0);
rgbsps_set(LED_F, THEME_COLOR_GLOW1_HOMING);
rgbsps_set(LED_J, THEME_COLOR_GLOW1_HOMING);
break;
case GLOW_FULL:
for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 8, 8, 8);
rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), THEME_COLOR_GLOW2_ALPHA);
}
for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 15, 0);
rgbsps_set(pgm_read_byte(&LED_MODS[i]), THEME_COLOR_GLOW2_MODS);
}
for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 15);
rgbsps_set(pgm_read_byte(&LED_FN[i]), THEME_COLOR_GLOW2_FN);
}
for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 15, 0, 0);
rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW2_HOME);
}
rgbsps_set(LED_F, 15, 15, 0);
rgbsps_set(LED_J, 15, 15, 0);
rgbsps_set(LED_F, THEME_COLOR_GLOW2_HOMING);
rgbsps_set(LED_J, THEME_COLOR_GLOW2_HOMING);
break;
}
}
@ -513,11 +536,11 @@ void led_reset(void) {
void led_set_default_layer_indicator(void) {
uint8_t default_layer = biton32(default_layer_state);
if (default_layer == _QWERTY) {
rgbsps_set(LED_IND_QWERTY, 15, 10, 0);
rgbsps_set(LED_IND_ALT, 0, 0, 0);
rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY);
rgbsps_set(LED_IND_ALT, COLOR_BLANK);
} else {
rgbsps_set(LED_IND_QWERTY, 0, 0, 0);
rgbsps_set(LED_IND_ALT, 15, 10, 0);
rgbsps_set(LED_IND_QWERTY, COLOR_BLANK);
rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT);
}
rgbsps_send();
return;
@ -528,12 +551,12 @@ void led_set_layer_indicator(void) {
led_reset();
rgbsps_set(LED_IND_GUI, 0, 0, 0);
rgbsps_set(LED_IND_FUN, 0, 0, 0);
rgbsps_set(LED_IND_NUM, 0, 0, 0);
rgbsps_set(LED_IND_PUNC, 0, 0, 0);
rgbsps_set(LED_IND_GREEK, 0, 0, 0);
rgbsps_set(LED_IND_EMOJI, 0, 0, 0);
rgbsps_set(LED_IND_GUI, COLOR_BLANK);
rgbsps_set(LED_IND_FUN, COLOR_BLANK);
rgbsps_set(LED_IND_NUM, COLOR_BLANK);
rgbsps_set(LED_IND_PUNC, COLOR_BLANK);
rgbsps_set(LED_IND_GREEK, COLOR_BLANK);
rgbsps_set(LED_IND_EMOJI, COLOR_BLANK);
uint8_t layer = biton32(layer_state);
if (oldlayer == layer) {
@ -549,71 +572,71 @@ void led_set_layer_indicator(void) {
switch(layer) {
case _GUI:
rgbsps_set(LED_IND_GUI, 15, 0, 15);
rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI);
break;
case _FUN:
rgbsps_set(LED_IND_FUN, 15, 0, 0);
rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN);
break;
case _NUM:
rgbsps_set(LED_IND_NUM, 0, 0, 15);
rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM);
break;
case _PUNC:
rgbsps_set(LED_IND_PUNC, 0, 15, 0);
rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC);
break;
case _GREEKL:
case _GREEKU:
rgbsps_set(LED_IND_GREEK, 0, 15, 15);
rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK);
break;
case _EMOJI:
rgbsps_set(LED_IND_EMOJI, 15, 15, 0);
rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI);
break;
default:
rgbsps_set(LED_IND_GUI, 3, 3, 3);
rgbsps_set(LED_IND_FUN, 3, 3, 3);
rgbsps_set(LED_IND_NUM, 3, 3, 3);
rgbsps_set(LED_IND_PUNC, 3, 3, 3);
rgbsps_set(LED_IND_GREEK, 3, 3, 3);
rgbsps_set(LED_IND_EMOJI, 3, 3, 3);
rgbsps_set(LED_IND_GUI, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_FUN, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_NUM, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_PUNC, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_GREEK, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_EMOJI, THEME_COLOR_OTHERLAYER);
}
rgbsps_send();
}
void led_set_unicode_input_mode(void) {
rgbsps_set(LED_IND_LINUX, 0, 0, 0);
rgbsps_set(LED_IND_APPLE, 0, 0, 0);
rgbsps_set(LED_IND_WINDOWS, 0, 0, 0);
rgbsps_set(LED_IND_LINUX, COLOR_BLANK);
rgbsps_set(LED_IND_APPLE, COLOR_BLANK);
rgbsps_set(LED_IND_WINDOWS, COLOR_BLANK);
switch (get_unicode_input_mode()) {
case UC_LNX:
rgbsps_set(LED_IND_LINUX, 15, 15, 15);
rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX);
break;
case UC_OSX:
rgbsps_set(LED_IND_APPLE, 15, 15, 15);
rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE);
break;
case UC_WIN:
case UC_WINC:
rgbsps_set(LED_IND_WINDOWS, 15, 15, 15);
rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS);
break;
}
rgbsps_send();
}
void led_set_output_ble(void) {
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15);
rgbsps_set(LED_IND_USB, 0, 0, 0);
rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH);
rgbsps_set(LED_IND_USB, COLOR_BLANK);
rgbsps_send();
}
void led_set_output_usb(void) {
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0);
rgbsps_set(LED_IND_USB, 15, 15, 15);
rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK);
rgbsps_set(LED_IND_USB, THEME_COLOR_USB);
rgbsps_send();
}
void led_set_output_none(void) {
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0);
rgbsps_set(LED_IND_USB, 0, 0, 0);
rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK);
rgbsps_set(LED_IND_USB, COLOR_BLANK);
rgbsps_send();
}
@ -622,9 +645,9 @@ void led_init(void) {
rgbsps_turnoff();
// set trackpoint color
rgbsps_set(LED_TRACKPOINT1, 15, 0, 0);
rgbsps_set(LED_TRACKPOINT2, 0, 0, 15);
rgbsps_set(LED_TRACKPOINT3, 15, 0, 0);
rgbsps_set(LED_TRACKPOINT1, THEME_COLOR_TP1);
rgbsps_set(LED_TRACKPOINT2, THEME_COLOR_TP2);
rgbsps_set(LED_TRACKPOINT3, THEME_COLOR_TP3);
// unicode input mode
led_set_unicode_input_mode();
@ -632,6 +655,17 @@ void led_init(void) {
// layer indicator
led_set_layer_indicator();
led_set_default_layer_indicator();
// clicky
#ifdef FAUXCLICKY_ENABLE
if (fauxclicky_enabled) {
rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
} else {
rgbsps_set(LED_IND_AUDIO, COLOR_BLANK);
}
#endif
rgbsps_send();
}
@ -911,7 +945,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_SYS] = KEYMAP(
DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO,
XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
@ -921,7 +955,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
#ifdef RGBSPS_ENABLE
@ -1100,14 +1134,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// layout switchers
case QWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
#ifdef LAYOUT_DVORAK
case DVORAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
@ -1115,7 +1149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_COLEMAK
case COLEMAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -1123,7 +1157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_WORKMAN
case WORKMAN:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_WORKMAN);
persistent_default_layer_set(1UL<<_WORKMAN);
}
return false;
break;
@ -1131,7 +1165,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_NORMAN
case NORMAN:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_NORMAN);
persistent_default_layer_set(1UL<<_NORMAN);
}
return false;
break;
@ -1211,15 +1245,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case FC_TOG:
#ifdef RGBSPS_ENABLE
if (fauxclicky_enabled) {
rgbsps_set(LED_IND_AUDIO, 0, 0, 0);
rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
} else {
rgbsps_set(LED_IND_AUDIO, 5, 11, 13);
rgbsps_set(LED_IND_AUDIO, COLOR_BLANK);
}
rgbsps_send();
#endif
return true;
break;
#endif
#ifdef RGBSPS_DEMO_ENABLE
case RGBDEMO:
led_demo();
return false;
break;
#endif
}
return true;
}
@ -1280,9 +1321,9 @@ void turn_off_capslock() {
bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
if (new_capslock ^ capslock) { // capslock state is different
if ((capslock = new_capslock)) {
rgbsps_set(LED_IND_CAPSLOCK, 15, 0, 0);
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
} else {
rgbsps_set(LED_IND_CAPSLOCK, 0, 0, 0);
rgbsps_set(LED_IND_CAPSLOCK, COLOR_BLANK);
}
rgbsps_send();
}

View File

@ -0,0 +1 @@
#include "rgbtheme_default.h"

View File

@ -0,0 +1,36 @@
#include "color.h"
#define THEME_COLOR_LINUX COLOR_WHITE
#define THEME_COLOR_APPLE COLOR_WHITE
#define THEME_COLOR_WINDOWS COLOR_WHITE
#define THEME_COLOR_QWERTY COLOR_RED
#define THEME_COLOR_ALT COLOR_RED
#define THEME_COLOR_AUDIO COLOR_GREEN
#define THEME_COLOR_BLUETOOTH 7,7,15
#define THEME_COLOR_USB COLOR_WHITE
#define THEME_COLOR_CAPSLOCK COLOR_RED
#define THEME_COLOR_GUI COLOR_MAGENTA
#define THEME_COLOR_FUN COLOR_RED
#define THEME_COLOR_NUM 7,7,15
#define THEME_COLOR_PUNC COLOR_GREEN
#define THEME_COLOR_GREEK COLOR_CYAN
#define THEME_COLOR_EMOJI COLOR_YELLOW
#define THEME_COLOR_OTHERLAYER COLOR_GRAY
#define THEME_COLOR_GLOW1_HOME COLOR_ORANGE
#define THEME_COLOR_GLOW1_HOMING COLOR_RED
#define THEME_COLOR_GLOW2_ALPHA COLOR_ORANGE
#define THEME_COLOR_GLOW2_MODS COLOR_ORANGE
#define THEME_COLOR_GLOW2_FN COLOR_ORANGE
#define THEME_COLOR_GLOW2_HOME COLOR_ORANGE
#define THEME_COLOR_GLOW2_HOMING COLOR_RED
#define THEME_COLOR_TP1 COLOR_ORANGE
#define THEME_COLOR_TP2 COLOR_RED
#define THEME_COLOR_TP3 COLOR_ORANGE

View File

@ -0,0 +1,36 @@
#include "color.h"
#define THEME_COLOR_LINUX COLOR_WHITE
#define THEME_COLOR_APPLE COLOR_WHITE
#define THEME_COLOR_WINDOWS COLOR_WHITE
#define THEME_COLOR_QWERTY COLOR_RED
#define THEME_COLOR_ALT COLOR_RED
#define THEME_COLOR_AUDIO COLOR_GREEN
#define THEME_COLOR_BLUETOOTH COLOR_BLUE
#define THEME_COLOR_USB COLOR_WHITE
#define THEME_COLOR_CAPSLOCK COLOR_RED
#define THEME_COLOR_GUI COLOR_MAGENTA
#define THEME_COLOR_FUN COLOR_RED
#define THEME_COLOR_NUM COLOR_BLUE
#define THEME_COLOR_PUNC COLOR_GREEN
#define THEME_COLOR_GREEK COLOR_CYAN
#define THEME_COLOR_EMOJI COLOR_YELLOW
#define THEME_COLOR_OTHERLAYER COLOR_GRAY
#define THEME_COLOR_GLOW1_HOME COLOR_GRAY
#define THEME_COLOR_GLOW1_HOMING COLOR_RED
#define THEME_COLOR_GLOW2_ALPHA COLOR_GRAY
#define THEME_COLOR_GLOW2_MODS COLOR_GREEN
#define THEME_COLOR_GLOW2_FN COLOR_BLUE
#define THEME_COLOR_GLOW2_HOME COLOR_RED
#define THEME_COLOR_GLOW2_HOMING COLOR_YELLOW
#define THEME_COLOR_TP1 COLOR_RED
#define THEME_COLOR_TP2 COLOR_BLUE
#define THEME_COLOR_TP3 COLOR_RED

View File

@ -133,8 +133,8 @@ void matrix_init(void) {
matrix_init_quantum();
}
uint8_t matrix_scan(void
){
uint8_t matrix_scan(void)
{
// Set row, read cols
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
# if (DEBOUNCING_DELAY > 0)

View File

@ -4,9 +4,9 @@
#include "matrix.h"
#include "musical_notes.h"
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, .03125);
float fauxclicky_released_note[2] = MUSICAL_NOTE(_C3, .03125);
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, .03125);
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A4, 0.0625);
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A4, 0.0625);
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 0.25);
// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100}

View File

@ -0,0 +1,23 @@
# cinaeco's HHKB firmware
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@ -0,0 +1,23 @@
# QMK Keyboard Firmware for HHKB
## Modifications
### HHKB Fn Layer
Added some Media keys.
### Utility Layer (SpaceFN)
Hold `Space` for:
- Vi-style direction keys.
- WASD-style mouse keys.
- Dynamic macro playback on `1` and `2`.
- Qwerty/Colemak/Dvorak layout selection on `-`, `=` and `\ `
### Dynamic Macros
Hold `q` and press:
- `1` or `2` to record macro 1 or 2.
- `s` to stop recording.

View File

@ -0,0 +1,20 @@
#ifndef CONFIG_CINAECO_H
#define CONFIG_CINAECO_H
#include "../../config.h"
#undef MANUFACTURER
#undef PRODUCT
#undef DESCRIPTION
#define MANUFACTURER QMK
#define PRODUCT HHKB QMK cinaeco
#define DESCRIPTION HHKB on QMK Firmware with cinaeco keymap
// Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly.
#undef TAPPING_TERM
#define TAPPING_TERM 230
// Uncomment to enable NKRO by default. May cause issues with KVM switches.
//#define FORCE_NKRO
#endif

View File

@ -0,0 +1,186 @@
/* -*- eval: (turn-on-orgtbl); -*-
* cinaeco's HHKB Layout
*/
#include "hhkb.h"
// Layers.
#define QWER 0
#define COLE 1
#define DVOR 2
#define HHKB 3
#define UTIL 4
#define MREC 5
// Easier-to-read Layer Arrays.
#define ____ KC_TRNS
enum hhkb_keycodes {
DYNAMIC_MACRO_RANGE = SAFE_RANGE,
};
#include "dynamic_macro.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWER Layer: Qwerty Default
*
* ,--------------------------------------------------------------.
* |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
* |--------------------------------------------------------------|
* |Tab |Q/MREC| W| E| R| T| Y| U| I| O| P| [| ]|Backs|
* |--------------------------------------------------------------|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Ent/Ctrl|
* |--------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0|
* `--------------------------------------------------------------'
* |Alt|Gui | Space/UTIL |Gui |Alt|
* `-------------------------------------------'
*
*/
[QWER] = KEYMAP(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, LT(MREC, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, CTL_T(KC_ENT), \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), \
KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
/* COLE Layer: Colemak
*
* ,--------------------------------------------------------------.
* |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
* |--------------------------------------------------------------|
* |Tab |Q/MREC| W| F| P| G| J| L| U| Y| ;| [| ]|Backs|
* |--------------------------------------------------------------|
* |Ctrl | A| R| S| T| D| H| N| E| I| O| '|Ent/Ctrl|
* |--------------------------------------------------------------|
* |Shift | Z| X| C| V| K| B| M| ,| .| /|Shift |Fn0|
* `--------------------------------------------------------------'
* |Alt|Gui | Space/UTIL |Gui |Alt|
* `-------------------------------------------'
*
*/
[COLE] = KEYMAP(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, LT(MREC, KC_Q), KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, \
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT), \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), \
KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
/* DVOR Layer: Dvorak
*
* ,--------------------------------------------------------------.
* |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `|
* |--------------------------------------------------------------|
* |Tab |'/MREC| ,| .| P| Y| F| G| C| R| L| /| =|Backs|
* |--------------------------------------------------------------|
* |Ctrl | A| O| E| U| I| D| H| T| N| S| -|Ent/Ctrl|
* |--------------------------------------------------------------|
* |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift |Fn0|
* `--------------------------------------------------------------'
* |Alt|Gui | Space/UTIL |Gui |Alt|
* `-------------------------------------------'
*
*/
[DVOR] = KEYMAP(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, \
KC_TAB, LT(MREC, KC_QUOT), KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, \
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT), \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), \
KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
/* HHKB Layer: HHKB mode (HHKB Fn)
*
* ,-----------------------------------------------------------.
* |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
* |-----------------------------------------------------------|
* |Caps |PLA|PRV|NXT| | | | |Psc|Slk|Pus|Up | |Backs|
* |-----------------------------------------------------------|
* | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter |
* |-----------------------------------------------------------|
* | | | | | | | +| -|End|PgD|Dow| | |
* `-----------------------------------------------------------'
* | | | |STOP | |
* `-------------------------------------------'
*/
[HHKB] = KEYMAP(
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
KC_CAPS, KC_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, \
____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, \
____, ____, ____, KC_MSTP, ____),
/* UTIL Layer: Extra utilities
*
* ,-------------------------------------------------------------.
* |DFU|PLY1|PLY2| | | | | | | | |QWE|COL|DVO|DBG|
* |-------------------------------------------------------------|
* | |MLB |M-Up|MRB|MwU| |Hom|PgD|PgU|End| | | | |
* |-------------------------------------------------------------|
* | |M-Lt|M-Dn|M-R|MwD| |LEF|DOW|UP |RIG| | | |
* |-------------------------------------------------------------|
* | | | | | |SPC| | | | | | | |
* `-------------------------------------------------------------'
* | | | | | |
* `-------------------------------------------'
*
*/
[UTIL] = KEYMAP(
RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, \
____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, \
____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, \
____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____),
/* MREC Layer: Record macros with `q`
*
* ,-------------------------------------------------------------.
* | |REC1|REC2| | | | | | | | | | | | |
* |-------------------------------------------------------------|
* | | | | | | | | | | | | | | |
* |-------------------------------------------------------------|
* | | |RSTP| | | | | | | | | | |
* |-------------------------------------------------------------|
* | | | | | | | | | | | | | |
* `-------------------------------------------------------------'
* | | | | | |
* `-------------------------------------------'
*
*/
[MREC] = KEYMAP(
____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
return MACRO_NONE;
};
// For Dynamic Macros.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
return true;
}

View File

@ -146,7 +146,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -155,19 +155,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -53,7 +53,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
#OPT_DEFS += -DBOOTLOADER_SIZE=4096
# as per original hasu settings
OPT_DEFS += -DBOOTLOADER_SIZE=512
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.

View File

@ -283,7 +283,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}

View File

@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
the exact changes. The diagrams in this README shows the highlights of the
changes from the default mappings.
I also decided to change all calls to `persistant_default_layer_set()` to
I also decided to change all calls to `persistent_default_layer_set()` to
`default_layer_set()` since this is my personal perference.
## Macros

View File

@ -269,7 +269,7 @@ const uint16_t PROGMEM fn_actions[] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -279,17 +279,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) {
case _DV:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV);
persistent_default_layer_set(1UL<<_DV);
}
break;
case _QW:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW);
persistent_default_layer_set(1UL<<_QW);
}
break;
case _CM:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM);
persistent_default_layer_set(1UL<<_CM);
}
break;
}

View File

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
bool TOG_STATUS = false;
int RGB_current_mode;
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -208,7 +208,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -138,7 +138,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -150,7 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -147,7 +147,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -147,7 +147,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -152,7 +152,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -150,19 +150,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -1,7 +1,7 @@
// 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 "M10A.h"
#include "m10a.h"
#include "action_layer.h"
#include "eeconfig.h"

View File

@ -1,4 +1,4 @@
#include "M10A.h"
#include "m10a.h"
void matrix_init_kb(void) {
matrix_init_user();

View File

@ -163,6 +163,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D0 // The pin your RGB strip is wired to
#define RGBLIGHT_TIMER // Require for fancier stuff (not compatible with audio)
#define RGBLED_NUM 7 // Number of LEDs
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17

View File

@ -0,0 +1,21 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@ -0,0 +1,8 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
// place overrides here
#endif

View File

@ -0,0 +1,119 @@
#include "miuni32.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Level 0: Default Layer
* ,---------------------------------------------------------------------------------------.
* | Q | W | E | R | T | Y | U | I | O | P | BSP |
* |---------------------------------------------------------------------------------------|
* | A | S | D | F | G | H | J | K | L | ENT |LT(1|,)|
* |---------------------------------------------------------------------------------------|
* |LT(3|Z)| X | C | V | NO | SPC | B | N | M | RSFT |LT(2|.)|
* |---------------------------------------------------------------------------------------|
*/
[0] ={
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, LT(1, KC_COMMA)},
{LT(3, KC_Z), KC_X, KC_C, KC_V, KC_NO, KC_SPC, KC_B, KC_N, KC_M, KC_RSFT, LT(2, KC_DOT)}
},
/* Level 1: Numbers Layer
* ,---------------------------------------------------------------------------------------.
* | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL |
* |---------------------------------------------------------------------------------------|
* | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | PGUP | TRNS |
* |---------------------------------------------------------------------------------------|
* | LATL | 1 | 2 | 3 | 0 | NO | LEFT | DOWN | RGHT | PGDN | RSHFT |
* |---------------------------------------------------------------------------------------|
*/
[1] ={
{KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL},
{KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS},
{KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_RSFT}
},
/* Level 2: Symbols Layer
* ,---------------------------------------------------------------------------------------.
* | ! | @ | # | $ | % | ^ | & | * | - | + | = |
* |---------------------------------------------------------------------------------------|
* | { | } | [ | ] | TRNS | TRNS | \ | ; | : | ` | ? |
* |---------------------------------------------------------------------------------------|
* | LSFT | LCTL | L | T | TRNS | TAB | N | TRNS | TRNS | RCTL | TRNS |
* |---------------------------------------------------------------------------------------|
*/
[2] ={
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL},
{KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_BSLS, KC_SCLN, KC_COLN, KC_GRV, KC_QUES},
{KC_LSFT, KC_LCTL, KC_L, KC_T, KC_TRNS, KC_TAB, KC_N, KC_TRNS, KC_TRNS, KC_RCTL, KC_TRNS}
},
/* Level 3: RGB Layer
* ,---------------------------------------------------------------------------------------.
* | RESET | TRNS | TRNS | TRNS | TRNS | F1 | F2 | F3 | F4 | F5 | F6 |
* |---------------------------------------------------------------------------------------|
* |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD| NO |RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| TRNS | TRNS |
* |---------------------------------------------------------------------------------------|
* | TRNS | TRNS | TRNS | TRNS | NO | F7 | F8 | F9 | F10 | F11 | F12 |
* |---------------------------------------------------------------------------------------|
*/
[3] ={
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6},
{RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}
}
};
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;
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -0,0 +1 @@
# The default keymap for miuni32

View File

@ -1,19 +1,62 @@
#include "miuni32.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] ={
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RSFT, KC_ENT},
{KC_Z, KC_X, KC_C, KC_V, KC_V, KC_SPC, KC_B, KC_N, KC_M , MO(1), KC_RCTL}
},
[1] ={
{KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL},
{KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_TRNS},
{RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, KC_TRNS, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, RGB_MOD},
}
};
const uint16_t PROGMEM fn_actions[] = {
/* Level 0: Default Layer
* ,---------------------------------------------------------------------------------------.
* | Q | W | E | R | T | Y | U | I | O | P | BSP |
* |---------------------------------------------------------------------------------------|
* | A | S | D | F | G | H | J | K | L | ENT |LT(1|,)|
* |---------------------------------------------------------------------------------------|
* |LT(3|Z)| X | C | V | NO | SPC | B | N | M | RSFT |LT(2|.)|
* |---------------------------------------------------------------------------------------|
*/
[0] ={
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, LT(1, KC_COMMA)},
{LT(3, KC_Z), KC_X, KC_C, KC_V, KC_NO, KC_SPC, KC_B, KC_N, KC_M, KC_RSFT, LT(2, KC_DOT)}
},
/* Level 1: Numbers Layer
* ,---------------------------------------------------------------------------------------.
* | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL |
* |---------------------------------------------------------------------------------------|
* | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | PGUP | TRNS |
* |---------------------------------------------------------------------------------------|
* | LATL | 1 | 2 | 3 | 0 | NO | LEFT | DOWN | RGHT | PGDN | RSHFT |
* |---------------------------------------------------------------------------------------|
*/
[1] ={
{KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL},
{KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS},
{KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_RSFT}
},
/* Level 2: Symbols Layer
* ,---------------------------------------------------------------------------------------.
* | ! | @ | # | $ | % | ^ | & | * | - | + | = |
* |---------------------------------------------------------------------------------------|
* | { | } | [ | ] | TRNS | TRNS | \ | ; | : | ` | ? |
* |---------------------------------------------------------------------------------------|
* | LSFT | LCTL | L | T | TRNS | TAB | N | TRNS | TRNS | RCTL | TRNS |
* |---------------------------------------------------------------------------------------|
*/
[2] ={
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL},
{KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_BSLS, KC_SCLN, KC_COLN, KC_GRV, KC_QUES},
{KC_LSFT, KC_LCTL, KC_L, KC_T, KC_TRNS, KC_TAB, KC_N, KC_TRNS, KC_TRNS, KC_RCTL, KC_TRNS}
},
/* Level 3: RGB Layer
* ,---------------------------------------------------------------------------------------.
* | RESET | TRNS | TRNS | TRNS | TRNS | F1 | F2 | F3 | F4 | F5 | F6 |
* |---------------------------------------------------------------------------------------|
* |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD| NO |RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| TRNS | TRNS |
* |---------------------------------------------------------------------------------------|
* | TRNS | TRNS | TRNS | TRNS | NO | F7 | F8 | F9 | F10 | F11 | F12 |
* |---------------------------------------------------------------------------------------|
*/
[3] ={
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6},
{RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}
}
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
@ -31,19 +74,46 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -0,0 +1,21 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@ -0,0 +1,8 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
// place overrides here
#endif

View File

@ -0,0 +1,181 @@
#include "miuni32.h"
// Keyboard layer definitions
#define BASE 0
#define NUMBERS 1
#define SYMBOLS 2
#define MEDIA 3
// Keyboard macro defintions
#define GIT_ST M(0)
#define GIT_PU M(1)
#define GIT_CM M(2)
#define HM_DIR M(3)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Level 0: Default Layer
* ,---------------------------------------------------------------------------------------.
* | Q | W | E | R | T | Y | U | I | O | P | BSP |
* |---------------------------------------------------------------------------------------|
* | A | S | D | F | G | H | J | K | L | ENT | RSFT |
* |---------------------------------------------------------------------------------------|
* |LT(2|Z)|LT(3|X)| C | V | B | SPC | N | M | , |LT(1|.)| RCTL |
* |---------------------------------------------------------------------------------------|
*/
[BASE] ={
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_RSFT},
{LT(2, KC_Z), LT(3, KC_X), KC_C, KC_V, KC_B, KC_SPC, KC_N, KC_M, KC_COMMA, LT(1, KC_DOT), KC_RCTL}
},
/* Level 1: Numbers Layer
* ,---------------------------------------------------------------------------------------.
* | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL |
* |---------------------------------------------------------------------------------------|
* | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | INS | PGUP |
* |---------------------------------------------------------------------------------------|
* | LATL | 1 | 2 | 3 | 0 | ENT | LEFT | DOWN | RGHT | !TRNS!| PGDN |
* |---------------------------------------------------------------------------------------|
*/
[NUMBERS] ={
{KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL},
{KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_INSERT, KC_PGUP},
{KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_PGDN}
},
/* Level 2: Symbols Layer
* ,---------------------------------------------------------------------------------------.
* | ! | @ | # | $ | % | ^ | & | * | _ | = | ? |
* |---------------------------------------------------------------------------------------|
* | RESET | LSFT | ~ | { | } | \ | | | ; | : | ` | " |
* |---------------------------------------------------------------------------------------|
* | !TRNS!| LCTL | TRNS | [ | ] | TAB | < | > | TRNS | RCTL | TRNS |
* |---------------------------------------------------------------------------------------|
*/
[SYMBOLS] ={
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_EQL, KC_QUES},
{RESET, KC_LSFT, KC_TILD, KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_SCLN, KC_COLN, KC_GRV, KC_DQUO},
{KC_TRNS, KC_LCTL, KC_TRNS, KC_LBRC, KC_RBRC, KC_TAB, KC_LABK, KC_RABK, KC_TRNS, KC_RCTL, KC_TRNS}
},
/* Level 3: Media Layer
* ,---------------------------------------------------------------------------------------.
* |RGB_TOG|RGB_HUI|RGB_SAI|RGB_VAI| GIT_CM| CALC | WREF | WFAV | MUTE | VOLD | VOLU |
* |---------------------------------------------------------------------------------------|
* |RGB_MOD|RGB_HUD|RGB_SAD|RGB_VAD| GIT_ST| WHOM | WBAK | WFWD | TRNS | STOP | PLAY |
* |---------------------------------------------------------------------------------------|
* | TRNS | !TRNS!| TRNS | HM_DIR| GIT_PU| MYCM | WSTP | WSCH | MSEL | MPRV | MNXT |
* |---------------------------------------------------------------------------------------|
*/
[MEDIA] ={
{RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, GIT_CM, KC_CALC, KC_WREF, KC_WFAV, KC_MUTE, KC_VOLD, KC_VOLU},
{RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, GIT_ST, KC_WHOM, KC_WBAK, KC_WFWD, KC_TRNS, KC_MSTP, KC_MPLY},
{KC_TRNS, KC_TRNS, KC_TRNS, HM_DIR, GIT_PU, KC_MYCM, KC_WSTP, KC_WSCH, KC_MSEL, KC_MPRV, KC_MNXT}
}
};
void press_and_release_key(uint8_t code)
{
register_code(code);
unregister_code(code);
}
void press_and_release_mod_key(uint8_t mod, uint8_t code)
{
register_code(mod);
register_code(code);
unregister_code(code);
unregister_code(mod);
}
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)
{
return MACRO(T(G), T(I), T(T), T(SPC),
T(S), T(T), T(A), T(T), T(U), T(S), END);
}
break;
case 1:
if (record->event.pressed)
{
return MACRO(T(G), T(I), T(T), T(SPC),
T(P), T(U), T(L), T(L), END);
}
break;
case 2:
if (record->event.pressed)
{
return MACRO(T(G), T(I), T(T), T(SPC),
T(C), T(O), T(M), T(M), T(I), T(T), END);
}
break;
case 3:
if (record->event.pressed)
{
/*press_and_release_key(KC_C);
press_and_release_key(KC_D);
press_and_release_key(KC_SPC);
press_and_release_mod_key(KC_LSFT, KC_GRV);
press_and_release_key(KC_SLSH);
press_and_release_key(KC_Q);
press_and_release_key(KC_M);
press_and_release_key(KC_K);
press_and_release_mod_key(KC_LSFT, KC_MINS);*/
return MACRO(I(0),
T(C), T(D), T(SPC),
D(LSFT), T(GRV), U(LSFT), T(SLSH),
T(Q), T(M), T(K), D(LSFT), T(MINS), U(LSFT),
T(F), T(I), T(R), T(M), T(W), T(A), T(R), T(E), T(SLSH),
T(K), T(E), T(Y), T(B), T(O), T(A), T(R), T(D), T(S), T(SLSH),
T(M), T(I), T(U), T(N), T(I), T(3), T(2), T(SLSH),
T(K), T(E), T(Y), T(M), T(A), T(P), T(S), END);
}
}
return MACRO_NONE;
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -0,0 +1 @@
# ht_156's keymap for miuni32, using 33 keys

View File

@ -6,10 +6,10 @@
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A ) { \
K20, K21, K22, K23, K25, K26, K27, K28, K29, K2A ) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A } \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_NO, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A } \
}
#endif

View File

@ -76,7 +76,7 @@ const uint16_t PROGMEM fn_actions[] = {
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -86,17 +86,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) {
case _DV:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV);
persistent_default_layer_set(1UL<<_DV);
}
break;
case _QW:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW);
persistent_default_layer_set(1UL<<_QW);
}
break;
case _CM:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM);
persistent_default_layer_set(1UL<<_CM);
}
break;
}

View File

@ -80,8 +80,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
};
// Set a layer persistantly.
void persistant_default_layer_set(uint16_t default_layer) {
// Set a layer persistently.
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}

View File

@ -149,7 +149,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;

View File

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -0,0 +1,12 @@
ifndef QUANTUM_DIR
include ../../../../Makefile
endif
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
COMMAND_ENABLE = yes # Commands for debug and configuration
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
TAP_DANCE_ENABLE = yes
AUDIO_ENABLE = no
API_SYSEX_ENABLE = no

View File

@ -0,0 +1,31 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 500
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
#define DM_PLAY DYN_MACRO_PLAY1
#define DM_STRT DYN_REC_START1
#define DM_STOP DYN_REC_STOP
#define OSL_RSE OSL(RSE)
#define OSL_LWR OSL(LWR)
#define OSL_FUN OSL(FUN)
#define OSM_CTL OSM(MOD_LCTL)
#define OSM_ALT OSM(MOD_LALT)
#define OSM_SFT OSM(MOD_LSFT)
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -0,0 +1,100 @@
#include "planck.h"
#include "backlight.h"
#include "config.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
enum planck_layers { DEF, LWR, RSE, FUN };
enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
enum tap_dance_keys { TD_SCLN };
#include "dynamic_macro.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default
* ,-----------------------------------------------------------------------------------.
* | Q | W | E | R | T | Esc | Bksp | Y | U | I | O | P |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | A | S | D | F | G | Tab | Enter| H | J | K | L | ; |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Z | X | C | V | B | Shift|DmPlay| N | M | , | . | / |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Super| Alt | Fun | Lower| Space | Raise| Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[DEF] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD(TD_SCLN)},
{KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
{OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ! | @ | # | $ | % | | | ^ | & | * | ( | ) |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ~ | | | | | | | _ | + | | { | } |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | " | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
[LWR] = {
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
{S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, S(KC_LBRC), S(KC_RBRC)},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, S(KC_QUOT), S(KC_BSLS)},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
},
/* Raise
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ` | | | | | | | - | = | | [ | ] |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | ' | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
[RSE] = {
{KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
{KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
},
/* Function
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | Reset|Delete| F6 | F7 | F8 | F9 | F10 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | F11 | F12 | F13 | F14 | F15 | | | |MsWhLt|MsWhDn|MsWhUp|MsWhRt|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |BlTggl|BlStep| | | |DmStrt|DmStop| | |MsBtn1|MsBtn2|MsBtn3|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | |MsLeft|MsDown| MsUp |MsRght|
* `-----------------------------------------------------------------------------------'
*/
[FUN] = {
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10},
{KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R},
{BL_TOGG, BL_STEP, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R}
},
};
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_SCLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN)) // once for semi-colon, twice for colon
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
return true;
}
void matrix_init_user(void) {
}

View File

@ -0,0 +1,12 @@
About
------
A simple split qwerty Planck layout that makes use of one-shot modifiers,
one-shot layers, tap-dance keys and dynamic macros.
Layout
-------
![Layout](keyboard-layout.jpg "Keyboard Layout")

View File

@ -88,8 +88,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
};
// Set a layer persistantly.
void persistant_default_layer_set(uint16_t default_layer) {
// Set a layer persistently.
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}

View File

@ -204,7 +204,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
break;
return false;
@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
break;
return false;
@ -235,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
break;
return false;

View File

@ -164,7 +164,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_workman, false, 0);
#endif
persistant_default_layer_set(1UL<<_WORKMAN);
persistent_default_layer_set(1UL<<_WORKMAN);
}
return false;
break;
@ -185,7 +185,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
persistant_default_layer_set(1UL<<_PLOVER);
persistent_default_layer_set(1UL<<_PLOVER);
}
return false;
break;

View File

@ -270,7 +270,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}

View File

@ -6,7 +6,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
the exact changes. The diagrams in this README shows the highlights of the
changes from the default mappings.
I also decided to change all calls to `persistant_default_layer_set()` to
I also decided to change all calls to `persistent_default_layer_set()` to
`default_layer_set()` since this is my personal perference.
## Macros

View File

@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_workman, false, 0);
#endif
persistant_default_layer_set(1UL<<_WORKMAN);
persistent_default_layer_set(1UL<<_WORKMAN);
}
return false;
break;
@ -212,7 +212,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;

View File

@ -213,7 +213,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -260,7 +260,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -269,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -143,7 +143,7 @@ float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -156,7 +156,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
break;
case _COLEMAK:
@ -164,7 +164,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
break;
case _DVORAK:
@ -172,7 +172,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
break;
case _LOWER:

View File

@ -100,7 +100,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -112,7 +112,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -121,7 +121,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -233,7 +233,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer)
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
@ -344,7 +344,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case MACRO_QWERTY:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_QWERTY);
persistent_default_layer_set(1UL<<LAYER_QWERTY);
}
break;

View File

@ -139,7 +139,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -151,7 +151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;

View File

@ -162,7 +162,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -183,7 +183,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -209,7 +209,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -222,7 +222,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
break;
case _COLEMAK:
@ -230,7 +230,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
break;
case _DVORAK:
@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
break;
case _LOWER:

View File

@ -107,7 +107,8 @@ const uint16_t PROGMEM fn_actions[] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint16_t key_timer;
if (!process_record_dynamic_macro(keycode, record)) {
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) {
return false;
}

View File

@ -159,7 +159,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -171,7 +171,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

View File

@ -16,7 +16,7 @@ void tap(uint16_t keycode){
unregister_code(keycode);
};
void persistant_default_layer_set(uint16_t default_layer){
void persistent_default_layer_set(uint16_t default_layer){
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
};
@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case COLEMAK:
if(record->event.pressed){
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case SWCOLE:
if(record->event.pressed){
persistant_default_layer_set(1UL<<_SWCOLE);
persistent_default_layer_set(1UL<<_SWCOLE);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_swcole, false, 0);
#endif

View File

@ -134,7 +134,7 @@ void matrix_init_user(void) {
#endif
}
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -146,7 +146,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
break;
case GAME:
@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_game, false, STACCATO);
#endif
persistant_default_layer_set(1UL<<_GAME);
persistent_default_layer_set(1UL<<_GAME);
}
break;
case RAISE:

View File

@ -225,7 +225,7 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
break;
case _COLEMAK:
@ -246,7 +246,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
break;
case _DVORAK:
@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
break;
case _GAME:
@ -262,7 +262,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_GAME);
persistent_default_layer_set(1UL<<_GAME);
}
break;
case _NUMPAD:
@ -270,7 +270,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_NUMPAD);
persistent_default_layer_set(1UL<<_NUMPAD);
}
break;
case _ARROW:
@ -278,7 +278,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_LOWER);
persistent_default_layer_set(1UL<<_LOWER);
}
break;
case _LOWER:

View File

@ -180,7 +180,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
@ -201,7 +201,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;

Some files were not shown because too many files have changed in this diff Show More