keymap.c 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* Copyright 2021 SethBarberee <seth.barberee@gmail.com>
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "sethBarberee.h"
  17. extern backlight_config_t backlight_config;
  18. #define KC_RST QK_BOOT
  19. #define KC_BL_S BL_STEP
  20. #define KC_RTOG RGB_TOG
  21. #define KC_RMOD RGB_MOD
  22. #define KC_RHUI RGB_HUI
  23. #define KC_RHUD RGB_HUD
  24. #define KC_RSAI RGB_SAI
  25. #define KC_RSAD RGB_SAD
  26. #define KC_RVAI RGB_VAI
  27. #define KC_RVAD RGB_VAD
  28. #define KC_VK VLK_TOG
  29. #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
  30. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  31. [_QWERTY] = LAYOUT_wrapper(
  32. KC_ECAP, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
  33. KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_DEL ,
  34. KC_LSFT, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
  35. KC_LCTL, _________________QWERTY_L3_________________, KC_SPC, KC_RASE, _________________QWERTY_R3_________________,KC_RSFT,
  36. KC_LGUI, KC_LOWR, KC_SPC, KC_BSPC , KC_ENT, KC_LALT
  37. ),
  38. [_LOWER] = LAYOUT(
  39. KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,
  40. KC_RST ,_______,_______, KC_UP ,_______,_______, KC_GRV , KC_P7 , KC_P8 , KC_P9 ,_______,_______,
  41. KC_DEL ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_LBRC, KC_RBRC, KC_P4 , KC_P5 , KC_P6 ,KC_PLUS,KC_PIPE,
  42. KC_BL_S,_______,_______,_______,_______,KC_LCBR,KC_LPRN, KC_RPRN,KC_RCBR, KC_P1 , KC_P2 , KC_P3 ,KC_MINS,_______,
  43. _______,_______,KC_LPRN, KC_DEL ,_______, KC_P0
  44. ),
  45. [_RAISE] = LAYOUT(
  46. KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
  47. _______,_______,_______,_______,_______,_______, _______, _______,_______,_______,_______,_______,
  48. _______,KC_MPRV,KC_MNXT,KC_VOLU,KC_PGUP,KC_UNDS, KC_EQL ,KC_HOME,_______,_______,_______,KC_BSLS,
  49. KC_MUTE,KC_MSTP,KC_MPLY,KC_VOLD,KC_PGDN,KC_MINS,_______, _______,KC_PLUS,KC_END ,_______,_______,_______,_______,
  50. _______,_______,_______, _______,_______, _______
  51. ),
  52. [_ADJUST] = LAYOUT(
  53. //,----+----+----+----+----+----. ,----+----+----+----+----+----.
  54. _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
  55. //|----+----+----+----+----+----| |----+----+----+----+----+----|
  56. KC_RTOG,KC_RMOD,KC_RHUI,KC_RSAI,KC_RVAI,_______, _______,_______,_______,_______,_______,_______,
  57. //|----+----+----+----+----+----| |----+----+----+----+----+----|
  58. KC_VK, _______,KC_RHUD,KC_RSAD,KC_RVAD,_______, _______,_______,_______,_______,_______,_______,
  59. //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
  60. KC_BL_S,KC_RST ,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
  61. //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
  62. _______,_______,_______, _______,_______, _______
  63. // `----+----+----' `----+----+----'
  64. )
  65. };
  66. void suspend_power_down_keymap(void){
  67. backlight_config.enable = false; // disable LED backlight
  68. }
  69. void suspend_wakeup_init_keymap(void){
  70. backlight_config.enable = true; // enable LED backlight
  71. }