diff --git a/keyboard/ergodox_ez/keymaps/osx_de/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de/keymap.c new file mode 100644 index 0000000000..69acd9b951 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/osx_de/keymap.c @@ -0,0 +1,299 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_extras/keymap_german_osx.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define CRSR 3 // media keys +#define NUMB 4 // number keys + +#define M_CTRL_CMDV 1 +#define M_CTRL_CMDC 2 +#define M_MEH_SH_ACUT 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 |CMD-V | |CMD-C | 6 | 7 | 8 | 9 | 0 | ß | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | CMD | | CMD | Z | U | I | O | P | ü | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LALT | A | S | D | F | G |------| |------| H | J | K | L | ö | ä/RALT| + * |--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------| + * | LShift |Y/Ctrl| X | C | V | B | | | | N | M | , | . |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | ! | ? | | | | | \ | [ | ] | | | # | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | \ | / | . |------| |------| / | ( | ) | { | } | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | ^ | % | | | ~ | | | | & | < | > | " | ' | ? | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | . | ! | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,DE_LESS,DE_MORE,DE_EXLM,DE_QST, KC_TRNS,KC_TRNS, + KC_TRNS,DE_HASH,DE_DLR, DE_BSLS,DE_SLSH,KC_DOT, + KC_TRNS,KC_TRNS,DE_LESS,DE_PERC,DE_PIPE,DE_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 hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), LALT(KC_7), DE_HASH, KC_F12, + DE_SLSH, DE_LPRN, DE_RPRN, LALT(KC_8), LALT(KC_9), KC_TRNS, + KC_TRNS, DE_AMPR, KC_GRV, LSFT(KC_GRV), DE_DQOT, DE_QUOT, DE_QST, + KC_TRNS,KC_DOT, KC_EXLM, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | Mute | | | | | | Play | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | WlUp | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| WlDw |------| |------|VolUp | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | MClk | | | |VolDn | | Prev | Next | Up | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | Left | Down | Right | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +KEYMAP( + 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 hand + KC_MUTE, 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_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +// ADNW-KOY layer +/* Keymap 3: ADNW-Koy layer + * ADNW-Koy is a special layout designed to be ergonomic. Was created using software to determine the most ergonomic way to type German and English texts. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | K | . | O | , | Y | | | | V | G | C | L | ß | Z | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | H | A | E | I | U |------| |------| D | T | R | N | S | F/L2 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |X/Ctrl| Q | Ä | Ü | Ö | | | | B | P | W | M |J/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + case 1: + 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 2: + 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 3: + 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); //cannot use DE_ACUT here, as macro needs KC_ prefix + } + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void * matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void * matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + //ergodox_board_led_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboard/ergodox_ez/keymaps/osx_de/osx_de.hex b/keyboard/ergodox_ez/keymaps/osx_de/osx_de.hex index eb82384d54..2c83055b0d 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de/osx_de.hex +++ b/keyboard/ergodox_ez/keymaps/osx_de/osx_de.hex @@ -16,17 +16,17 @@ :1000F000E20001E001E101E20002E001E3010602A9 :100100000602E30002E00001E00002E001E3011961 :10011000021902E30002E00001E0000000F0A1F09B -:10012000A329002B000354E100358100001E0014B8 +:10012000A329002B00E200E100358100001E00142D :100130000004001D7135004D001F001A0016001B41 :1001400000E1044C00200008000700060050002ACF :100150000021001500090019004F004A0022001775 -:10016000000A000500000002540130E3000000E234 -:1001700000000003300230E7000000E60000002E1F -:100180007F23001C000B0011000000045424001801 +:10016000000A000500000003300130E3000000E257 +:1001700000000002540230E7000000E60000000426 +:100180005423001C000B00110000002E7F240018D7 :10019000000D00100052004B0025000C000E003630 :1001A0000051002C00260012000F003700E1082843 :1001B00000270013003300387130004E002D002F4F -:1001C000003482E5003181000001000100010001DE +:1001C000003474E5003181000001000100010001EC :1001D00000010000003A003500310001000100017B :1001E000003B0035022102350001004C003C001E9E :1001F0000224062202010001003D002D02240224F7 @@ -38,26 +38,26 @@ :100250000425041F021E0201004300310026043160 :1002600002010001004400450001002D02010000D0 :100270000001000100010001000100000001000177 -:10028000000100FB000100010001000100F200F983 -:1002900000010001000100F000F100FA00F400018B -:1002A0000001000100F300FC00F500010001000165 -:1002B000000100F600000001000100010000000143 -:1002C0000000000100010001000000010000000129 -:1002D0000001000100010001000000010001000117 -:1002E000000100A800A9000100010001000100AC0C -:1002F00000AA00B600010001000100AB005000019F +:100280000001000100010001000100F400F200FB88 +:1002900000010001000100F000F100FA000100017E +:1002A000000100F500F300FC00010001000100F96D +:1002B00000FA00F60000000100010001000000014A +:1002C0000000000100A80001000000010000000182 +:1002D0000001000100A900AA0000000100010001C6 +:1002E000000100010001000100010001000100AC5B +:1002F000000100B600010001000100AB0050000148 :1003000000010001000100520051000100AE000197 :1003100000010001004F0000000100010001000188 -:1003200000010000000100010001000100010001C6 -:1003300000010001000100010001000100010001B5 -:1003400000010001000100010001000100010001A5 -:100350000001000100010001000100010000000196 +:10032000000100000001000E000B001B7101000124 +:100330000001003700040014000100010001001258 +:10034000000800340001000100010036000C002FFD +:10035000000100010001001D001800330000000131 :100360000001000100000001000000010001000187 -:100370000000000100000001000100010001000177 -:100380000000000100010001000100010001000166 -:100390000001000100010001000100010001000155 -:1003A00000010001005000010001000100010052A5 -:1003B000005100010001000100010001004F000098 +:100370000000000100000001000100190007000555 +:10038000000000010001000A001700130001000135 +:10039000000100060015001A000100010001000F15 +:1003A00000110010000100010001002D0016000DD9 +:1003B000710100010038001C0009820100010000E9 :1003C0000001000100010001000100000001000126 :1003D00000010001000100010001000100500001C6 :1003E0000001000100010052005100010001000164 diff --git a/keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/keymap.c b/keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/keymap.c index 7e9defafa7..fb8635118b 100644 --- a/keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/keymap.c +++ b/keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/keymap.c @@ -15,49 +15,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 |CMD-V | |CMD-C | 6 | 7 | 8 | 9 | 0 | ß | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | CMD | | CMD | Z | U | I | O | P | ü | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ADNW | A | S | D | F | G |------| |------| H | J | K | L | ö | ä/L2 | - * |--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------| - * | LShift |Y/Ctrl| X | C | V | B | | | | N | M | , | . |-/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |