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.

124 lines
5.8 KiB

  1. Overview
  2. ========
  3. This is my personal userspace. Most of my code exists here. I only have one keymap, and that
  4. is for an ergodox_ez. There are a lot of layers, 7 of them are default layers. I primarily use
  5. dvorak and Bepo. I've been using emacs in vi mode for over 23 years. I also us Xmonad as my
  6. window manager, additionally I've been using a Kinesis advantage keyboard in dvorak for over 20
  7. years. All of those things tend to color the layouts I have.
  8. The Bepo layer needs some love. It is true to the layout at Bepo.fr, but I find it a little
  9. cumbersome, and I miss some of my favorite keys.
  10. There are 2 dvorak layers, one for a qwerty OS keyboard, and one for a Bepo OS keyboard.
  11. There is a symbol/keypad layer for bepo and qwerty. And of course there is a mouse/media layer.
  12. There are 2 Xmonad layers one for qwerty and one for Bepo. Layer selection happens automatically
  13. based on your current default layer. I use 2 tap dance keys for layer selection.
  14. There are also Qwerty, Colemak, Workman and Norman layers for qwerty.
  15. Keyboard Layout Templates
  16. -------------------------
  17. I borrowed the idea for the keyboard defines and some of the definitions from @drashna.
  18. I think it is an awesome idea, It makes consistency between layout definitions so much easier.
  19. @drashna had this to say about it.
  20. This borrows from @jola5's "Not quite neo" code. This allows me to maintain blocks of keymaps in the userspace, so that I can modify the userspace, and this is reflected in all of the keyboards that use it, at once.
  21. This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once.
  22. The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance:
  23. `#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)`
  24. Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine.
  25. Credit goes to @jola5 for first implementing this awesome idea.
  26. Custom Keycodes
  27. ---------------
  28. Keycodes are defined in the ericgebhart.h file and need to be included in the keymap.c files, so that they can be used there. The keymap.c file has very little in it, the most important thing to see there are the keys that are at the ends of each row, ie. the 1st and last key on each row is defined there.
  29. Everything else is in ericgebhart.h.
  30. Layer Indication
  31. ----------------
  32. The ergodox_ez only has 3 leds, layer indication is pretty lame.
  33. Currently the first led lights up if the default layer is not qwerty. The symbol and media layers get
  34. the other 2 leds, and all the leds light up if you are on the "layers" layer.
  35. I hope I can figure out how to make it better, but I just don't see a way with 3 leds and 11 layers.
  36. BEPO vs Qwerty Layers
  37. ---------------------
  38. There are 7 base layers. Dvorak, qwerty, Colemak, Workman, and Norman work on a Qwerty software layer on the OS. Dvorak_on_bepo and Bepo both work on a Bepo software layer on the os.
  39. Dvorak on qwerty is the default. There is a function in ericgebhart.c which will allow the keyboard
  40. to persist it's default layer through power down. It is currently commented out.
  41. I don't actually use Qwerty, but it seemed like I should have it,
  42. @drashna had it along with Colemak, Workman and Norman so I added them
  43. to my existing dvorak and bepo definitions.
  44. There are two tap dance functions that allow switching the default layers
  45. and the overlay layers.
  46. The default layers switch according to the current OS keyboard of the current Default layer.
  47. Shifting the key, causes the selection to use the other OS keyboard selections. ie,
  48. if you are on qwerty, you get dvorak, qwerty, colemak, workman and norman. If you shift it you get
  49. dvorak on bepo and bepo. If you are not on qwerty the unshifted taps get dvorak and bepo on bepo.
  50. The other tap dance for layers is for the symbol, mouse and layers layers. The layers layer is just a
  51. safety layer, knowing I can get to if I screw something up...
  52. XMonad
  53. ---------------------
  54. Additionally there is an advanced tap dance called XMONAD_ESC. One tap is Escape, tap and hold is
  55. LGUI with the proper XMONAD layer, it is essentially dvorak, for the
  56. given OS layer. 2 taps is Shift lgui with xmonad, and 2 taps and hold
  57. is Control LGUI with Xmonad. This allows for the finger patterns for
  58. Xmonad to remain the same regarless of the keyboard in use. The hold
  59. versions allow for secondary menu selection in Xmonad, the 2 tap function
  60. must be for a key that is in the top level keymap of Xmonad. This is how
  61. many people use xmonad so it's not a real problem. There are plenty of
  62. keys combinations to choose from with these choices. The function can
  63. be expanded to 3 taps and 3 tap and hold, and on and on....
  64. I have a few other special keys, for momentary symbols or shift on the home row of each hand.
  65. Also, after using a kinesis for many years I'm very accustomed to the
  66. space, enter, backspace and delete keys on the thumbs. I've added control
  67. and alt as a secondary function. These are also the Control and Alt keys
  68. if held down.
  69. Tap Dance
  70. --------------------
  71. Additionally there are other tap dance functions, tab-backtab, home-end as well as I few I'm not actually using.
  72. Building and flashing
  73. -----------------------
  74. ```make ergodox_z:ericgebhart``` will compile the code.
  75. I use the teensy-loader cli so that's all I know. There is a script here called flash_ergodox
  76. Use it like this,
  77. ```flash-ergodox <path to your hex file>```
  78. then use a paperclip to push the reset button on your keyboard.
  79. Switching the OS keyboard
  80. -------------------------
  81. This varies from system to system. I use Arch Linux, so I use ```setxkbmap```.
  82. I've included a helper script which makes it easy to switch between EN and FR Bepo,
  83. called switch-kbd.