From c97edcdb3098b6afab8a3c982ad60f40ca96aab5 Mon Sep 17 00:00:00 2001 From: Kai Ryu Date: Fri, 18 Apr 2014 15:10:49 +0900 Subject: [PATCH] Add a custom keymap for ghpad rev.RS --- keyboard/ghpad/keymap_redscarf.c | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 keyboard/ghpad/keymap_redscarf.c diff --git a/keyboard/ghpad/keymap_redscarf.c b/keyboard/ghpad/keymap_redscarf.c new file mode 100644 index 00000000..0bf8c591 --- /dev/null +++ b/keyboard/ghpad/keymap_redscarf.c @@ -0,0 +1,52 @@ +#include "keymap_common.h" + +// 4x6 Keypad +#ifdef KEYMAP_SECTION_ENABLE +const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { +#else +const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +#endif + /* Keymap 0: Default Layer + * ,---------------. + * |Esc|F5 |Fn0|BS | + * |---+---+---+---| + * |Num|/ |* |- | + * |---+---+---+---| + * |7 |8 |9 |+ | + * |---+---+---| | + * |4 |5 |6 | | + * |---+---+---+---| + * |1 |2 |3 |Ent| + * |---+---+---| | + * |0 |. | | + * `---------------' + */ + [0] = KEYMAP( + ESC, F5, FN0, BSPC, \ + NLCK,PSLS,PAST,PMNS, \ + P7, P8, P9, PPLS, \ + P4, P5, P6, PENT, \ + P1, P2, P3, PENT, \ + P0, NO, PDOT,NO) +}; + +/* + * Fn action definition + */ +#ifdef KEYMAP_SECTION_ENABLE +const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = { +#else +const uint16_t fn_actions[] PROGMEM = { +#endif + [0] = ACTION_BACKLIGHT_STEP(), +}; + +#ifdef KEYMAP_EX_ENABLE +uint16_t keys_count(void) { + return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS; +} + +uint16_t fn_actions_count(void) { + return sizeof(fn_actions) / sizeof(fn_actions[0]); +} +#endif