yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.14k stars 121 forks source link

Remapping home row modifiers (like Miryoku) sends modifier when typing quickly #147

Closed doubledup closed 2 years ago

doubledup commented 2 years ago

I've been looking through docs, guides, issues and existing configs trying to set up home row modifiers, but haven't found anything yet that works well for home row modifiers. When I type at a normal pace Karabiner registers the modifier keys instead of letters. Near as I can tell, when typing sometimes one key is still held down when the next one is pressed. This causes issues when the first key is on the home row, and is slightly different depending on whether the second key is on the home row: eg. typing aw gives:

  1. a keydown: nothing
  2. w keydown: sends command+w
  3. a keyup: nothing
  4. w keyup: nothing

instead of:

  1. a keydown: nothing
  2. w keydown: nothing
  3. a keyup: sends a
  4. w keyup: sends w

When the second key is also on the home row, it seems to ignore the first keypress: eg. typing as gives:

  1. a keydown: nothing
  2. s keydown: nothing
  3. a keyup: nothing
  4. s keyup: sends s

instead of:

  1. a keydown: nothing
  2. s keydown: nothing
  3. a keyup: sends a
  4. s keyup: sends s

Is there some config I can set to make these "rolling" keypresses register as expected? My full config is below.

{
 :main [
        {:des   "Caps Lock: tap for Escape, hold for Control."
         :rules [[:##caps_lock :left_control nil {:alone :escape}]]}
        {:des   "Control: tap for Caps Lock, hold for 'Hyper Key'."
         :rules [[:##left_control [:left_control :left_option :left_command :left_shift] nil {:alone :caps_lock}]]}
        {:des   "Modifiers in home row, like Miryoku."
         :rules [
                 [:##a :left_gui nil {:alone :a}]
                 [:##s :left_option nil {:alone :s}]
                 [:##d :left_control nil {:alone :d}]
                 [:##f :left_shift nil {:alone :f}]
                 [:##j :right_shift nil {:alone :j}]
                 [:##k :right_control nil {:alone :k}]
                 [:##l :right_option nil {:alone :l}]
                 [:##semicolon :right_gui nil {:alone :semicolon}]
                 ]}
       ]
}
yqrashawn commented 2 years ago

old karabiner (osx 10.11) used to support this kind of usage, you may try simlayer https://github.com/yqrashawn/GokuRakuJoudo/blob/master/tutorial.md#advance3 for this

as far as I know, there's still no better solution simlayer, tekezo is using it now https://github.com/pqrs-org/KE-complex_modifications/blob/main/src/json/personal_tekezo_simple_vi_mode.json.rb

but there will be typo if you type really fast even with simlayer not recommend to use high frequency keys like aeiou as layer trigger.

feel free to reopen if have any further question about this issue