pqrs-org / Karabiner-archived

Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
https://pqrs.org/osx/karabiner/
The Unlicense
3.82k stars 310 forks source link

Capslock to escape has visible delay #717

Closed terryma closed 7 years ago

terryma commented 8 years ago

Here's the relevant section in my private.xml. I have Seil map Capslock to F19, and I've made sure that Capslock is set to NoAction for all keyboards under Keyboard settings.

    <modifierdef>F19</modifierdef>
    <item>
        <name>F19 to F19</name>
        <appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, send escape)</appendix>
        <identifier>private.f192f19_escape</identifier>
        <autogen>
            --KeyOverlaidModifier--
            KeyCode::F19,
            KeyCode::COMMAND_L,
            ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
            KeyCode::ESCAPE
        </autogen>
        <block>
         <modifier_only>ModifierFlag::F19</modifier_only>
         <autogen>__BlockUntilKeyUp__ KeyCode::F19</autogen>
     </block>
    </item>

When I just press Capslock, there's small delay before escape is registered. Do you know what might cause that? I've played around with all sort of different settings under Parameters, but nothing seems to help.

dunkarooftop commented 8 years ago

Try this see if it help.

<item>
  <name>F19 to F19</name>
  <appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, send escape)</appendix>
  <identifier>private.f192f19_escape</identifier>

    <autogen>
      __HoldingKeyToKey__
      KeyCode::F19,

      <!-- short press -->
      @begin
      KeyCode::ESCAPE,
      @end

      <!-- hold -->
      @begin
      KeyCode::F19,
      @end

      Option::NOREPEAT,
    </autogen>

    <autogen>
        __KeyToKey__
        KeyCode::F19,

        KeyCode::COMMAND_L,
        ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L
    </autogen>

</item>
tekezo commented 7 years ago

The __BlockUntilKeyUp__ introduces delay. Remove it if you don't need it.