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.

134 lines
5.0 KiB

  1. # QMK HHKB Keymap: blakedietz
  2. <!-- TODO: Link to Hasu's geekhack page from his name -->
  3. <!-- TODO: Link to the ergodox ez layout in this repository -->
  4. This is my (Blake Dietz's) own take on a QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. A lot of the
  5. functionality was inspired by the ergodox ez default layout.
  6. ## Dependencies
  7. ### macOS
  8. ```bash
  9. brew tap osx-cross/avr
  10. brew install avr-libc
  11. brew install dfu-programmer
  12. ```
  13. ### Windows/Linux
  14. [Build Environment Setup](https://github.com/jackhumbert/qmk_firmware/wiki#build-environment-setup)
  15. ## Flashing
  16. You will need to make sure that you have something that you can use to press the button on the alternate controller in
  17. order to put it into boot mode.
  18. From the hhkb directory run the following:
  19. ```bash
  20. make clean
  21. make hhkb:blakedietz:dfu
  22. ```
  23. Press the button on the alternate controller to put the board into boot mode.
  24. You'll see an output similar to the following:
  25. ```bash
  26. make hhkb:blakedietz:dfu
  27. Making hhkb with keymap blakedietz and target dfu
  28. avr-gcc (GCC) 6.2.0
  29. Copyright (C) 2016 Free Software Foundation, Inc.
  30. This is free software; see the source for copying conditions. There is NO
  31. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  32. Size before:
  33. text data bss dec hex filename
  34. 0 22162 0 22162 5692 hhkb_blakedietz.hex
  35. Compiling: keyboards/hhkb/keymaps/blakedietz/keymap.c [OK]
  36. Compiling: ./tmk_core/common/command.c [OK]
  37. Linking: .build/hhkb_blakedietz.elf [OK]
  38. Creating load file for Flash: .build/hhkb_blakedietz.hex [OK]
  39. Size after:
  40. text data bss dec hex filename
  41. 0 22162 0 22162 5692 hhkb_blakedietz.hex
  42. dfu-programmer: no device present.
  43. Error: Bootloader not found. Trying again in 5s.
  44. dfu-programmer: no device present.
  45. Error: Bootloader not found. Trying again in 5s.
  46. Bootloader Version: 0x00 (0)
  47. Erasing flash... Success
  48. Checking memory from 0x0 to 0x6FFF... Empty.
  49. Checking memory from 0x0 to 0x56FF... Empty.
  50. 0% 100% Programming 0x5700 bytes...
  51. [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
  52. 0% 100% Reading 0x7000 bytes...
  53. [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
  54. Validating... Success
  55. 0x5700 bytes written into 0x7000 bytes memory (77.68%).
  56. ```
  57. ### Layers
  58. #### Default
  59. ##### A more "standard" layout
  60. This layout places tilde in the standard location. Backspace is moved to the two upper-right-most keys and pipe
  61. is put back where it belongs (where backspace is on the default hhkb2 keymapping).
  62. ##### Hyper key
  63. <!-- TODO: Link to Brett's article about the thyper key -->
  64. This layout throws out the HHKB's control key in favor of a Hyper key. Ctrl is instead placed on the z and / keys and
  65. can be activated with a long press. I find that this is far more ergonomic as it's less of a reach and it allows you to
  66. alternate to either hand when you need to use `ctrl` as a modifier.
  67. The hyper key can be held for hyper and tapped for escape. You'll find that this is quite nice for vim.
  68. Enter is also a hyper key. This allows for symmetry between control and enter. Hold for hyper, tap for enter.
  69. ##### Tap to Hold
  70. ###### CTL, ALT, GUI
  71. Since the HHKB does not have three super/meta keys, these keys were moved to pinky, ring and middle finger for ctrl, alt/
  72. option and super respectively. This is closer to home row which I've found causes less strain.
  73. The Alt and Super keys are instead replaced with layer toggle keys to go to dev and mouse mode respectively.
  74. ###### Space
  75. Hold space to switch to dev mode. This will put you on a layer to have vim like arrow functionality on h,j,k and l. Use
  76. this in editors that don't have vim keybindings.
  77. ### Dev
  78. The Dev layer can be activated holding space or hitting the HHKB's Alt key. This will put you in a mode
  79. where all function keys are available and left, right, up and down are mapped to their vim equivalents. The function
  80. keys are mapped in such a way that you can use them for debugging. Typically I map debugging functions in all IDEs to
  81. the following for a seamless debugging experience (e.g. jumping from Intellij to chrome dev tools and back):
  82. - f1 -> step over
  83. - f2 -> step into
  84. - f3 -> step out
  85. - f4 -> continue
  86. - f5 -> set break point on current line
  87. ### Media
  88. The media layer can be activated by pressing and holding the semi-colon. I've also placed the play and pause key on the
  89. apostrophe key in the media layer. This allows you to easily roll your pinky from the media toggle (semi-colon) to the
  90. play/pause key in one fluid motion.
  91. I've also tried to logically map next/previous track along with volume up/down vim behavior. In vim since middle finger
  92. goes up on k and index finger goes down on j, next/prev track is k/j respectively. ,/m changes volume up/down
  93. respectively while toggled to the media layer.