3

in Karainer, on Mac OS X+

This config gives me 5 Qs after pressing F.

<item>
<name>song_5Q</name>
<identifier>song_5Q</identifier>
<autogen>__KeyToKey__ KeyCode::F, 
      KeyCode::Q,
       KeyCode::Q,
       KeyCode::Q,
       KeyCode::Q,
       KeyCode::Q,
</autogen>

But I want to add a delay of about 200 ms between each Q. How to do it please?

Qing Song
  • 517
  • 1
  • 3
  • 12

3 Answers3

1

Option::KEYTOKEY_DELAYED_ACTION

the doc reference can be found here https://pqrs.org/osx/karabiner/xml.html.en#syntax-KeyToKey-options

dunkaroo
  • 156
  • 7
0
{
  "description": "Print Screen to Command+Shift+5 500msDelay Enter",
  "manipulators": [
    {
      "type": "basic",
      "from": {
        "key_code": "print_screen",
        "modifiers": {
          "optional": [ "caps_lock" ]
        }
      },
      "to": [
        {
          "key_code": "5",
          "modifiers": [
            "left_command",
            "left_shift"
          ]
        }
      ],
      "to_delayed_action": {
        "to_if_invoked": [
          {
            "key_code": "return_or_enter"
          }
        ]
      },
      "parameters": {
        "basic.to_delayed_action_delay_milliseconds": 500
      }
    }
  ]
}
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 14 '23 at 14:43
-1

Best bet would be to call an applescript that implements the delays... Doing it in Karabiner as a native function would probably make Karabiner blocking (synchronous) and introduce all sorts of delays.

Empyreal
  • 14
  • 2