Guest User

Untitled

a guest
Mar 11th, 2015
214
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include "keymap_common.h"
  3.  
  4. // 4x6 Keypad
  5. #ifdef KEYMAP_SECTION_ENABLE
  6. const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
  7. #else
  8. const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
  9. #endif
  10. /* Keymap 0: Default Layer
  11. * ,---------------.
  12. * |Esc|F5 |Fn0|BS |
  13. * |---+---+---+---|
  14. * |Num|/ |* |- |
  15. * |---+---+---+---|
  16. * |7 |8 |9 |+ |
  17. * |---+---+---| |
  18. * |4 |5 |6 | |
  19. * |---+---+---+---|
  20. * |1 |2 |3 |Ent|
  21. * |---+---+---| |
  22. * |0 |. | |
  23. * `---------------'
  24. */
  25. [0] = KEYMAP(
  26. ESC, F5, FN0, BSPC, \
  27. NLCK,PSLS,PAST,PMNS, \
  28. P1, P1, P1, PPLS, \
  29. P1, P1, P1, PENT, \
  30. P1, P1, P1, PENT, \
  31. P0, NO, PDOT,NO)
  32. };
  33.  
  34. /*
  35. * Fn action definition
  36. */
  37. #ifdef KEYMAP_SECTION_ENABLE
  38. const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = {
  39. #else
  40. const uint16_t fn_actions[] PROGMEM = {
  41. #endif
  42. [0] = ACTION_BACKLIGHT_STEP(),
  43. };
  44.  
  45. #ifdef KEYMAP_IN_EEPROM_ENABLE
  46. uint16_t keys_count(void) {
  47. return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
  48. }
  49.  
  50. uint16_t fn_actions_count(void) {
  51. return sizeof(fn_actions) / sizeof(fn_actions[0]);
  52. }
  53. #endif
  54. squinn@ubuntu:~/tmk_keyboard_custom/keyboard/ghpad$
RAW Paste Data