1
0
Fork 0

SG Ergodox layout: Add <br/> macro to media layer

- Added <br/> macro to media layer of Swiss German layout
    for Ergodox
This commit is contained in:
Andreas Schmidt 2017-01-22 12:30:18 +01:00
parent eb6abb6305
commit 3fd9aa3660
1 changed files with 14 additions and 2 deletions

View File

@ -18,6 +18,7 @@
#define HTML_UL M(11) #define HTML_UL M(11)
#define HTML_OL M(12) #define HTML_OL M(12)
#define HTML_CODE M(13) #define HTML_CODE M(13)
#define HTML_BR M(14)
#define SEND_TAG(TAG) do {\ #define SEND_TAG(TAG) do {\
send_key(KC_NONUS_BSLASH); \ send_key(KC_NONUS_BSLASH); \
@ -30,6 +31,13 @@
go_back_based_on_tag(TAG); \ go_back_based_on_tag(TAG); \
} while (0) } while (0)
#define SEND_SHORT_TAG(TAG) do {\
send_key(KC_NONUS_BSLASH); \
SEND_STRING(TAG); \
SEND_STRING("&"); \
send_larger_than(); \
} while (0)
void send_key(uint16_t keycode); void send_key(uint16_t keycode);
void go_back_based_on_tag(char* tag); void go_back_based_on_tag(char* tag);
void send_larger_than(void); void send_larger_than(void);
@ -130,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |H_CODE| | | | | | | | | Prev | Next | | | * | | |H_CODE| |H_BR | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
@ -147,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@ -202,6 +210,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
SEND_TAG("code"); SEND_TAG("code");
} }
break; break;
case 14:
if (record->event.pressed) {
SEND_SHORT_TAG("br");
}
} }
return MACRO_NONE; return MACRO_NONE;
}; };