You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

keymap_4x6_backlight.c 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include "keymap_common.h"
  2. // 4x6 Keypad
  3. #ifdef KEYMAP_SECTION_ENABLE
  4. const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
  5. #else
  6. const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
  7. #endif
  8. /* Keymap 0: Default Layer
  9. * ,---------------.
  10. * |Esc|Fn0|Fn1|Fn2|
  11. * |---+---+---+---|
  12. * |Num|/ |* |- |
  13. * |---+---+---+---|
  14. * |7 |8 |9 |+ |
  15. * |---+---+---| |
  16. * |4 |5 |6 | |
  17. * |---+---+---+---|
  18. * |1 |2 |3 |Ent|
  19. * |---+---+---| |
  20. * |0 |. | |
  21. * `---------------'
  22. */
  23. [0] = KEYMAP(
  24. ESC, FN0, FN1, FN2, \
  25. NLCK,PSLS,PAST,PMNS, \
  26. P7, P8, P9, PPLS, \
  27. P4, P5, P6, PENT, \
  28. P1, P2, P3, PENT, \
  29. P0, NO, PDOT,NO)
  30. };
  31. /*
  32. * Fn action definition
  33. */
  34. #ifdef KEYMAP_SECTION_ENABLE
  35. const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = {
  36. #else
  37. const uint16_t fn_actions[] PROGMEM = {
  38. #endif
  39. [0] = ACTION_BACKLIGHT_TOGGLE(),
  40. [1] = ACTION_BACKLIGHT_DECREASE(),
  41. [2] = ACTION_BACKLIGHT_INCREASE()
  42. };
  43. #ifdef KEYMAP_IN_EEPROM_ENABLE
  44. uint16_t keys_count(void) {
  45. return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
  46. }
  47. uint16_t fn_actions_count(void) {
  48. return sizeof(fn_actions) / sizeof(fn_actions[0]);
  49. }
  50. #endif