From 6d40f7c5060f608068b0c4fc90871687c70b4f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Bo=CC=88sebeck?= Date: Sun, 17 Apr 2016 22:19:47 +0200 Subject: added new experimental layout - works with ErgodoxLayoutGenerator --- .../keymaps/osx_de_experimental/keymap.c | 376 +++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c (limited to 'keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c new file mode 100644 index 0000000000..dbc3eb9909 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c @@ -0,0 +1,376 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_extras/keymap_french.h" +#include "keymap_extras/keymap_neo2.h" +#include "keymap_extras/keymap_uk.h" +#include "keymap_extras/keymap_colemak.h" +#include "keymap_extras/keymap_french_osx.h" +#include "keymap_extras/keymap_nordic.h" +#include "keymap_extras/keymap_dvorak.h" +#include "keymap_extras/keymap_german.h" +#include "keymap_extras/keymap_norwegian.c" +#include "keymap_extras/keymap_fr_ch.h" +#include "keymap_extras/keymap_german_osx.h" +#include "keymap_extras/keymap_spanish.h" +#include "keymap_extras/keymap_bepo.h" + +#define BASE 0 +#define SYMB 1 +#define MDIA 2 +#define SMLY 3 +#define NUMB 4 +#define EGOS 5 + +#define M_TOGGLE_5 0 +#define M_CTRL_CMDC 1 +#define M_DE_OSX_PLUS_CTRLALT 2 +#define SM_KISS 3 +#define SM_FROWN 4 +#define SM_CRY 5 +#define SM_SMILE 6 +#define SM_SMIRK 7 +#define M_LGUI_SHFT 8 +#define SM_HEART 9 +#define SM_LAUGH 10 +#define M_CTL_SFT_HASH 11 +#define SM_SAD 12 +#define M_DE_OSX_CIRC_CTRLCMD 13 +#define M_CTRL_CMDV 14 +#define M_MEH_SH_ACUT 15 + +//Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE]=KEYMAP( +//left half + KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, TG(NUMB), + KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, + KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, + KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, + LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), M(M_CTL_SFT_HASH), KC_LCTRL, + KC_HOME, KC_END, + KC_PGUP, + KC_BSPC, KC_DEL, KC_PGDN, + //right half + TG(MDIA), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS, + KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE, + DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE), + KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT, + M(M_MEH_SH_ACUT), ALL_T(DE_OSX_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS), + KC_LEFT, KC_RIGHT, + KC_UP, + KC_DOWN, KC_ENT, KC_SPC), +[SYMB]=KEYMAP( +//left half + KC_APPLICATION, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F5, + KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS, + KC_TRNS, DE_OSX_HASH, DE_OSX_DLR, DE_OSX_BSLS, DE_OSX_SLSH, KC_DOT, + KC_TRNS, KC_TRNS, DE_OSX_LESS, DE_OSX_PERC, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_DEL, KC_TRNS, + //right half + KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, DE_OSX_BSLS, DE_OSX_LBRC, DE_OSX_RBRC, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, + DE_OSX_SLSH, DE_OSX_LPRN, DE_OSX_RPRN, DE_OSX_LCBR, DE_OSX_RCBR, DE_OSX_HASH, + KC_TRNS, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + DE_OSX_QUOT, DE_OSX_DQOT, KC_TRNS, M(M_TOGGLE_5), KC_TRNS, + KC_F13, KC_F12, + KC_F14, + KC_F15, KC_TRNS, KC_TRNS), +[MDIA]=KEYMAP( +//left half + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + KC_TRNS, KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_BTN3, 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 half + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_TRNS, KC_MPRV, KC_MNXT, KC_UP, KC_TRNS, + KC_MUTE, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK), +[SMLY]=KEYMAP( +//left half + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + //right half + M(SM_SMILE), M(SM_SMIRK), M(SM_LAUGH), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(SM_FROWN), M(SM_SAD), M(SM_CRY), KC_TRNS, KC_TRNS, KC_TRNS, + M(SM_HEART), M(SM_KISS), 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), +[NUMB]=KEYMAP( +//left half + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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 half + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, DE_OSX_SLSH, KC_7, KC_8, KC_9, DE_OSX_ASTR, KC_F12, + DE_OSX_SLSH, KC_4, KC_5, KC_6, DE_OSX_PLUS, DE_OSX_MINS, + KC_TRNS, DE_OSX_PERC, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_0, KC_DOT, KC_COMM, DE_OSX_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS), +[EGOS]=KEYMAP( +//left half + 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_LSFT, 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_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_F1, KC_F2, + KC_F3, + KC_SPC, KC_LCTL, KC_F4, + //right half + 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, M(M_TOGGLE_5), KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ +static uint16_t start; +switch(id) { +case M_TOGGLE_5: +//Macro: M_TOGGLE_5//----------------------- + if (record->event.pressed){ + layer_state ^= (1<<5); + layer_state &= (1<<5); + } + +break; +case M_CTRL_CMDC: +//Macro: M_CTRL_CMDC//----------------------- +if (record->event.pressed) { + start = timer_read(); + return MACRO(D(LCTRL),END); + } else { + if (timer_elapsed(start) >150) { + return MACRO(U(LCTRL),END); + } else { + return MACRO(U(LCTRL),D(LGUI),T(C),U(LGUI),END); + } + } + +break; +case M_DE_OSX_PLUS_CTRLALT: +//Macro: M_DE_OSX_PLUS_CTRLALT//----------------------- +if (record->event.pressed) { + start = timer_read(); + return MACRO(D(LCTRL),D(LALT),END); + } else { + if (timer_elapsed(start) >150) { + return MACRO(U(LCTRL),U(LALT),END); + } else { + return MACRO(U(LCTRL),U(LALT),T(RBRC),END); + } + } + +break; +case SM_KISS: +//Macro: SM_KISS//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(RBRC),U(LSFT),END); + } + +break; +case SM_FROWN: +//Macro: SM_FROWN//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LALT),T(8),U(LALT),END); + } + +break; +case SM_CRY: +//Macro: SM_CRY//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(COMM),U(LSFT),T(SLSH),D(LSFT),T(8),U(LSFT),END); + } + +break; +case SM_SMILE: +//Macro: SM_SMILE//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(9),U(LSFT),END); + } + +break; +case SM_SMIRK: +//Macro: SM_SMIRK//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(COMM),U(LSFT),T(SLSH),D(LSFT),T(9),U(LSFT),END); + } + +break; +case M_LGUI_SHFT: +//Macro: M_LGUI_SHFT//----------------------- +if (record->event.pressed){ + return MACRO(D(LGUI),D(LSFT),END); + }else{ + return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); + } + +break; +case SM_HEART: +//Macro: SM_HEART//----------------------- +if (record->event.pressed) { + return MACRO(T(GRV),T(3),END); + } + +break; +case SM_LAUGH: +//Macro: SM_LAUGH//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(D),U(LSFT),END); + } + +break; +case M_CTL_SFT_HASH: +//Macro: M_CTL_SFT_HASH//----------------------- +if (record->event.pressed) { + start = timer_read(); + return MACRO(D(LCTRL),D(LSFT),END); + } else { + if (timer_elapsed(start) >150) { + return MACRO(U(LCTRL),U(LSFT),END); + } else { + return MACRO(U(LCTRL),U(LSFT),T(BSLS),END); + } + } + +break; +case SM_SAD: +//Macro: SM_SAD//----------------------- +if (record->event.pressed) { + return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(8),U(LSFT),END); + } + +break; +case M_DE_OSX_CIRC_CTRLCMD: +//Macro: M_DE_OSX_CIRC_CTRLCMD//----------------------- +if (record->event.pressed) { + start = timer_read(); + return MACRO(D(LCTRL),D(LGUI),END); + } else { + if (timer_elapsed(start) >150) { + return MACRO(U(LCTRL),U(LGUI),END); + } else { + return MACRO(U(LCTRL),U(LGUI),T(NUBS),END); + } + } + +break; +case M_CTRL_CMDV: +//Macro: M_CTRL_CMDV//----------------------- +if (record->event.pressed) { + start = timer_read(); + return MACRO(D(LCTRL),END); + } else { + if (timer_elapsed(start) >150) { + return MACRO(U(LCTRL),END); + } else { + return MACRO(U(LCTRL),D(LGUI),T(V),U(LGUI),END); + } + } + +break; +case M_MEH_SH_ACUT: +//Macro: M_MEH_SH_ACUT//----------------------- +if (record->event.pressed) { + start = timer_read(); + return MACRO(D(LCTRL),D(LSFT),D(LALT),END); + } else { + if (timer_elapsed(start) >150) { + return MACRO(U(LCTRL),U(LSFT),U(LALT),END); + } else { + return MACRO(U(LCTRL),U(LALT),T(EQL),U(LSFT),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) { + + case SYMB: + ergodox_right_led_1_on(); + + + break; + case MDIA: + + ergodox_right_led_2_on(); + + break; + case SMLY: + + + ergodox_right_led_3_on(); + break; + case NUMB: + ergodox_right_led_1_on(); + + ergodox_right_led_3_on(); + break; + case EGOS: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; +default: +// none +break; +} + +}; + -- cgit v1.2.3 From a9d8c61dbdb3c6d171f73138047d9314f7e368e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Bo=CC=88sebeck?= Date: Sun, 17 Apr 2016 23:02:29 +0200 Subject: new iteration, change of lower row --- .../keymaps/osx_de_experimental/keymap.c | 62 ++++++---------------- 1 file changed, 16 insertions(+), 46 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c index dbc3eb9909..7c40a4f3c7 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c +++ b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c @@ -23,21 +23,19 @@ #define EGOS 5 #define M_TOGGLE_5 0 -#define M_CTRL_CMDC 1 -#define M_DE_OSX_PLUS_CTRLALT 2 -#define SM_KISS 3 -#define SM_FROWN 4 -#define SM_CRY 5 -#define SM_SMILE 6 -#define SM_SMIRK 7 -#define M_LGUI_SHFT 8 -#define SM_HEART 9 -#define SM_LAUGH 10 -#define M_CTL_SFT_HASH 11 -#define SM_SAD 12 -#define M_DE_OSX_CIRC_CTRLCMD 13 -#define M_CTRL_CMDV 14 -#define M_MEH_SH_ACUT 15 +#define M_DE_OSX_PLUS_CTRLALT 1 +#define SM_KISS 2 +#define SM_FROWN 3 +#define SM_CRY 4 +#define SM_SMILE 5 +#define SM_SMIRK 6 +#define M_LGUI_SHFT 7 +#define SM_HEART 8 +#define SM_LAUGH 9 +#define M_CTL_SFT_HASH 10 +#define SM_SAD 11 +#define M_DE_OSX_CIRC_CTRLCMD 12 +#define M_MEH_SH_ACUT 13 //Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -47,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, - LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), M(M_CTL_SFT_HASH), KC_LCTRL, + LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), DE_OSX_QUOT, KC_HOME, KC_END, KC_PGUP, KC_BSPC, KC_DEL, KC_PGDN, @@ -56,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE, DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE), KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT, - M(M_MEH_SH_ACUT), ALL_T(DE_OSX_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS), + MEH_T(DE_OSX_HASH), ALL_T(DE_OSX_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS), KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_ENT, KC_SPC), @@ -172,20 +170,6 @@ case M_TOGGLE_5: layer_state &= (1<<5); } -break; -case M_CTRL_CMDC: -//Macro: M_CTRL_CMDC//----------------------- -if (record->event.pressed) { - start = timer_read(); - return MACRO(D(LCTRL),END); - } else { - if (timer_elapsed(start) >150) { - return MACRO(U(LCTRL),END); - } else { - return MACRO(U(LCTRL),D(LGUI),T(C),U(LGUI),END); - } - } - break; case M_DE_OSX_PLUS_CTRLALT: //Macro: M_DE_OSX_PLUS_CTRLALT//----------------------- @@ -241,7 +225,7 @@ case M_LGUI_SHFT: if (record->event.pressed){ return MACRO(D(LGUI),D(LSFT),END); }else{ - return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); + return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); } break; @@ -293,20 +277,6 @@ if (record->event.pressed) { } } -break; -case M_CTRL_CMDV: -//Macro: M_CTRL_CMDV//----------------------- -if (record->event.pressed) { - start = timer_read(); - return MACRO(D(LCTRL),END); - } else { - if (timer_elapsed(start) >150) { - return MACRO(U(LCTRL),END); - } else { - return MACRO(U(LCTRL),D(LGUI),T(V),U(LGUI),END); - } - } - break; case M_MEH_SH_ACUT: //Macro: M_MEH_SH_ACUT//----------------------- -- cgit v1.2.3 From 42fad96be5120c0617febbb6aef18ebdca6fa60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Bo=CC=88sebeck?= Date: Mon, 18 Apr 2016 08:27:58 +0200 Subject: added smly layer again --- keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c index 7c40a4f3c7..5b8fd28a71 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c +++ b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, - LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), DE_OSX_QUOT, + LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), LT(SMLY,DE_OSX_QUOT), KC_HOME, KC_END, KC_PGUP, KC_BSPC, KC_DEL, KC_PGDN, @@ -225,7 +225,7 @@ case M_LGUI_SHFT: if (record->event.pressed){ return MACRO(D(LGUI),D(LSFT),END); }else{ - return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); + return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); } break; -- cgit v1.2.3 From 0fbc52809e674633cc053979e435b6305bc243aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Bo=CC=88sebeck?= Date: Tue, 19 Apr 2016 07:50:29 +0200 Subject: new experimental layout --- .../keymaps/osx_de_experimental/keymap.c | 64 +++++++++++----------- 1 file changed, 31 insertions(+), 33 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c index 5b8fd28a71..3974dacf65 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c +++ b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c @@ -22,17 +22,17 @@ #define NUMB 4 #define EGOS 5 -#define M_TOGGLE_5 0 -#define M_DE_OSX_PLUS_CTRLALT 1 -#define SM_KISS 2 -#define SM_FROWN 3 -#define SM_CRY 4 -#define SM_SMILE 5 -#define SM_SMIRK 6 -#define M_LGUI_SHFT 7 -#define SM_HEART 8 -#define SM_LAUGH 9 -#define M_CTL_SFT_HASH 10 +#define SMLY_TOG_QUOT 0 +#define M_TOGGLE_5 1 +#define M_DE_OSX_PLUS_CTRLALT 2 +#define SM_KISS 3 +#define SM_FROWN 4 +#define SM_CRY 5 +#define SM_SMILE 6 +#define SM_SMIRK 7 +#define M_LGUI_SHFT 8 +#define SM_HEART 9 +#define SM_LAUGH 10 #define SM_SAD 11 #define M_DE_OSX_CIRC_CTRLCMD 12 #define M_MEH_SH_ACUT 13 @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, - LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), LT(SMLY,DE_OSX_QUOT), + LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), M(SMLY_TOG_QUOT), KC_HOME, KC_END, KC_PGUP, KC_BSPC, KC_DEL, KC_PGDN, @@ -163,6 +163,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint16_t start; switch(id) { +case SMLY_TOG_QUOT: +//Macro: SMLY_TOG_QUOT//----------------------- +if (record->event.pressed) { + start = timer_read(); + layer_state ^= (1<150) { + return MACRO_NONE; + } else { + return MACRO(D(LSFT),T(BSLS),U(LSFT),END); + } + } + +break; case M_TOGGLE_5: //Macro: M_TOGGLE_5//----------------------- if (record->event.pressed){ @@ -225,7 +242,7 @@ case M_LGUI_SHFT: if (record->event.pressed){ return MACRO(D(LGUI),D(LSFT),END); }else{ - return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); + return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); } break; @@ -242,20 +259,6 @@ if (record->event.pressed) { return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(D),U(LSFT),END); } -break; -case M_CTL_SFT_HASH: -//Macro: M_CTL_SFT_HASH//----------------------- -if (record->event.pressed) { - start = timer_read(); - return MACRO(D(LCTRL),D(LSFT),END); - } else { - if (timer_elapsed(start) >150) { - return MACRO(U(LCTRL),U(LSFT),END); - } else { - return MACRO(U(LCTRL),U(LSFT),T(BSLS),END); - } - } - break; case SM_SAD: //Macro: SM_SAD//----------------------- @@ -322,13 +325,8 @@ switch (layer) { ergodox_right_led_2_on(); break; - case SMLY: - - - ergodox_right_led_3_on(); - break; case NUMB: - ergodox_right_led_1_on(); + ergodox_right_led_3_on(); break; -- cgit v1.2.3 From a16a9b30b6350ce6115dc1622d517d68dcf0cd68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Bo=CC=88sebeck?= Date: Tue, 19 Apr 2016 10:37:37 +0200 Subject: added new macro for toggling and holiding layer --- .../keymaps/osx_de_experimental/keymap.c | 64 ++++++++++++++++------ 1 file changed, 48 insertions(+), 16 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c index 3974dacf65..d723c46e8c 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c +++ b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c @@ -23,25 +23,27 @@ #define EGOS 5 #define SMLY_TOG_QUOT 0 -#define M_TOGGLE_5 1 -#define M_DE_OSX_PLUS_CTRLALT 2 -#define SM_KISS 3 -#define SM_FROWN 4 -#define SM_CRY 5 -#define SM_SMILE 6 -#define SM_SMIRK 7 -#define M_LGUI_SHFT 8 -#define SM_HEART 9 -#define SM_LAUGH 10 -#define SM_SAD 11 -#define M_DE_OSX_CIRC_CTRLCMD 12 -#define M_MEH_SH_ACUT 13 +#define TOG_HLD_MDIA 1 +#define M_TOGGLE_5 2 +#define M_DE_OSX_PLUS_CTRLALT 3 +#define SM_KISS 4 +#define SM_FROWN 5 +#define SM_CRY 6 +#define SM_SMILE 7 +#define SM_SMIRK 8 +#define M_LGUI_SHFT 9 +#define SM_HEART 10 +#define SM_LAUGH 11 +#define SM_SAD 12 +#define M_DE_OSX_CIRC_CTRLCMD 13 +#define M_MEH_SH_ACUT 14 +#define TGH_NUM 15 //Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE]=KEYMAP( //left half - KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, TG(NUMB), + KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(TGH_NUM), KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, @@ -50,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_BSPC, KC_DEL, KC_PGDN, //right half - TG(MDIA), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS, + M(TOG_HLD_MDIA), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS, KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE, DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE), KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT, @@ -187,6 +189,21 @@ case M_TOGGLE_5: layer_state &= (1<<5); } +break; +case TGH_NUM: +//Macro: TGH_NUM//----------------------- +if (record->event.pressed){ + start = timer_read(); + layer_state ^=(1< 150) { + layer_state^=(1<event.pressed){ return MACRO(D(LGUI),D(LSFT),END); }else{ - return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); + return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); } break; @@ -252,6 +269,21 @@ if (record->event.pressed) { return MACRO(T(GRV),T(3),END); } +break; +case TOG_HLD_MDIA: +//Macro: TOG_HLD_MDIA//----------------------- +if (record->event.pressed){ + start = timer_read(); + layer_state ^=(1< 150) { + layer_state^=(1< Date: Wed, 20 Apr 2016 22:34:02 +0200 Subject: changed the macro generation of the ELG to use UP, DOWN, TYPE instead of U,D,T - makes it work with custom keycodes --- .../keymaps/osx_de_experimental/keymap.c | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c') diff --git a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c index d723c46e8c..b3ed55f217 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c +++ b/keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c @@ -23,8 +23,8 @@ #define EGOS 5 #define SMLY_TOG_QUOT 0 -#define TOG_HLD_MDIA 1 -#define M_TOGGLE_5 2 +#define M_TOGGLE_5 1 +#define TGH_NUM 2 #define M_DE_OSX_PLUS_CTRLALT 3 #define SM_KISS 4 #define SM_FROWN 5 @@ -33,11 +33,11 @@ #define SM_SMIRK 8 #define M_LGUI_SHFT 9 #define SM_HEART 10 -#define SM_LAUGH 11 -#define SM_SAD 12 -#define M_DE_OSX_CIRC_CTRLCMD 13 -#define M_MEH_SH_ACUT 14 -#define TGH_NUM 15 +#define TOG_HLD_MDIA 11 +#define SM_LAUGH 12 +#define SM_SAD 13 +#define M_DE_OSX_CIRC_CTRLCMD 14 +#define M_MEH_SH_ACUT 15 //Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -177,7 +177,7 @@ if (record->event.pressed) { if (timer_elapsed(start) >150) { return MACRO_NONE; } else { - return MACRO(D(LSFT),T(BSLS),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(DE_OSX_HASH),UP(KC_LSFT),END); } } @@ -209,12 +209,12 @@ case M_DE_OSX_PLUS_CTRLALT: //Macro: M_DE_OSX_PLUS_CTRLALT//----------------------- if (record->event.pressed) { start = timer_read(); - return MACRO(D(LCTRL),D(LALT),END); + return MACRO(DOWN(KC_LCTRL),DOWN(KC_LALT),END); } else { if (timer_elapsed(start) >150) { return MACRO(U(LCTRL),U(LALT),END); } else { - return MACRO(U(LCTRL),U(LALT),T(RBRC),END); + return MACRO(UP(KC_LCTRL),UP(KC_LALT),TYPE(KC_RBRC),END); } } @@ -222,51 +222,51 @@ break; case SM_KISS: //Macro: SM_KISS//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(RBRC),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_DOT),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LSFT),TYPE(KC_RBRC),UP(KC_LSFT),END); } break; case SM_FROWN: //Macro: SM_FROWN//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LALT),T(8),U(LALT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_DOT),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LALT),TYPE(KC_8),UP(KC_LALT),END); } break; case SM_CRY: //Macro: SM_CRY//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(COMM),U(LSFT),T(SLSH),D(LSFT),T(8),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_COMM),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LSFT),TYPE(KC_8),UP(KC_LSFT),END); } break; case SM_SMILE: //Macro: SM_SMILE//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(9),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_DOT),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LSFT),TYPE(KC_9),UP(KC_LSFT),END); } break; case SM_SMIRK: //Macro: SM_SMIRK//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(COMM),U(LSFT),T(SLSH),D(LSFT),T(9),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_COMM),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LSFT),TYPE(KC_9),UP(KC_LSFT),END); } break; case M_LGUI_SHFT: //Macro: M_LGUI_SHFT//----------------------- if (record->event.pressed){ - return MACRO(D(LGUI),D(LSFT),END); + return MACRO(DOWN(KC_LGUI),DOWN(KC_LSFT),END); }else{ - return MACRO(U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),U(LGUI),U(LSFT),END); + return MACRO(UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),U(LGUI),U(LSFT),END); } break; case SM_HEART: //Macro: SM_HEART//----------------------- if (record->event.pressed) { - return MACRO(T(GRV),T(3),END); + return MACRO(TYPE(KC_GRV),TYPE(KC_3),END); } break; @@ -288,14 +288,14 @@ break; case SM_LAUGH: //Macro: SM_LAUGH//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(D),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_DOT),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LSFT),TYPE(KC_D),UP(KC_LSFT),END); } break; case SM_SAD: //Macro: SM_SAD//----------------------- if (record->event.pressed) { - return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(8),U(LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(KC_DOT),UP(KC_LSFT),TYPE(KC_SLSH),DOWN(KC_LSFT),TYPE(KC_8),UP(KC_LSFT),END); } break; @@ -303,12 +303,12 @@ case M_DE_OSX_CIRC_CTRLCMD: //Macro: M_DE_OSX_CIRC_CTRLCMD//----------------------- if (record->event.pressed) { start = timer_read(); - return MACRO(D(LCTRL),D(LGUI),END); + return MACRO(DOWN(KC_LCTRL),DOWN(KC_LGUI),END); } else { if (timer_elapsed(start) >150) { return MACRO(U(LCTRL),U(LGUI),END); } else { - return MACRO(U(LCTRL),U(LGUI),T(NUBS),END); + return MACRO(UP(KC_LCTRL),UP(KC_LGUI),TYPE(KC_NUBS),END); } } @@ -317,12 +317,12 @@ case M_MEH_SH_ACUT: //Macro: M_MEH_SH_ACUT//----------------------- if (record->event.pressed) { start = timer_read(); - return MACRO(D(LCTRL),D(LSFT),D(LALT),END); + return MACRO(DOWN(KC_LCTRL),DOWN(KC_LSFT),DOWN(KC_LALT),END); } else { if (timer_elapsed(start) >150) { return MACRO(U(LCTRL),U(LSFT),U(LALT),END); } else { - return MACRO(U(LCTRL),U(LALT),T(EQL),U(LSFT),END); + return MACRO(UP(KC_LCTRL),UP(KC_LALT),TYPE(DE_OSX_ACUT),UP(KC_LSFT),END); } } -- cgit v1.2.3