Help with complex modification

68 views
Skip to first unread message

DDuser

unread,
Dec 24, 2020, 9:05:13 AM12/24/20
to Karabiner

Hello:

I am not a programmer but use Karabiner with some tweaks to improve my workflow
I adapted a complex modification (Post f11 if Spacebar is held down) as below to help my workflow but I wan't to confine to one app only

No matter what I try, I can't get it to work, I think it's the syntax

Bundle Identifier:  com.citrix.receiver.icaviewer.mac

File Path:          /Library/Application Support/Citrix Receiver/Citrix Viewer.app/Contents/MacOS/Citrix Viewer


How do I add this to the file to make it work?

Can anyone help
Thank you
Much appreciated 


{
  "title": "Personal rules (@kbdluv) (rev 2)",
  "rules": [
    {
      "description": "Post Escape if Command_L is pressed alone.",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "left_command",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "left_command",
              "lazy": true
            }
          ],
          "to_if_alone": [
            {
              "key_code": "escape"
            }
          ]
        }
      ]
    },
    {
      "description": "Post Escape if Command_R is pressed alone.",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "right_command",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "right_command",
              "lazy": true
            }
          ],
          "to_if_alone": [
            {
              "key_code": "escape"
            }
          ]
        }
      ]
    },
    {
      "description": "Post f11 if Spacebar is held down.",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "spacebar",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to_if_alone": [
            {
              "key_code": "spacebar"
            }
          ],
          "to": [
            {
              "key_code": "f11",
              "lazy": true
            }
          ]
        }
      ]
    },
    {
      "description": "Post grave_accent_and_tilde if Caps Lock is pressed alone, left_shift if held down. (rev 2)",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "caps_lock",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "left_shift",
              "lazy": true
            }
          ],
          "to_if_alone": [
            {
              "key_code": "grave_accent_and_tilde"
            }
          ]
        }
      ]
    },
    {
      "description": "Post return_or_enter if Enter is pressed alone, right_shift if held down. (rev 2)",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "return_or_enter",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "right_shift",
              "lazy": true
            }
          ],
          "to_if_alone": [
            {
              "key_code": "return_or_enter"
            }
          ]
        }
      ]
    }
  ]
}

raf

unread,
Dec 26, 2020, 5:23:02 AM12/26/20
to Karabiner
On Thu, Dec 24, 2020 at 06:05:12AM -0800, DDuser <rkpa...@gmail.com> wrote:

> Hello:
>
> I am not a programmer but use Karabiner with some tweaks to improve my
> workflow
> I adapted a complex modification (Post f11 if Spacebar is held down) as
> below to help my workflow but I wan't to confine to one app only
>
> No matter what I try, I can't get it to work, I think it's the syntax
>
> Bundle Identifier: com.citrix.receiver.icaviewer.mac
>
> File Path: /Library/Application Support/Citrix Receiver/Citrix
> Viewer.app/Contents/MacOS/Citrix Viewer
>
>
> How do I add this to the file to make it work?
> Can anyone help
> Thank you
> Much appreciated

Hi, You can restrict manipulators to specific programs.
At the same level as "from", "to", and "type", you can
have a "conditions" item that, among other things,
resticts the manipulator to only applying when a
particular program is frontmost. e.g.:

"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [ "^org\\.macosforge\\.xquartz\\.X11$" ]
}
],

To find out what needs to go into the "bundle_identifiers" list,
run the Karabiner-EventViewer app, click on the "Frontmost Application"
tab, then switch to the app whose bundle identifer you need to know,
and it will appear in the window.

cheers,
raf

DDuser

unread,
Dec 26, 2020, 4:25:58 PM12/26/20
to Karabiner
Thank you!
That worked!
Reply all
Reply to author
Forward
0 new messages