summaryrefslogtreecommitdiff
path: root/keyboard
diff options
context:
space:
mode:
authorStephan Bösebeck <stephan.boesebeck@holidayinsider.com>2016-01-15 15:55:00 +0100
committerStephan Bösebeck <stephan.boesebeck@holidayinsider.com>2016-01-15 15:55:00 +0100
commite44c30f2030dd4c481a6e38e9392f147be7b0ae2 (patch)
treef784be18d4465b53ccd8b21a697b18f7630cf988 /keyboard
parent28964bb04b3d2b6ccd5091218fec63a97fd588c9 (diff)
using keymap_german_osx.h more, adding macros for CTRL/CMD-V combination
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/ergodox_ez/keymaps/keymap_osx_de.c89
1 files changed, 64 insertions, 25 deletions
diff --git a/keyboard/ergodox_ez/keymaps/keymap_osx_de.c b/keyboard/ergodox_ez/keymaps/keymap_osx_de.c
index 91f2c33f31..cc9076eec8 100644
--- a/keyboard/ergodox_ez/keymaps/keymap_osx_de.c
+++ b/keyboard/ergodox_ez/keymaps/keymap_osx_de.c
@@ -1,7 +1,7 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
-#include "keymap_extras/keymap_german.h"
+#include "keymap_extras/keymap_german_osx.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
@@ -9,7 +9,9 @@
#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
@@ -37,21 +39,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(KC_V),
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,
- TG(3), KC_A, KC_S, KC_D, KC_F, KC_G,
- KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LALT,
+ KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, M(M_CTRL_CMDV),
+ KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_LGUI,
+ TG(3), DE_A, DE_S, DE_D, DE_F, DE_G,
+ KC_LSFT, CTL_T(DE_Y), DE_X, DE_C, DE_V, DE_B, KC_LALT,
LT(SYMB,KC_GRV), DE_LESS, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
- TG(2), MEH_T(LSFT(DE_ACUT)),
- KC_HOME,
- KC_BSPC,KC_DEL,KC_END,
+ TG(2), M(M_MEH_SH_ACUT), //MEH_T(LSFT(DE_ACUT)), //need to create macro for that
+ KC_HOME,
+ KC_BSPC,KC_DEL, KC_END,
// right hand
- LGUI(KC_C), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- KC_RGUI, KC_Y, KC_U, KC_I, KC_O, KC_P, DE_UE,
- KC_H, KC_J, KC_K, KC_L, KC_SCLN,LT(MDIA,DE_AE),
- KC_RALT,KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
- KC_UP, KC_DOWN,LGUI(KC_LSFT),KC_RBRC, LT(SYMB,KC_BSLS),
- ALL_T(DE_ACUT), TG(4),
+ M(M_CTRL_CMDC), DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS,
+ KC_RGUI, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UE,
+ DE_H, DE_J, DE_K, DE_L, DE_OE,LT(MDIA,DE_AE),
+ KC_RALT, DE_N, DE_M, DE_COMM,DE_DOT, CTL_T(DE_MINS), KC_RSFT,
+ KC_UP, KC_DOWN,LGUI(KC_LSFT),DE_PLUS, LT(SYMB,DE_HASH),
+ ALL_T(DE_ACUT), TG(4),
KC_PGUP,
KC_PGDN,KC_ENT, KC_SPC
),
@@ -60,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
- * | | | | ! | ? | | | | | \ | [ | ] | | | # | F12 |
+ * | | < | > | ! | ? | | | | | \ | [ | ] | | | # | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | \ | / | . |------| |------| / | ( | ) | { | } | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@@ -80,9 +82,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
- KC_TRNS,KC_GRV,LSFT(KC_GRV),DE_EXLM,DE_QST,KC_TRNS,KC_TRNS,
- KC_TRNS,DE_HASH,DE_DLR, LALT(LSFT(KC_7)),DE_SLSH,KC_DOT,
- KC_TRNS,KC_TRNS,DE_LESS,DE_PERC,LALT(KC_7),LALT(KC_N),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,
@@ -187,15 +189,52 @@ 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;
// MACRODOWN only works in this function
switch(id) {
case 0:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- } else {
- unregister_code(KC_RSFT);
- }
- break;
+ if (record->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;
};