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.

99 lines
3.7 KiB

  1. A keymap for 34 keys with 4 layers and no mod-tap.
  2. ![](https://raw.githubusercontent.com/callum-oakley/keymap/master/keymap.svg)
  3. ## Details
  4. - Hold `sym` to activate the symbols layer.
  5. - Hold `nav` to activate the navigation layer.
  6. - Hold `sym` and `nav` together to activate the numbers layer.
  7. - The home row modifiers are oneshot so that it's possible to modify the
  8. keys on the base layer, where there are no dedicated modifiers.
  9. - `swap win` sends `cmd-tab` for changing focus in macOS but holds `cmd`
  10. between consecutive presses.
  11. - `swap lang` behaves similarly but sends `ctrl-space`, for changing input
  12. language in macOS.
  13. ## Oneshot modifiers
  14. The home row modifiers can either be held and used as normal, or if no other
  15. keys are pressed while a modifier is down, the modifier will be queued and
  16. applied to the next non-modifier keypress. For example to type `shift-cmd-t`,
  17. type `sym-o-n` (or `nav-a-t`), release, then hit `t`.
  18. You can and should hit chords as fast as you like because there are no timers
  19. involved.
  20. Cancel unused modifiers by tapping `nav` or `sym`.
  21. ### Userspace oneshot implementation
  22. For my usage patterns I was hitting stuck modifiers frequently with [`OSM`][]
  23. (maybe related to [#3963][]?). I'd like to try to help fix this in QMK proper,
  24. but implementing oneshot mods in userspace first was:
  25. 1. Fun.
  26. 2. A good exploration of how I think oneshot mods should work without timers.
  27. So in the meantime, this [userspace oneshot implementation][] is working well
  28. for me.
  29. ## Swapper
  30. `swap win` sends `cmd-tab`, but holds `cmd` between consecutive keypresses.
  31. `cmd` is released when some other key is hit or released. For example
  32. nav down, swap win, swap win, nav up -> cmd down, tab, tab, cmd up
  33. nav down, swap win, enter -> cmd down, tab, cmd up, enter
  34. `swap lang` sends `ctrl-space` to swap input languages in macOS and behaves
  35. similarly.
  36. [Swapper implementation.][]
  37. ## Why no mod-tap?
  38. [Mod-tap][] seems to be by far the most popular tool among users of tiny
  39. keyboards to answer the question of where to put the modifiers, and in the
  40. right hands it can clearly work brilliantly, but I've always found myself error
  41. prone and inconsistent with it.
  42. With dedicated modifiers, there are three ways one might type `ctrl-c`:
  43. ctrl down, ctrl up, c down, c up
  44. ctrl down, c down, ctrl up, c up
  45. ctrl down, c down, c up, ctrl up
  46. Basically, you never have to worry about the keyups, as long as the keydowns
  47. occur in the correct order. Similarly, there are three ways one might type
  48. `ac`:
  49. a down, a up, c down, c up
  50. a down, c down, a up, c up
  51. a down, c down, c up, a up
  52. Replace `a` with `ctrl` and this is exactly what we had before! So if we want
  53. to put `a` and `ctrl` on the same key we have a problem, because without
  54. considering timing these sequences become ambiguous. So let's consider timing.
  55. The solution to the ambiguity that QMK employs is to configure the
  56. `TAPPING_TERM` and consider a key held rather than tapped if it is held for
  57. long enough. My problem with this is that it forces you to slow down to use
  58. modifiers. By its very nature the tapping term must be longer than the longest
  59. you would ever hold a key while typing on the slowest laziest Sunday afternoon.
  60. I'm not typing at 100% speed at all times, but when I am, having to think about
  61. timing and consciously slow down for certain actions never fails to trip me up.
  62. So alas, mod-tap is not for me -- but if it works for you, more power to you.
  63. :)
  64. * * *
  65. [My github][]
  66. [`OSM`]: /docs/one_shot_keys.md
  67. [#3963]: https://github.com/qmk/qmk_firmware/issues/3963
  68. [userspace oneshot implementation]: oneshot.c
  69. [swapper implementation.]: swapper.c
  70. [Mod-tap]: https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md
  71. [My github]: https://github.com/callum-oakley