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.

212 lines
10 KiB

  1. Overview
  2. ========
  3. Warning: dvorak touch typist, that uses qwerty and bepo locales on my
  4. computer. 40+ years of vi, 30 years of vi in Emacs.
  5. Recent years I have gone minimal, I don't use most of the keys on my ergodox,
  6. or original edition dactyl. These maps work great on large and small keyboards,
  7. my preference seems to be 40% split ergo keyboards like the corne.
  8. I think that what is special here is the layouts. I don't worry too
  9. much about leds, or RGB, although I do like oled. But really its mod_layer.h,
  10. all the simple layer chunks and definitions, and the ability to apply that
  11. to any keyboard with minimal effort. The other thing is the example it
  12. provides for defining keymaps based on different OS locales. I use both
  13. dvorak on Qwerty, and bepo/dvorak on bepo. That means I must change my
  14. locale on my OS to match my keyboard which can do qwerty or bepo locales.
  15. It is possible, as I do, to send a keycode invoking xmonad, to execute my
  16. qwerty - bepo switch on my computer.
  17. Besides using dvorak, another thing that colors my keyboard code is that I
  18. have used the kinesis
  19. advantage for for more than 2 decades. I have used the ergodox ez for several years
  20. as well, so the evolution of my keymaps starts there with space, enter, backspace
  21. and delete keys on the thumbs.
  22. Layouts
  23. -----------
  24. This evolved from the old layout...wrapper code. Calling everything a wrapper seems
  25. silly. So I took a step back.
  26. Also, with all these layers it was a real pain to apply mods consistently and
  27. easily. So I changed the way I use keymap macro wrappers and added in my own
  28. mod layer. The only thing it has is the mods to apply. No more editing keymaps
  29. to apply mods. I do it once, and it works everywhere I want.
  30. All layouts, almost, boil down to a 3x5 x 2 matrix. Bepo is 3x6. Mostly, I want
  31. my controls to stay the same. As we have been conditioned, these are the keys on
  32. the edges, or middle. Not that they can't change but I don't usually change them
  33. much, except the side edges, - the extra pinky columns.
  34. the F keys, the columns to the left and right and the row on the bottom.
  35. Thumb keys if you have them. Even the number row is practically the same.
  36. With that in mind, reducing my layouts to 3x10 or 12 matrices would be great.
  37. At the same time extracting my mods so they are easy to apply to any matrix.
  38. So that's what is here.
  39. At the bottom is the LAYOUT, needed by the keeb you have. Then I have my Layouts
  40. to feed it with my ROWS macros which are my MOD layer. At the end of it all,
  41. I give a 3x10 or 12 to a layout and I have a complete keyboard definition.
  42. Creating a new keyboard map is super simple.
  43. * mod_layer.h is the place for home row mods or any other mods.
  44. * layouts.h is where I define a new matrix using the ROW macros when I need one.
  45. * core_keys.h - where I define my custom keys. Ya know, the big enum.
  46. * altlocal_keys.c - Alternate key/shift keys for emulation on other locales.
  47. * core_keysets.h - Base layers; qwerty, dvorak, beakl, colemak, norman, carplax...
  48. * edge_keys.h - defines the edges and bottom/thumb keys of a keyboard.
  49. * layers.h - defines actual layers for navigation, symbols, keypad, layers, top rows, etc.
  50. Process_records.c
  51. --------------------
  52. This is where the keycodes are processed...
  53. Custom keys
  54. -------------------
  55. I have a lot of custom keys because of bepo. It is somewhat confusing this interaction
  56. between a keyboard and the software that receives it.
  57. A lot of my pain is invoked by my desire to have dvorak on bepo. Which works just fine,
  58. although an english/cyrillic situation may not work so well. Currently I have
  59. dvorak and beakl on bepo in addition to bepo it's self.
  60. Alternate keycodes for emulating a layout on another locale/language.
  61. -----------------------------
  62. Because of wanting dvorak and beakl on bepo there was the necessity to create keys
  63. from keycodes which were not combined. For this I have a special function that
  64. takes a keycode and gives a proper shifted character for it. It is only a 2 keycode
  65. definition, but it does the basic non-shifted and shifted characters as you define them.
  66. Combos/Chords
  67. ----------------------------
  68. This is recently new to me. I'm using them on my thumb keys which are all LT's.
  69. the combos allow for layer locking for the Nav layer, and a oneshot for symbols
  70. among other things.
  71. I followed the simple example at the end of the doc than uses the
  72. combos.def file to define the combos.
  73. Tap-mods
  74. -------------------------------------
  75. I had been using MT on my thumbs for GUI,CTRL,ALT on hold along with
  76. Escape, Enter, space and backspace, my thumb keys. I then added shift to my home row pinky key.
  77. I had layer shifts to symbols, numbers, navigation all on the home row of both hands.
  78. It worked nicely but choppy I think, switching hands for the holder of the layer is
  79. a little like having no caps lock. It was a lot of work adding them to all my maps.
  80. This is what prompted my mod_layer. So much easier. No maps to modify.
  81. Then I moved to all home row mods with layers on my thumb keys.
  82. This does allow for more rolls, and I have found chord/rolls simply from having my
  83. xmonad controls be GUI-some-home-row-key-or-close. When Gui is your index finger,
  84. everything gets easier.
  85. Somewhere along the way I got a corne, and everything had to be small. and I realized
  86. that everything really was small. My layers are blending back, with LTs near the
  87. home row, and all the thumbs. On my dactyl I currently have 8 thumb keys per thumb,
  88. I don't know what to do with them all. Remembering a time I thought that would be
  89. awesome.
  90. ### tap_taplong and open_openclose
  91. In process_records.c I have a nice couple of functions,
  92. tap_taplong(), and open_openclose() for my non MT/LT functionality.
  93. * I have home row mods for Shift, Ctrl, Alt, and Gui on both hands.
  94. * I have a number of LT mods to raise layers nearby. Nav, toprows, symbol, keypad
  95. are on both hands on the first and third rows around home row.
  96. * Xmonad tap_taplong to pull up desktops or terminals with tap or hold.
  97. * C-c/C-v, C-t/C-n, C-w/C-q are all on my Navigation layer as custom keys with tap_taplong.
  98. * My thumbs are Enter/space and Esc/backspace which are also Navigation and toprows and symbol layers. They used to be GUI,CTRL,ALT,SFT. but all that's on the home row now.
  99. * All of the paired characters on my symbol layer have a hold which closes them, and moves the cursor back between.
  100. ### caps word
  101. Holding both pinkies on home row for double tapping term, is effectively
  102. right-shift and left-shift, invokes caps-word. The next word will be capitalized.
  103. It continues until it shouldn't.
  104. BEPO vs Qwerty Locale/language/Layers
  105. ---------------------
  106. Essentially they are different keycode sets. So anything that needs them, causes a layer.
  107. So there are two symbol layers, two toprows layers, two keypad layers.
  108. One for Qwerty and one for bepo. The Navigation layer is not affected.
  109. I only have bepo, dvorak and beakl on bepo. There are a bunch for Qwerty.
  110. I have a ton of basic layers. I'm most interested in beakl at the moment, but I've used Dvorak for more than 20 years. There is also qwerty, colemak, norman, carplax, etc.
  111. The navigation/mouse layer is not affected by bepo/qwerty, but symbols and numbers are.
  112. There are bepo versions of everything that needs it.
  113. Navigation Layer
  114. -----------------------
  115. I do not use a mouse. I use Xmonad as my window manager, and I have
  116. practically no use for one. They are necessary however. So I have
  117. a Navigation layer which is all mouse, arrows, home, end, tab, page
  118. up, down, 5 mouse buttons and so on.
  119. This layer is not affected by bepo/qwerty, but symbols and numbers are.
  120. There are bepo versions of everything that needs it.
  121. Arrow combos work just fine, in emacs I use SFT(arrows) to move between windows.
  122. To do this; shift is my left pinky home, Nav is right thumb Enter, and one of the four
  123. home keys of my left hand are the arrows. Home row mods allow this to work well.
  124. I don't use the arrows on the dactyl and kinesis, even though they are there.
  125. Symbol Layer
  126. -------------------
  127. The symbol layer is based on the Beakl15 symbol layer.
  128. The beakl symbol layer is intuitive and fairly easy to remember. There are 3 versions.
  129. The original, an extended called A, and an extended and enhanced for vi, called B.
  130. The primary purpose of the extension was to provide keys which might not be available
  131. elsewhere on the default layer. B, takes this further and moves :/? to better places.
  132. TopRows Layer
  133. --------------------
  134. I think, truly this is the layer that makes tiny keyboards accessible in the beginning.
  135. This is basically the number row, the shifted number row and the function key row.
  136. I have them so it is numbers on the home row, shifted keys above and functions below.
  137. There are multiple choices, I currently use the beakl number row, with everything
  138. else as you would expect.
  139. Keypad Layer
  140. --------------
  141. There are several variations of keypads and function key pads in various sizes.
  142. Currently I am using a Beakl Keypad on the left hand and 3x4 funcpad on the right.
  143. OLED
  144. --------------------
  145. It shows the basic stuff I could find in most places. The
  146. default layer, the current layer, the mods, the locks, the last key pressed, and
  147. a map of the current layer as simply as possible. I'm sure there is more that could
  148. be done. @Drashna has some fancy stuff. If the display is big enough, there is even
  149. a display of the current layer's keymap.
  150. XMonad
  151. ---------------------
  152. I use xmonad. Gui is my hot key for that. With home row mods I have home
  153. row chords which give me access to my desktops, my scratchpads/terminals,
  154. custom key KC_XM_PORD, among others. It sometimes feels that I am playing
  155. an instrument when I invoke xmonad to do something.
  156. I had an xmonad layer at one time, it was basically dvorak, I would invoke it
  157. with a GUI mod, so that even on bepo, or colemak, my xmonad commands remain the same.
  158. I'm going to need to revisit that, as things are, all the commands move when I change
  159. to a different default layer from dvorak.
  160. Combo's can alleviate some of this pain. More to play with.
  161. Tap Dance
  162. --------------------
  163. I have a lot of tap dance, It's turned off. It's big. tap-hold works pretty well most of the time, instead.
  164. My favorites were tab-backtab, home-end.
  165. Switching the OS keyboard
  166. -------------------------
  167. This varies from system to system. I use Arch Linux, so I use ```setxkbmap```.
  168. I've included a helper script which makes it easy to switch between EN and FR Bepo,
  169. called switch-kbd. In xmonad I invoke this with a keystroke. so, same deal. just map
  170. the keystroke to a key.