From 5abe05147c5b3113327d5d40db0ee12d759c73d3 Mon Sep 17 00:00:00 2001 From: nstickney Date: Sun, 19 Feb 2017 21:25:35 -0600 Subject: familiar layout v0.1 from ErgoDox-EZ configurator --- keyboards/ergodox/keymaps/familiar/keymap.c | 111 ++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 keyboards/ergodox/keymaps/familiar/keymap.c (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c new file mode 100644 index 0000000000..7cd81a87c5 --- /dev/null +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -0,0 +1,111 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + + +#include "keymap_german.h" + +#include "keymap_nordic.h" + + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD, + +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP(KC_ESCAPE,KC_1,KC_2,KC_3,KC_4,KC_5,KC_MINUS,KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_HOME,KC_TAB,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSPO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_END,CTL_T(KC_LGUI),KC_APPLICATION,KC_GRAVE,KC_QUOTE,KC_BSLASH,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_AUDIO_MUTE,ALT_T(KC_SPACE),MO(1),KC_RALT,KC_KP_PLUS,KC_6,KC_7,KC_8,KC_9,KC_0,KC_PSCREEN,KC_PGUP,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSPACE,KC_H,KC_J,KC_K,KC_L,KC_SCOLON,KC_ENTER,KC_PGDOWN,KC_N,KC_M,KC_COMMA,KC_DOT,KC_KP_SLASH,KC_RSPC,KC_LBRACKET,KC_RBRACKET,KC_TRANSPARENT,KC_APPLICATION,CTL_T(KC_RGUI),KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_RALT,MO(1),ALT_T(KC_SPACE)), + + [1] = KEYMAP(M(0),KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F11,KC_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LEFT,KC_DOWN,KC_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_STOP,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_F12,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_INSERT,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(1) +}; + +// leaving this in place for compatibilty with old keymaps cloned and re-compiled. +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + + } + return true; +} + +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + +}; -- cgit v1.2.3 From 474f7ee3fdbbd949f55d68d8f5b2387dcf746e0f Mon Sep 17 00:00:00 2001 From: nstickney Date: Thu, 23 Feb 2017 22:24:32 -0600 Subject: initial layer of familiar layout) --- keyboards/ergodox/keymaps/familiar/keymap.c | 104 ++++++++++++++++++---------- 1 file changed, 67 insertions(+), 37 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index 7cd81a87c5..3688eb1fce 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -3,42 +3,82 @@ #include "action_layer.h" #include "version.h" - -#include "keymap_german.h" - -#include "keymap_nordic.h" - - +#define BASE 0 // default layer +//#define FUNC 1 // function, media, arrow keys +//#define NUMP 2 // numpad +//#define INTL 3 // international symbols enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, VRSN, - RGB_SLD, - + RGB_SLD }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = KEYMAP(KC_ESCAPE,KC_1,KC_2,KC_3,KC_4,KC_5,KC_MINUS,KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_HOME,KC_TAB,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSPO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_END,CTL_T(KC_LGUI),KC_APPLICATION,KC_GRAVE,KC_QUOTE,KC_BSLASH,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_AUDIO_MUTE,ALT_T(KC_SPACE),MO(1),KC_RALT,KC_KP_PLUS,KC_6,KC_7,KC_8,KC_9,KC_0,KC_PSCREEN,KC_PGUP,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSPACE,KC_H,KC_J,KC_K,KC_L,KC_SCOLON,KC_ENTER,KC_PGDOWN,KC_N,KC_M,KC_COMMA,KC_DOT,KC_KP_SLASH,KC_RSPC,KC_LBRACKET,KC_RBRACKET,KC_TRANSPARENT,KC_APPLICATION,CTL_T(KC_RGUI),KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_RALT,MO(1),ALT_T(KC_SPACE)), - - [1] = KEYMAP(M(0),KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F11,KC_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LEFT,KC_DOWN,KC_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_STOP,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_F12,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_INSERT,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT), - +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | SYSREQ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | DEL | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | BKSP | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| + * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | / | )/RSFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LGUI/LCTRL|MENU| ` | ' | CAPS | | [ | ] | \ |MENU|RGUI/RCTRL| + * `------------------------------------' `------------------------------------' + * ,-------------. ,-------------. + * | VOL- | VOL+ | | BRT- | BRT+ | + * ,------|------|------| |------+------+------. + * | ALT/ | | MUTE | | NUM | | ALT/ | + * | SPC | LAY1 |------| |------| LAY1 | SPC | + * | | | LAY3 | | LAY2 | | | + * `--------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, + KC_LCTL, KC_LGUI,KC_GRV, KC_QUOT,KC_CAPS, + KC_VOLD, KC_VOLU, + KC_MUTE, + ALT_T(KC_SPC), MO(BASE), MO(BASE), + // right hand + KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SYSREQ, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LBRC, KC_RBRC, KC_BSLS, KC_RGUI, KC_RCTL, + KC_VOLD, KC_VOLU, + KC_NLCK, + TT(BASE), MO(BASE), ALT_T(KC_SPC) + ), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) + [1] = ACTION_LAYER_TAP_TOGGLE(BASE) // FN1 - Momentary Layer 1 (Function Keys) }; -// leaving this in place for compatibilty with old keymaps cloned and re-compiled. 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) { SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; } return MACRO_NONE; }; @@ -60,15 +100,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case RGB_SLD: if (record->event.pressed) { - rgblight_mode(1); + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif } return false; break; - } return true; } +// 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); @@ -78,33 +126,15 @@ void matrix_scan_user(void) { ergodox_right_led_2_off(); ergodox_right_led_3_off(); switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. case 1: ergodox_right_led_1_on(); break; case 2: ergodox_right_led_2_on(); break; - case 3: - ergodox_right_led_3_on(); - break; - case 4: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case 5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - case 6: - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - case 7: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; default: + // none break; } -- cgit v1.2.3 From ebc6948e969f0785619a4caa6e0a9574388a6dab Mon Sep 17 00:00:00 2001 From: nstickney Date: Fri, 24 Feb 2017 17:11:19 -0600 Subject: first two layers of ErgoDox Familiar completeC --- keyboards/ergodox/keymaps/familiar/keymap.c | 68 +++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index 3688eb1fce..e68e77f79c 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -4,7 +4,7 @@ #include "version.h" #define BASE 0 // default layer -//#define FUNC 1 // function, media, arrow keys +#define ARRW 1 // function, media, arrow keys //#define NUMP 2 // numpad //#define INTL 3 // international symbols @@ -16,53 +16,95 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | SYSREQ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | DEL | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | BKSP | + * | DEL | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | BKSP | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | / | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LGUI/LCTRL|MENU| ` | ' | CAPS | | [ | ] | \ |MENU|RGUI/RCTRL| + * | LCTRL | LGUI | ` | ' |PRTSCR| | [ | ] | \ | RGUI | RCTRL | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. * | VOL- | VOL+ | | BRT- | BRT+ | * ,------|------|------| |------+------+------. - * | ALT/ | | MUTE | | NUM | | ALT/ | + * | ALT/ | | MUTE | | NUMLK| | ALT/ | * | SPC | LAY1 |------| |------| LAY1 | SPC | - * | | | LAY3 | | LAY2 | | | + * | | | LAY3 | |TTLAY2| | | * `--------------------' `--------------------' */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, - KC_LCTL, KC_LGUI,KC_GRV, KC_QUOT,KC_CAPS, - KC_VOLD, KC_VOLU, + KC_LCTL, KC_LGUI,KC_GRV, KC_QUOT,KC_PSCR, + KC_VOLD, KC_VOLU, KC_MUTE, - ALT_T(KC_SPC), MO(BASE), MO(BASE), + ALT_T(KC_SPC), MO(ARRW), TT(BASE), // right hand KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SYSREQ, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LBRC, KC_RBRC, KC_BSLS, KC_RGUI, KC_RCTL, - KC_VOLD, KC_VOLU, + KC_VOLD, KC_VOLU, KC_NLCK, - TT(BASE), MO(BASE), ALT_T(KC_SPC) + TT(BASE), MO(ARRW), ALT_T(KC_SPC) + ), + +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | UP | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `------------------------------------' `------------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[ARRW] = KEYMAP(// layer 1 : functions and arrows + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(BASE) // FN1 - Momentary Layer 1 (Function Keys) + [1] = ACTION_LAYER_TAP_TOGGLE(ARRW) // FN1 - Momentary Layer 1 (Function Keys) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -- cgit v1.2.3 From b69b214d524bb658152c5b2491cb270b8464aeb4 Mon Sep 17 00:00:00 2001 From: nstickney Date: Sat, 25 Feb 2017 22:04:21 -0600 Subject: making numbers more familiar --- keyboards/ergodox/keymaps/familiar/keymap.c | 224 ++++++++++++++++------------ 1 file changed, 131 insertions(+), 93 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index e68e77f79c..e79e961092 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -5,8 +5,10 @@ #define BASE 0 // default layer #define ARRW 1 // function, media, arrow keys -//#define NUMP 2 // numpad -//#define INTL 3 // international symbols +#define NUMP 2 // numpad +#define INTL 3 // international symbols + +#define _______ KC_TRNS // Make the layouts easier to read enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -18,60 +20,60 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -/* Keymap 0: Basic layer +/* layer 0 : default * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | SYSREQ | + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | DEL | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | BKSP | + * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * | INSERT | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | / | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCTRL | LGUI | ` | ' |PRTSCR| | [ | ] | \ | RGUI | RCTRL | + * | LCTRL | LGUI | | ' |PRTSCR| | [ | ] | \ | RGUI | RCTRL | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. * | VOL- | VOL+ | | BRT- | BRT+ | * ,------|------|------| |------+------+------. * | ALT/ | | MUTE | | NUMLK| | ALT/ | * | SPC | LAY1 |------| |------| LAY1 | SPC | - * | | | LAY3 | |TTLAY2| | | + * | | | LAY3 | | LAY2 | | | * `--------------------' `--------------------' */ -[BASE] = KEYMAP( // layer 0 : default +[BASE] = KEYMAP( // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, - KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, - KC_LCTL, KC_LGUI,KC_GRV, KC_QUOT,KC_PSCR, - KC_VOLD, KC_VOLU, - KC_MUTE, - ALT_T(KC_SPC), MO(ARRW), TT(BASE), + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_INS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, + KC_LCTL, KC_LGUI, _______, KC_QUOT, KC_PSCR, + KC_VOLD, KC_VOLU, + KC_MUTE, + ALT_T(KC_SPC), MO(ARRW), TG(INTL), // right hand - KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SYSREQ, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LBRC, KC_RBRC, KC_BSLS, KC_RGUI, KC_RCTL, + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LBRC, KC_RBRC, KC_BSLS, KC_RGUI, KC_RCTL, KC_VOLD, KC_VOLU, KC_NLCK, - TT(BASE), MO(ARRW), ALT_T(KC_SPC) + TG(NUMP), MO(ARRW), ALT_T(KC_SPC) ), -/* Keymap 0: Basic layer +/* layer 1 : functions and arrows * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * | SYSREQ | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PAUSE | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | UP | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | | | + * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | UP | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | | | | | | | | LEFT | DOWN | RIGHT | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -81,83 +83,117 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[ARRW] = KEYMAP(// layer 1 : functions and arrows +[ARRW] = KEYMAP( // left hand - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_SYSREQ, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUSE, + _______, _______, _______, _______, _______, _______, _______, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, KC_UP, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, + _______, _______, + _______, + _______, _______, _______ ), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(ARRW) // FN1 - Momentary Layer 1 (Function Keys) -}; +/* layer 2 : numberpad + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `------------------------------------' `------------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMP] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ + ), -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) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; +/* layer 3: International symbols, etc + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `------------------------------------' `------------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[INTL] = KEYMAP( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ + ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. - case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; - break; - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; - break; - } - return true; -} - // 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) { @@ -168,13 +204,15 @@ void matrix_scan_user(void) { ergodox_right_led_2_off(); ergodox_right_led_3_off(); switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. case 1: ergodox_right_led_1_on(); break; case 2: ergodox_right_led_2_on(); break; + case 3: + ergodox_right_led_3_on(); + break; default: // none break; -- cgit v1.2.3 From 4880e72b77cd934dfc2e9ae4397bd7466ca002e5 Mon Sep 17 00:00:00 2001 From: nstickney Date: Tue, 7 Mar 2017 22:30:43 -0600 Subject: SLASH and WHACK functions added (based on algernon's CT_TA) --- keyboards/ergodox/keymaps/familiar/keymap.c | 146 ++++++++++++++++++++++------ 1 file changed, 114 insertions(+), 32 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index e79e961092..c4ecdee511 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -8,13 +8,14 @@ #define NUMP 2 // numpad #define INTL 3 // international symbols -#define _______ KC_TRNS // Make the layouts easier to read +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - EPRM, - VRSN, - RGB_SLD +// Tap Dance Codes +enum { + SLASH, + WHACK, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -23,51 +24,51 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0 : default * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | INSERT | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * | NOOP | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| - * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | / | )/RSFT | + * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCTRL | LGUI | | ' |PRTSCR| | [ | ] | \ | RGUI | RCTRL | + * | LCTRL | LGUI | MENU | ' | NOOP | | [ | ] | LEFT | DOWN | RIGHT | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * | VOL- | VOL+ | | BRT- | BRT+ | + * |PRTSCR| ESC | | VOL- | VOL+ | * ,------|------|------| |------+------+------. - * | ALT/ | | MUTE | | NUMLK| | ALT/ | - * | SPC | LAY1 |------| |------| LAY1 | SPC | + * | ALT/ | | NUMLK| | MUTE | | ALT/ | + * | SPC | SLASH|------| |------|WHACK | SPC | * | | | LAY3 | | LAY2 | | | * `--------------------' `--------------------' */ [BASE] = KEYMAP( // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_INS, KC_A, KC_S, KC_D, KC_F, KC_G, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, - KC_LCTL, KC_LGUI, _______, KC_QUOT, KC_PSCR, - KC_VOLD, KC_VOLU, - KC_MUTE, - ALT_T(KC_SPC), MO(ARRW), TG(INTL), + KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, XXXXXXX, + KC_INS, KC_ESC, + KC_NLCK, + ALT_T(KC_SPC), TD(SLASH), TG(INTL), // right hand KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LBRC, KC_RBRC, KC_BSLS, KC_RGUI, KC_RCTL, + KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC, + KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_VOLU, - KC_NLCK, - TG(NUMP), MO(ARRW), ALT_T(KC_SPC) + KC_MUTE, + TG(NUMP), TD(WHACK), ALT_T(KC_SPC) ), /* layer 1 : functions and arrows * * ,--------------------------------------------------. ,--------------------------------------------------. - * | SYSREQ | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PAUSE | + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | UP | | | | | | | | | | | | + * | | | | UP | | | | | | | | | | | INSERT | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -76,26 +77,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | LEFT | DOWN | RIGHT | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * | | | | | | + * |SYSREQ| PAUSE| | | | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | SCRLK| | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ [ARRW] = KEYMAP( // left hand - KC_SYSREQ, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, - _______, + KC_SYSREQ, KC_PAUSE, + KC_SLCK, _______, _______, _______, // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUSE, - _______, _______, _______, _______, _______, _______, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, @@ -189,6 +190,87 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +// See https://github.com/algernon/ergodox-layout/blob/master/keymap.c +// When holding the SLASH or WHACK key, the ARRW layer activates while the key is held. +// Tapping the key produces the / or \ key. Double-tapping it toggles the ARRW layer +// on until a third tap. + +typedef struct { + bool layer_toggle; + bool sticky; +} td_ta_state_t; + +static void ang_tap_dance_s_finished (qk_tap_dance_state_t *state, void *user_data) { + td_ta_state_t *td_ta = (td_ta_state_t *) user_data; + + if (td_ta->sticky) { + td_ta->sticky = false; + td_ta->layer_toggle = false; + layer_off (ARRW); + return; + } + + if (state->count == 1 && !state->pressed) { + register_code (KC_SLSH); + td_ta->sticky = false; + td_ta->layer_toggle = false; + } else { + td_ta->layer_toggle = true; + layer_on (ARRW); + td_ta->sticky = (state->count == 2); + } +} + +static void ang_tap_dance_s_reset (qk_tap_dance_state_t *state, void *user_data) { + td_ta_state_t *td_ta = (td_ta_state_t *) user_data; + + if (!td_ta->layer_toggle) + unregister_code (KC_SLSH); + if (!td_ta->sticky) + layer_off (ARRW); +} + +static void ang_tap_dance_w_finished (qk_tap_dance_state_t *state, void *user_data) { + td_ta_state_t *td_ta = (td_ta_state_t *) user_data; + + if (td_ta->sticky) { + td_ta->sticky = false; + td_ta->layer_toggle = false; + layer_off (ARRW); + return; + } + + if (state->count == 1 && !state->pressed) { + register_code (KC_BSLS); + td_ta->sticky = false; + td_ta->layer_toggle = false; + } else { + td_ta->layer_toggle = true; + layer_on (ARRW); + td_ta->sticky = (state->count == 2); + } +} + +static void ang_tap_dance_w_reset (qk_tap_dance_state_t *state, void *user_data) { + td_ta_state_t *td_ta = (td_ta_state_t *) user_data; + + if (!td_ta->layer_toggle) + unregister_code (KC_BSLS); + if (!td_ta->sticky) + layer_off (ARRW); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [SLASH] = { + .fn = { NULL, ang_tap_dance_s_finished, ang_tap_dance_s_reset }, + .user_data = (void *)&((td_ta_state_t) { false, false }) + }, + [WHACK] = { + .fn = { NULL, ang_tap_dance_w_finished, ang_tap_dance_w_reset }, + .user_data = (void *)&((td_ta_state_t) { false, false }) + } +}; + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3 From fa44e8d4dca234847548656f4f38bce14bf33b31 Mon Sep 17 00:00:00 2001 From: nstickney Date: Wed, 8 Mar 2017 16:26:45 -0600 Subject: corralled image files --- keyboards/ergodox/keymaps/familiar/keymap.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index c4ecdee511..46069b0dbc 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -37,9 +37,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * |PRTSCR| ESC | | VOL- | VOL+ | * ,------|------|------| |------+------+------. - * | ALT/ | | NUMLK| | MUTE | | ALT/ | - * | SPC | SLASH|------| |------|WHACK | SPC | - * | | | LAY3 | | LAY2 | | | + * | ALT/ |SLASH/| NUMLK| | MUTE |WHACK/| ALT/ | + * | SPC |MO(1)/|------| |------|MO(1)/| SPC | + * | |TG(1) | LAY3 | | LAY2 |TG(1) | | * `--------------------' `--------------------' */ [BASE] = KEYMAP( @@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | UP | | + * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | LEFT | DOWN | RIGHT | + * | | | | | | | | | HOME | PGDN | END | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. * |SYSREQ| PAUSE| | | | @@ -98,8 +98,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, KC_UP, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, + _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, _______, _______ @@ -200,7 +200,7 @@ typedef struct { bool sticky; } td_ta_state_t; -static void ang_tap_dance_s_finished (qk_tap_dance_state_t *state, void *user_data) { +static void slash_finished (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; if (td_ta->sticky) { @@ -221,7 +221,7 @@ static void ang_tap_dance_s_finished (qk_tap_dance_state_t *state, void *user_da } } -static void ang_tap_dance_s_reset (qk_tap_dance_state_t *state, void *user_data) { +static void slash_reset (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; if (!td_ta->layer_toggle) @@ -230,7 +230,7 @@ static void ang_tap_dance_s_reset (qk_tap_dance_state_t *state, void *user_data) layer_off (ARRW); } -static void ang_tap_dance_w_finished (qk_tap_dance_state_t *state, void *user_data) { +static void whack_finished (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; if (td_ta->sticky) { @@ -251,7 +251,7 @@ static void ang_tap_dance_w_finished (qk_tap_dance_state_t *state, void *user_da } } -static void ang_tap_dance_w_reset (qk_tap_dance_state_t *state, void *user_data) { +static void whack_reset (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; if (!td_ta->layer_toggle) @@ -262,11 +262,11 @@ static void ang_tap_dance_w_reset (qk_tap_dance_state_t *state, void *user_data) qk_tap_dance_action_t tap_dance_actions[] = { [SLASH] = { - .fn = { NULL, ang_tap_dance_s_finished, ang_tap_dance_s_reset }, + .fn = { NULL, slash_finished, slash_reset }, .user_data = (void *)&((td_ta_state_t) { false, false }) }, [WHACK] = { - .fn = { NULL, ang_tap_dance_w_finished, ang_tap_dance_w_reset }, + .fn = { NULL, whack_finished, whack_reset }, .user_data = (void *)&((td_ta_state_t) { false, false }) } }; -- cgit v1.2.3 From 82cbe71bb52403f0c9cd23925c10cfdc97021919 Mon Sep 17 00:00:00 2001 From: nstickney Date: Wed, 8 Mar 2017 22:28:18 -0600 Subject: found LT(layer, kc) so I could take out TapDance code --- keyboards/ergodox/keymaps/familiar/keymap.c | 127 +++++----------------------- 1 file changed, 20 insertions(+), 107 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index 46069b0dbc..34c48d5f34 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -12,12 +12,6 @@ #define _______ KC_TRNS #define XXXXXXX KC_NO -// Tap Dance Codes -enum { - SLASH, - WHACK, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* @@ -28,30 +22,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | NOOP | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * | CLEAR | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCTRL | LGUI | MENU | ' | NOOP | | [ | ] | LEFT | DOWN | RIGHT | + * | LCTRL | LGUI | MENU | ' | " | | [ | ] | LEFT | DOWN | RIGHT | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. * |PRTSCR| ESC | | VOL- | VOL+ | * ,------|------|------| |------+------+------. * | ALT/ |SLASH/| NUMLK| | MUTE |WHACK/| ALT/ | - * | SPC |MO(1)/|------| |------|MO(1)/| SPC | - * | |TG(1) | LAY3 | | LAY2 |TG(1) | | + * | SPC | MO(1)|------| |------|MO(1) | SPC | + * | | | LAY3 | | LAY2 | | | * `--------------------' `--------------------' */ [BASE] = KEYMAP( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_CLEAR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, - KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, XXXXXXX, + KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, S(KC_QUOT), KC_INS, KC_ESC, KC_NLCK, - ALT_T(KC_SPC), TD(SLASH), TG(INTL), + ALT_T(KC_SPC), LT(ARRW,KC_SLSH), TG(INTL), // right hand KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, @@ -60,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_VOLU, KC_MUTE, - TG(NUMP), TD(WHACK), ALT_T(KC_SPC) + TG(NUMP), LT(ARRW,KC_BSLS), ALT_T(KC_SPC) ), /* layer 1 : functions and arrows @@ -70,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | UP | | | | | | | | | | | INSERT | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | + * |CAPSLOCK| | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -88,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_UP, _______, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSREQ, KC_PAUSE, @@ -108,15 +102,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 2 : numberpad * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | ( | ) | ÷ | × | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | 7 | 8 | 9 | - | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | + * | | | | | | |------| |------| | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | 1 | 2 | 3 | = | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | | | | | | 0 | . | , | ENTER| | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -137,11 +131,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, + _______, _______, S(KC_9), S(KC_0), KC_PSLS, KC_PAST, _______, + _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, + _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, _______, + KC_KP_0, KC_KP_DOT, KC_PCMM, KC_PENT, _______, _______, _______, _______, _______, _______, _______ @@ -190,87 +184,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -// See https://github.com/algernon/ergodox-layout/blob/master/keymap.c -// When holding the SLASH or WHACK key, the ARRW layer activates while the key is held. -// Tapping the key produces the / or \ key. Double-tapping it toggles the ARRW layer -// on until a third tap. - -typedef struct { - bool layer_toggle; - bool sticky; -} td_ta_state_t; - -static void slash_finished (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (td_ta->sticky) { - td_ta->sticky = false; - td_ta->layer_toggle = false; - layer_off (ARRW); - return; - } - - if (state->count == 1 && !state->pressed) { - register_code (KC_SLSH); - td_ta->sticky = false; - td_ta->layer_toggle = false; - } else { - td_ta->layer_toggle = true; - layer_on (ARRW); - td_ta->sticky = (state->count == 2); - } -} - -static void slash_reset (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (!td_ta->layer_toggle) - unregister_code (KC_SLSH); - if (!td_ta->sticky) - layer_off (ARRW); -} - -static void whack_finished (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (td_ta->sticky) { - td_ta->sticky = false; - td_ta->layer_toggle = false; - layer_off (ARRW); - return; - } - - if (state->count == 1 && !state->pressed) { - register_code (KC_BSLS); - td_ta->sticky = false; - td_ta->layer_toggle = false; - } else { - td_ta->layer_toggle = true; - layer_on (ARRW); - td_ta->sticky = (state->count == 2); - } -} - -static void whack_reset (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (!td_ta->layer_toggle) - unregister_code (KC_BSLS); - if (!td_ta->sticky) - layer_off (ARRW); -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [SLASH] = { - .fn = { NULL, slash_finished, slash_reset }, - .user_data = (void *)&((td_ta_state_t) { false, false }) - }, - [WHACK] = { - .fn = { NULL, whack_finished, whack_reset }, - .user_data = (void *)&((td_ta_state_t) { false, false }) - } -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3 From 9895e376e76ed528d042e6892a529ec448fea736 Mon Sep 17 00:00:00 2001 From: nstickney Date: Sun, 12 Mar 2017 14:51:33 -0500 Subject: added US-International support --- keyboards/ergodox/keymaps/familiar/keymap.c | 156 ++++++++++++++++++---------- 1 file changed, 103 insertions(+), 53 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index 34c48d5f34..08640b9fc4 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -3,10 +3,12 @@ #include "action_layer.h" #include "version.h" +// Layers #define BASE 0 // default layer -#define ARRW 1 // function, media, arrow keys -#define NUMP 2 // numpad -#define INTL 3 // international symbols +#define INTL 1 // international symbols +#define INSF 2 // international symbols shifted +#define NUMP 3 // numpad +#define ARRW 4 // function, media, arrow keys // Fillers to make layering more clear #define _______ KC_TRNS @@ -22,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CLEAR | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * | MO(3) | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -40,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_CLEAR, KC_A, KC_S, KC_D, KC_F, KC_G, + MO(INTL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, S(KC_QUOT), - KC_INS, KC_ESC, + KC_PSCR, KC_ESC, KC_NLCK, ALT_T(KC_SPC), LT(ARRW,KC_SLSH), TG(INTL), // right hand @@ -57,52 +59,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(NUMP), LT(ARRW,KC_BSLS), ALT_T(KC_SPC) ), -/* layer 1 : functions and arrows +/* layer 1: International symbols, etc * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * | ´ | ¡ | ² | ³ | ¤ | € | ¼ | | ½ | ¾ | ‘ | ’ | ¥ | × | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | UP | | | | | | | | | | | INSERT | + * | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * |CAPSLOCK| | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | + * | | á | ß | ð | | |------| |------| | | | Ø | ° | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | | + * |MO(INSF)| æ | | © | | | | | | ñ | µ | ç | | |MO(INSF)| * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | HOME | PGDN | END | + * | | | | ¬ | ¿ | | « | » | | | | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * |SYSREQ| PAUSE| | | | + * | | | | | | * ,------|------|------| |------+------+------. - * | | | SCRLK| | | | | + * | | | | | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ -[ARRW] = KEYMAP( +[INTL] = KEYMAP( // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - _______, _______, _______, KC_UP, _______, _______, _______, - KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - KC_SYSREQ, KC_PAUSE, - KC_SLCK, + UC(0x00B4), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC), + _______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______, + _______, UC(0x00E1), UC(0x00DF), UC(0x00F0), _______, _______, + MO(INSF), UC(0x00E6), _______, UC(0x00A9), _______, _______, _______, + _______, _______, _______, UC(0x00AC), UC(0x00BF), + _______, _______, + _______, + _______, _______, _______, + // right hand + UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______, + _______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______, + _______, _______, _______, UC(0x00D8), UC(0x00B0), _______, + _______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(INSF), + UC(0x00AB), UC(0x00BB), _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ + ), + +/* layer 2 : international symbols, shifted + * This layer is an ugly workaround; it pretends that SHIFT still works normally on keys + * which don't produce an "upper case" or "shifted" international symobol. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ¨ | ¹ | | | £ | | | | | | | | | ÷ | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Á | § | Ð | | |------| |------| | | | Ø | ° | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Æ | | ¢ | | | | | | Ñ | | Ç | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | ¦ | | | | | | | | + * `------------------------------------' `------------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[INSF] = KEYMAP( + // left hand + UC(0x00A8), UC(0x00B9), S(KC_2), S(KC_3), UC(0x00A3), UC(0x2014), S(KC_6), + _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______, + _______, UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G), + _______, UC(0x00C6), S(KC_X), UC(0x00A2), S(KC_V), S(KC_B), _______, + _______, _______, _______, UC(0x00A6), _______, + _______, _______, + _______, _______, _______, _______, // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, KC_INS, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, KC_HOME, KC_PGDN, KC_END, + S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), UC(0x00F7), _______, + _______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______, + S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______, + _______, UC(0x00D1), S(KC_M), UC(0x00C7), S(KC_DOT), _______, _______, + S(KC_LBRC), S(KC_RBRC), _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -/* layer 2 : numberpad +/* layer 3: numberpad * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | ( | ) | ÷ | × | | + * | | | | | | | | | | | ( | ) | / | * | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | | | | | | | | 7 | 8 | 9 | - | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -141,43 +187,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ), -/* layer 3: International symbols, etc +/* layer 4 : functions and arrows * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | | | UP | | | | | | | | | | | INSERT | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | + * |CAPSLOCK| | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | | | | | | | | HOME | PGDN | END | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * | | | | | | + * |SYSREQ| PAUSE| | | | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | SCRLK| | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ -[INTL] = KEYMAP( +[ARRW] = KEYMAP( // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, KC_UP, _______, _______, _______, + KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, + KC_SYSREQ, KC_PAUSE, + KC_SLCK, + _______, _______, _______, // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, KC_INS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, _______, _______ @@ -186,7 +232,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs just one time when the keyboard initializes. void matrix_init_user(void) { - + set_unicode_input_mode(UC_LNX); // Linux + //set_unicode_input_mode(UC_OSX); // Mac OSX + //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) + //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) }; // Runs constantly in the background, in a loop. @@ -199,13 +248,14 @@ void matrix_scan_user(void) { ergodox_right_led_2_off(); ergodox_right_led_3_off(); switch (layer) { - case 1: + case INTL: + case INSF: ergodox_right_led_1_on(); break; - case 2: + case NUMP: ergodox_right_led_2_on(); break; - case 3: + case ARRW: ergodox_right_led_3_on(); break; default: -- cgit v1.2.3 From a03d946d0c4edf0c3e50812af7f3c826b958c945 Mon Sep 17 00:00:00 2001 From: Stick Date: Mon, 27 Mar 2017 21:18:12 -0500 Subject: fixed unicode input issue --- keyboards/ergodox/keymaps/familiar/keymap.c | 35 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index 08640b9fc4..153d73040c 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -20,29 +20,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0 : default * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | + * | ` | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | MO(3) | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | LCTRL | LGUI | MENU | ' | " | | [ | ] | LEFT | DOWN | RIGHT | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * |PRTSCR| ESC | | VOL- | VOL+ | + * | VOL- | VOL+ | | VOL- | VOL+ | * ,------|------|------| |------+------+------. - * | ALT/ |SLASH/| NUMLK| | MUTE |WHACK/| ALT/ | - * | SPC | MO(1)|------| |------|MO(1) | SPC | + * | SPC/ |SLASH/| MUTE | |NUMLCK|WHACK/| SPC/ | + * | ALT | MO(1)|------| |------|MO(1) | ALT | * | | | LAY3 | | LAY2 | | | * `--------------------' `--------------------' */ [BASE] = KEYMAP( // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - MO(INTL), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, S(KC_QUOT), KC_PSCR, KC_ESC, @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | á | ß | ð | | |------| |------| | | | Ø | ° | | + * | | á | ß | ð | | |------| |------| | | | ø | ¶ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |MO(INSF)| æ | | © | | | | | | ñ | µ | ç | | |MO(INSF)| * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______, _______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______, - _______, _______, _______, UC(0x00D8), UC(0x00B0), _______, + _______, _______, _______, UC(0x00F8), UC(0x00B6), _______, _______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(INSF), UC(0x00AB), UC(0x00BB), _______, _______, _______, _______, _______, @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * which don't produce an "upper case" or "shifted" international symobol. * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ¨ | ¹ | | | £ | | | | | | | | | ÷ | | + * | ¨ | ¹ | | | £ | | | | | | | | — | ÷ | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -126,8 +126,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [INSF] = KEYMAP( // left hand - UC(0x00A8), UC(0x00B9), S(KC_2), S(KC_3), UC(0x00A3), UC(0x2014), S(KC_6), - _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______, + UC(0x00A8), UC(0x00B9), _______, _______, UC(0x00A3), _______, _______, + _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), _______, UC(0x00DE), _______, _______, UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G), _______, UC(0x00C6), S(KC_X), UC(0x00A2), S(KC_V), S(KC_B), _______, _______, _______, _______, UC(0x00A6), _______, @@ -135,11 +135,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, // right hand - S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), UC(0x00F7), _______, + _______, _______, _______, _______, UC(0x2014), UC(0x00F7), _______, _______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______, S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______, - _______, UC(0x00D1), S(KC_M), UC(0x00C7), S(KC_DOT), _______, _______, - S(KC_LBRC), S(KC_RBRC), _______, _______, _______, + _______, UC(0x00D1), _______, UC(0x00C7), S(KC_DOT), _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -188,6 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* layer 4 : functions and arrows + * This layer is at the top so that the functions still work no matter what layers are active. * * ,--------------------------------------------------. ,--------------------------------------------------. * | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | -- cgit v1.2.3 From b6280d0cac59c741db62a63072efd5de4887fc01 Mon Sep 17 00:00:00 2001 From: Stick Date: Mon, 27 Mar 2017 21:56:47 -0500 Subject: unsatisfied with ESC/GRV/TAB positioning --- keyboards/ergodox/keymaps/familiar/keymap.c | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'keyboards/ergodox/keymaps/familiar/keymap.c') diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/keyboards/ergodox/keymaps/familiar/keymap.c index 153d73040c..c5f94afda8 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/keyboards/ergodox/keymaps/familiar/keymap.c @@ -22,16 +22,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | ` | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | + * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | + * | ` | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | LCTRL | LGUI | MENU | ' | " | | [ | ] | LEFT | DOWN | RIGHT | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * | VOL- | VOL+ | | VOL- | VOL+ | + * | VOL- | VOL+ | | | | * ,------|------|------| |------+------+------. * | SPC/ |SLASH/| MUTE | |NUMLCK|WHACK/| SPC/ | * | ALT | MO(1)|------| |------|MO(1) | ALT | @@ -41,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, S(KC_QUOT), - KC_PSCR, KC_ESC, - KC_NLCK, + KC_VOLD, KC_VOLU, + KC_MUTE, ALT_T(KC_SPC), LT(ARRW,KC_SLSH), TG(INTL), // right hand KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, @@ -54,8 +54,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT, - KC_VOLD, KC_VOLU, - KC_MUTE, + _______, _______, + KC_NLCK, TG(NUMP), LT(ARRW,KC_BSLS), ALT_T(KC_SPC) ), @@ -191,7 +191,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * This layer is at the top so that the functions still work no matter what layers are active. * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | SYSREQ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | UP | | | | | | | | | | | INSERT | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -202,9 +202,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | HOME | PGDN | END | * `------------------------------------' `------------------------------------' * ,-------------. ,-------------. - * |SYSREQ| PAUSE| | | | + * | | PAUSE| | | | * ,------|------|------| |------+------+------. - * | | | SCRLK| | | | | + * | | | | |SCRLK | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' @@ -216,17 +216,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_SYSREQ, KC_PAUSE, - KC_SLCK, + _______, KC_PAUSE, + _______, _______, _______, _______, // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SYSREQ, _______, _______, _______, _______, _______, _______, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, - _______, + KC_SLCK, _______, _______, _______ ), }; -- cgit v1.2.3