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.

87 lines
3.2 KiB

  1. /* Copyright 2017-2019 Nikolaus Wittenstein <nikolaus.wittenstein@gmail.com>
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  8. * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  9. * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  12. * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. * PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #pragma once
  16. #include "config_common.h"
  17. /* USB Device descriptor parameter */
  18. /* Taken from the DataHand PS/2-USB adaptor. */
  19. #define VENDOR_ID 0x13BA
  20. #define PRODUCT_ID 0x0017
  21. #define DEVICE_VER 0x0001
  22. #define MANUFACTURER DataHand
  23. #define PRODUCT DataHand
  24. #define DESCRIPTION DataHand Teensy++ 2.0 conversion
  25. /* key matrix size */
  26. #define MATRIX_ROWS 13
  27. #define MATRIX_COLS 4
  28. #define DIODE_DIRECTION CUSTOM_MATRIX
  29. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  30. #define DEBOUNCING_DELAY 0
  31. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  32. #define LOCKING_SUPPORT_ENABLE
  33. /* Locking resynchronize hack */
  34. #define LOCKING_RESYNC_ENABLE
  35. /*
  36. * Force NKRO
  37. *
  38. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  39. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  40. * makefile for this to work.)
  41. *
  42. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  43. * until the next keyboard reset.
  44. *
  45. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  46. * fully operational during normal computer usage.
  47. *
  48. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  49. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  50. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  51. * power-up.
  52. */
  53. #define FORCE_NKRO
  54. /*
  55. * Magic Key Options
  56. *
  57. * Magic keys are hotkey commands that allow control over firmware functions of
  58. * the keyboard. They are best used in combination with the HID Listen program,
  59. * found here: https://www.pjrc.com/teensy/hid_listen.html
  60. *
  61. * The options below allow the magic key functionality to be changed. This is
  62. * useful if your keyboard/keypad is missing keys and you want magic key support.
  63. */
  64. /* key combination for magic key command */
  65. #define IS_COMMAND() ( \
  66. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  67. )
  68. /*
  69. * Command/Windows key option
  70. *
  71. * If you define this, the thumb enter key becomes the Command/Windows key. There's still an enter key on the right
  72. * ring finger, so this key is much better utilized as the otherwise nonexistent Command key. I think some newer
  73. * DataHands let you remap right ring east as Command, but having it on the thumb is nicer. Comment out this define
  74. * to use the original layout.
  75. */
  76. #define DATAHAND_THUMB_RETURN_COMMAND