Keyboard firmwares for Atmel AVR and Cortex-M
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.

config.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef CONFIG_H
  15. #define CONFIG_H
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0xFEED
  18. #define PRODUCT_ID 0x0A0C
  19. #define DEVICE_VER 0x4A1F
  20. #define MANUFACTURER di0ib
  21. #define PRODUCT The Half and Half Keyboard
  22. #define DESCRIPTION A split keyboard
  23. /* key matrix size */
  24. #define ROWS_PER_HAND 4
  25. #define MATRIX_COLS 7
  26. #define MATRIX_ROWS ROWS_PER_HAND*2
  27. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
  28. #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
  29. /* use i2c instead of serial */
  30. //#define USE_I2C
  31. //#define I2C_WRITE_TEST_CODE
  32. /* define if matrix has ghost */
  33. //#define MATRIX_HAS_GHOST
  34. /* Set 0 if debouncing isn't needed */
  35. #define DEBOUNCE 5
  36. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  37. #define LOCKING_SUPPORT_ENABLE
  38. /* Locking resynchronize hack */
  39. #define LOCKING_RESYNC_ENABLE
  40. /*
  41. * Feature disable options
  42. * These options are also useful to firmware size reduction.
  43. */
  44. /* disable debug print */
  45. //#define NO_DEBUG
  46. /* disable print */
  47. //#define NO_PRINT
  48. /* disable action features */
  49. //#define NO_ACTION_LAYER
  50. //#define NO_ACTION_TAPPING
  51. //#define NO_ACTION_ONESHOT
  52. //#define NO_ACTION_MACRO
  53. //#define NO_ACTION_FUNCTION
  54. /* key combination for command */
  55. #define IS_COMMAND() ( \
  56. keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) \
  57. )
  58. /* boot magic key */
  59. #define BOOTMAGIC_KEY_SALT KC_Q
  60. #ifdef SPACE_ON_LEFT_HALF
  61. #define BOOTMAGIC_KEY_DEFAULT_LAYER_0 KC_Z
  62. #define BOOTMAGIC_KEY_DEFAULT_LAYER_1 KC_X
  63. #define BOOTMAGIC_KEY_DEFAULT_LAYER_2 KC_C
  64. #define BOOTMAGIC_HOST_NKRO KC_V
  65. #else
  66. #define BOOTMAGIC_KEY_DEFAULT_LAYER_0 KC_M
  67. #define BOOTMAGIC_KEY_DEFAULT_LAYER_1 KC_COMM
  68. #define BOOTMAGIC_KEY_DEFAULT_LAYER_2 KC_DOT
  69. #define BOOTMAGIC_HOST_NKRO KC_N
  70. #endif
  71. /* Mousekey settings */
  72. #define MOUSEKEY_MOVE_MAX 127 // default 127
  73. #define MOUSEKEY_WHEEL_MAX 127 // default 127
  74. #define MOUSEKEY_MOVE_DELTA 5 // default 5
  75. #define MOUSEKEY_WHEEL_DELTA 1 // default 1
  76. #define MOUSEKEY_DELAY 300 // default 300
  77. #define MOUSEKEY_INTERVAL 50 // default 50
  78. #define MOUSEKEY_MAX_SPEED 5 // default 10
  79. #define MOUSEKEY_TIME_TO_MAX 10 // default 20
  80. #define MOUSEKEY_WHEEL_MAX_SPEED 8 // default 8
  81. #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 // default 40
  82. /* Action tapping settings */
  83. #define TAPPING_TERM 200 // default 200
  84. /* #define TAPPING_TOGGLE 2 // default 5 */
  85. /* #define ONESHOT_TIMEOUT 5000 // default undefined */
  86. #define ONESHOT_TAP_TOGGLE 2
  87. #endif