From 7b5e614b0b9d35680a77fa265df95f10a114b5a2 Mon Sep 17 00:00:00 2001 From: Kai Ryu Date: Wed, 26 Nov 2014 20:07:37 +0900 Subject: [PATCH] Implement a keypad 00 macro for GHPad --- keyboard/ghpad/keymap_4x6.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/keyboard/ghpad/keymap_4x6.c b/keyboard/ghpad/keymap_4x6.c index 5fe21345..ada67826 100644 --- a/keyboard/ghpad/keymap_4x6.c +++ b/keyboard/ghpad/keymap_4x6.c @@ -49,3 +49,18 @@ uint16_t fn_actions_count(void) { return sizeof(fn_actions) / sizeof(fn_actions[0]); } #endif + +enum macro_id { + KEYPAD_00 = 0, +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) { + case KEYPAD_00: + return (record->event.pressed ? + MACRO( T(P0), T(P0), END ) : + MACRO_NONE ); + } + return MACRO_NONE; +}