1
0
Fork 0

[Keymap] update @nstickney's keymaps (#6076)

* [Keymap] iris@nstickney: improve RGB init

Perfecting the rgb backlight initialization with a delay for each
color; also start and stop the animation at the "default layer"
color.

* [Keymap] iris,ergodox@nstickney fix FN on SYMB

The function key was not operational on the SYMB and SYSH layers due
to other keycodes being mapped over MO() on those layers. The
offending keycodes have been moved to other keys.

* [Keymap] add @nstickney's userspace

Pulled common code out to a userspace directory for my iris and
ergodox keymaps.

* [Keymap] iris@nstickney add image to README

Added an image from keyboard-layout-editor.com to meet the README
standard.

* iris@nstickney hue values now `uint8_t` (#6050)
This commit is contained in:
Stick 2019-06-06 16:00:52 -04:00 committed by Drashna Jaelre
parent 872480dde2
commit de29da973a
9 changed files with 173 additions and 245 deletions

View file

@ -2,6 +2,8 @@
> Familiar layout for users who regularly switch between Iris and more standard layouts.
[![Keymap](https://i.imgur.com/hKs7fYr.jpg)](http://www.keyboard-layout-editor.com/#/gists/aa6093ea2eb9c750ab941b92adae7036)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
## Install
@ -15,11 +17,11 @@ $ make keebio/iris/rev2:nstickney:avrdude
## Usage
0. QWERTY `BASE` layer.
* `/`, `\\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters.
* `/`, `\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters.
* `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`. `'` can also be held for `CTRL`.
* [Space-Cadet Shift](/docs/docs/feature_space_cadet_shift.md) is enabled, so the `SHIFT` keys send `(` and `)` when tapped.
* [Space-Cadet Shift](https://docs.qmk.fm/#/feature_space_cadet_shift) is enabled, so the `SHIFT` keys send `(` and `)` when tapped.
* Hold down `/` or `=` for `ALT`.
* Hold down `\\` or `-` to access the functions layer.
* Hold down `\` or `-` to access the functions layer.
* Upper-center thumb keys are `GUI` and `MENU`.
* Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively.
* Tapping `MENU` 2, 3, or 4 times will toggle the `NUMP`, `SYMB`, and `SYSH` layers, respectively.
@ -40,7 +42,6 @@ $ make keebio/iris/rev2:nstickney:avrdude
If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls).
## License
Copyright © 2016-2019 @nstickney. Released under [GPL-2.0](/LICENSE).

View file

@ -33,8 +33,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define RGBLED_NUM 12
// #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8
// Unicode input
#undef UNICODE_SELECTED_MODES
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC
// #define RGBLIGHT_VAL_STEP 8

View file

@ -1,66 +1,4 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Layers
#define BASE 0 // Base layer
#define SYMB 1 // Symbols
#define SYSH 2 // Symbols, shifted
#define NUMP 4 // Numpad
#define FCTN 8 // Functions
// Tap Dancing
void dance_lock (qk_tap_dance_state_t *state, void *user_data) {
switch (state->count){
case 1: // Press once for LGUI
tap_code(KC_LGUI);
break;
case 2: // Press twice for NUMLOCK
tap_code(KC_NLCK);
break;
case 3: // Press thrice for CAPSLOCK
tap_code(KC_CAPS);
break;
case 4: // Press four times for SCROLLOCK
tap_code(KC_SLCK);
break;
default:
break;
}
};
void dance_layer (qk_tap_dance_state_t *state, void *user_data) {
switch (state -> count) {
case 1: // Press once for MENU
tap_code(KC_APP);
break;
case 2: // Press twice for NUMPAD
layer_invert(NUMP);
break;
case 3: // Press thrice for SYMBOLS
layer_invert(SYMB);
break;
case 4: // Press four times for SYMBOLS, SHIFTED
layer_invert(SYSH);
break;
default:
break;
}
};
enum tap_dances {LOCKS = 0, LAYERS = 1};
qk_tap_dance_action_t tap_dance_actions[] = {
[LOCKS] = ACTION_TAP_DANCE_FN(dance_lock),
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
};
// Make layering more clear
#define CC_ESC LCTL_T(KC_ESC)
#define CC_QUOT RCTL_T(KC_QUOT)
#define AC_SLSH LALT_T(KC_SLSH)
#define AC_EQL RALT_T(KC_EQL)
#define FC_BSLS LT(FCTN, KC_BSLS)
#define FC_MINS LT(FCTN, KC_MINS)
#include "nstickney.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -88,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00E6),UC(0x00E8),UC(0x00A9),UC(0x00EA),UC(0x00EB),_______, _______, UC(0x00F1),UC(0x00FD),UC(0x00E7),UC(0x00F4),UC(0x00BF),_______,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
UC(0x00BF),UC(0x00AC),_______, _______, UC(0x00B1),UC(0x00D7)
UC(0x00BF),_______, UC(0x00AC), UC(0x00B1),_______, UC(0x00D7)
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
),
@ -102,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
_______, UC(0x00C6),UC(0x00C8),UC(0x00A2),UC(0x00CA),UC(0x00CB),_______, _______, UC(0x00D1),UC(0x00DD),UC(0x00C7),UC(0x00D4),UC(0x203D),_______,
// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘
UC(0x203D),UC(0x00A6),_______, _______, UC(0x00AA),UC(0x00F7)
UC(0x203D),_______, UC(0x00A6), UC(0x00AA),_______, UC(0x00F7)
// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘
),
@ -138,8 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Initialize rgblight
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
for (int i = 360; i > 0; i--) {
rgblight_sethsv_noeeprom(i, 255, 255);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
layer_state_set_user(layer_state);
uint16_t user_hue = rgblight_get_hue();
for (uint16_t i = 0; i < 256; ++i) {
rgblight_sethsv_noeeprom( (i + user_hue) % 256, 255, 255);
wait_ms(5);
}
layer_state_set_user(layer_state);
};
@ -147,19 +89,11 @@ void keyboard_post_init_user(void) {
// Turn on RGB underglow according to active layer
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case FCTN:
rgblight_sethsv_noeeprom(136, 255, 255);
break;
case NUMP:
rgblight_sethsv_noeeprom(228, 255, 255);
break;
case FCTN: rgblight_sethsv_noeeprom(96, 255, 255); break;
case NUMP: rgblight_sethsv_noeeprom(162, 255, 255); break;
case SYMB:
case SYSH:
rgblight_sethsv_noeeprom(320, 255, 255);
break;
default: // for any other layers, or the default layer
rgblight_sethsv_noeeprom(19, 255, 255);
break;
case SYSH: rgblight_sethsv_noeeprom(227, 255, 255); break;
default: rgblight_sethsv_noeeprom(13, 255, 255); break;
}
return state;
};

View file

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

View file

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

View file

@ -1,2 +0,0 @@
TAP_DANCE_ENABLE=yes
LEADER_ENABLE = yes

View file

@ -0,0 +1,44 @@
#include "nstickney.h"
// Tap Dancing
void dance_layer (qk_tap_dance_state_t *state, void *user_data) {
switch (state -> count) {
case 1: tap_code(KC_APP); break;
case 2: layer_invert(NUMP); break;
case 3: layer_invert(SYMB); break;
case 4: layer_invert(SYSH); break;
default: break;
}
};
void dance_lock_finished (qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1: register_code(KC_LGUI); break;
case 2: register_code(KC_NLCK); break;
case 3: register_code(KC_CAPS); break;
case 4: register_code(KC_SLCK); break;
default: break;
}
};
void dance_lock_reset (qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1: unregister_code(KC_LGUI); break;
case 2: unregister_code(KC_NLCK); break;
case 3: register_code(KC_CAPS); break;
case 4: register_code(KC_SLCK); break;
default: break;
}
};
qk_tap_dance_action_t tap_dance_actions[] = {
[LOCKS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lock_finished, dance_lock_reset),
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
};
void eeconfig_init_user (void) {
set_unicode_input_mode(UC_LNX); // Linux
//set_unicode_input_mode(UC_OSX); // Mac OSX
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
};

View file

@ -0,0 +1,25 @@
#include QMK_KEYBOARD_H
#pragma once
#define USE_SERIAL
#define MASTER_LEFT
#undef UNICODE_SELECTED_MODES
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC
// Layers
#define BASE 0 // Base layer
#define SYMB 1 // Symbols
#define SYSH 2 // Symbols, shifted
#define NUMP 3 // Numpad
#define FCTN 4 // Function
// Make keymaps more clear
#define CC_ESC LCTL_T(KC_ESC)
#define CC_QUOT RCTL_T(KC_QUOT)
#define AC_SLSH LALT_T(KC_SLSH)
#define AC_EQL RALT_T(KC_EQL)
#define FC_BSLS LT(FCTN, KC_BSLS)
#define FC_MINS LT(FCTN, KC_MINS)
enum tap_dances {LOCKS = 0, LAYERS = 1};

4
users/nstickney/rules.mk Normal file
View file

@ -0,0 +1,4 @@
SRC += nstickney.c
TAP_DANCE_ENABLE = yes
UNICODE_ENABLE = yes