1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
tmk_keyboard_custom/keyboard/ghpad/keymap_4x6.c

67 lines
1.6 KiB
C
Raw Permalink Normal View History

2013-12-13 12:38:36 +00:00
#include "keymap_common.h"
// 4x6 Keypad
2013-12-02 07:10:34 +00:00
#ifdef KEYMAP_SECTION_ENABLE
2013-12-13 12:38:36 +00:00
const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
2013-12-02 07:10:34 +00:00
#else
2013-12-13 12:38:36 +00:00
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
2013-12-02 07:10:34 +00:00
#endif
/* Keymap 0: Default Layer
* ,---------------.
* |Esc|Tab|= |Bs |
* |---+---+---+---|
* |Num|/ |* |- |
* |---+---+---+---|
* |7 |8 |9 |+ |
* |---+---+---| |
* |4 |5 |6 | |
* |---+---+---+---|
* |1 |2 |3 |Ent|
* |---+---+---| |
* |0 |. | |
* `---------------'
*/
[0] = KEYMAP(
ESC, TAB, PEQL,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
2013-12-13 12:38:36 +00:00
const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = {
2013-12-02 07:10:34 +00:00
#else
2013-12-13 12:38:36 +00:00
const uint16_t fn_actions[] PROGMEM = {
2013-12-02 07:10:34 +00:00
#endif
};
2013-12-13 12:38:36 +00:00
#ifdef KEYMAP_IN_EEPROM_ENABLE
2013-12-13 12:38:36 +00:00
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
2014-11-26 11:07:37 +00:00
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;
}