Advertisement
Guest User

6key

a guest
Jul 21st, 2016
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. # Easy AVR USB Keyboard Firmware Keymapper
  2. # Copyright (C) 2013-2016 David Howland
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License along
  15. # with this program. If not, see <http://www.gnu.org/licenses/>.
  16.  
  17. """Keyboard definition for the Techkeys ThreeKeyBoard."""
  18.  
  19. import easykeymap.templates.ATmega16U2_16MHz_CARD as firmware
  20. from easykeymap.ioports import *
  21.  
  22. description = "6KEY"
  23. unique_id = "SIXKEY_001"
  24. cfg_name = "SIXKEY"
  25.  
  26. teensy = False
  27. hw_boot_key = True
  28.  
  29. display_height = int(3*4)
  30. display_width = int(3*4)
  31.  
  32. num_rows = 1
  33. num_cols = 6
  34.  
  35. strobe_cols = False
  36. strobe_low = True
  37.  
  38. matrix_hardware = [
  39. # Port mask Dir mask
  40. ( 0b10100000 , 0b00000000 ), # REF_PORTB
  41. ( 0b10000000 , 0b00000000 ), # REF_PORTC
  42. ( 0b01010010 , 0b00000000 ) # REF_PORTD
  43. ]
  44.  
  45. matrix_strobe = [
  46. # REF_PORTB REF_PORTC REF_PORTD
  47. ( 0b00000000 , 0b00000000 , 0b00000000 )
  48. ]
  49.  
  50. matrix_sense = [
  51. # Port Pin mask
  52.  
  53. ( REF_PORTC , 0b10000000 ),
  54. ( REF_PORTB , 0b10000000 ),
  55. ( REF_PORTB , 0b00100000 ),
  56. ( REF_PORTD , 0b01000000 ),
  57. ( REF_PORTD , 0b00000010 ),
  58. ( REF_PORTD , 0b00010000 )
  59. ]
  60.  
  61. num_leds = 2
  62. num_ind = 2
  63. num_bl_enab = 2
  64.  
  65. led_definition = [
  66. ('Center Switch', 'Any Fn Active'),
  67. ('Backside', 'USB Normal')
  68. ]
  69.  
  70. led_hardware = [
  71. # Port Pin Direction
  72. ( REF_PORTD, 3, LED_DRIVER_PULLDOWN ),
  73. ( REF_PORTD, 5, LED_DRIVER_PULLDOWN )
  74. ]
  75.  
  76. backlighting = False
  77.  
  78. bl_modes = [
  79. ( 1, 1 ),
  80. ( 0, 0 )
  81. ]
  82.  
  83. KMAC_key = None
  84.  
  85. keyboard_definition = [
  86. [((4, 4), (0, 0), 'HID_KEYBOARD_SC_A'),
  87. ((4, 4), (0, 1), 'HID_KEYBOARD_SC_S'),
  88. ((4, 4), (0, 2), 'HID_KEYBOARD_SC_D')],
  89.  
  90.  
  91. [((4, 4), (0, 3), 'HID_KEYBOARD_SC_F'),
  92. ((4, 4), (0, 4), 'HID_KEYBOARD_SC_G'),
  93. ((4, 4), (0, 5), 'HID_KEYBOARD_SC_H')],
  94.  
  95.  
  96. ]
  97.  
  98. alt_layouts = {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement