Browse Source

Add 'GREETER' macro button

master
MaxMalRichtig 5 years ago
parent
commit
8fc91268be
  1. 18
      keymap.c

18
keymap.c

@ -19,6 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "keymap_german.h" #include "keymap_german.h"
enum custom_keycodes {
GREETER = SAFE_RANGE,
};
enum {_BASE, _NUM_R, _FUN_R, _MOUS_L, _NAV_L, _PUNC_R, _PUNC_L}; enum {_BASE, _NUM_R, _FUN_R, _MOUS_L, _NAV_L, _PUNC_R, _PUNC_L};
#define _GUI_A LGUI_T(DE_A) #define _GUI_A LGUI_T(DE_A)
@ -59,7 +63,7 @@ combo_t key_combos[COMBO_COUNT] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_split_3x6_3( [_BASE] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------. //,-----------------------------------------------------. ,-----------------------------------------------------.
XXXXXXX, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_SS,
GREETER, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_SS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, _GUI_A, _ALT_S, _CTL_D, _SFT_F, DE_G, DE_H, _SFT_J, _CTL_K, _ALT_L, _GUI_OE, DE_ADIA, XXXXXXX, _GUI_A, _ALT_S, _CTL_D, _SFT_F, DE_G, DE_H, _SFT_J, _CTL_K, _ALT_L, _GUI_OE, DE_ADIA,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
@ -241,9 +245,17 @@ bool oled_task_user(void) {
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case GREETER:
if (record->event.pressed) { if (record->event.pressed) {
set_keylog(keycode, record);
// when keycode is pressed
SEND_STRING("Viele Grüße\nMax");
} else {
// when keycode is released
} }
return true;
break;
} }
return true;
};
#endif // OLED_DRIVER_ENABLE #endif // OLED_DRIVER_ENABLE
Loading…
Cancel
Save