Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluor stopped working with Karabiner Elements 13.7 on Big Sur #65

Open
therealmarv opened this issue Oct 21, 2021 · 16 comments
Open

Fluor stopped working with Karabiner Elements 13.7 on Big Sur #65

therealmarv opened this issue Oct 21, 2021 · 16 comments

Comments

@therealmarv
Copy link

Fluor does not work with Karabiner Elements 13.7 on Big Sur anymore (it worked for years on Catalina and Karabiner Elements 13.5 and below).
It works perfectly fine if Karabiner Elements is turned off though.

I suppose it's more a Karabiner Elements than a Fluor issue. I've reported it also there:
pqrs-org/Karabiner-Elements#2858

@cyugao
Copy link

cyugao commented Nov 17, 2021

I am still using Fluor 2.1.0 build 1670 and it works OK.
I once updated it but found out the new version does not work with Karabiner... So I rolled it back to the older version.

@lurkio
Copy link

lurkio commented Nov 19, 2021

I am still using Fluor 2.1.0 build 1670 and it works OK. I once updated it but found out the new version does not work with Karabiner... So I rolled it back to the older version.

Thanks! I can confirm that. I have an unusual requirement: to switch to function-key (fn) mode in Fluor when a particular app (BeebEm 4) is active on macOS Mojave on an old 2014 MacBook Pro. But I also want Karabiner-Elements to remap the Right Option key to Enter (because I got used to the muscle-memory ages ago on an old MacBook). Reverting to Fluor 2.1.0 was the only way to achieve what I wanted because the latest release of Fluor (v2.5.0) doesn't seem to work with Karabiner-Elements.

@yous
Copy link

yous commented Nov 27, 2021

FWIW, I found a link for Fluor 2.1.0: https://web.archive.org/web/20210201220229/https://fluorapp.net/

@arozmarin
Copy link

Hi guys I had same problem, and I found one [Karabiner-Elements complex_modifications rules] and no need anymore for flour : https://ke-complex-modifications.pqrs.org/#function_keys
You can change setting for any app you want, it works for me

@Keagel
Copy link

Keagel commented Sep 1, 2022

Hi guys I had same problem, and I found one [Karabiner-Elements complex_modifications rules] and no need anymore for flour : https://ke-complex-modifications.pqrs.org/#function_keys You can change setting for any app you want, it works for me

Unfortunately that is not ideal as it prevents you from using the Fn key to temporarily control media in the apps you've chosen.

@Jendker
Copy link

Jendker commented Sep 4, 2022

Unfortunately that is not ideal as it prevents you from using the Fn key to temporarily control media in the apps you've chosen.
That is correct. Did you find a way around it @Keagel ?

@Keagel
Copy link

Keagel commented Sep 6, 2022

Unfortunately that is not ideal as it prevents you from using the Fn key to temporarily control media in the apps you've chosen.
That is correct. Did you find a way around it @Keagel ?

I haven't. I figured it might be possible with Karabiner Elements using complex rules to tell it to override the behavior of the media keys when pressed with Fn but I haven't been able to get it to work.

@Jendker
Copy link

Jendker commented Sep 6, 2022

Thanks for the answer. I've tried that in the end, config got extremely long, but it works fine.

@Keagel
Copy link

Keagel commented Sep 6, 2022

Do you mind sharing your config?

@Jendker
Copy link

Jendker commented Sep 6, 2022

No problem! This is the pattern I'm using:

"from" : {
  "key_code" : "f1",
  "modifiers" : {
    "mandatory" : [ "fn" ]
  }
},
"to" : [ {
  "consumer_key_code" : "display_brightness_decrement"
} ],
"conditions" : [ {
  "type" : "frontmost_application_if",
  "bundle_identifiers" : [ "^bundle_identifiers$" ]
} ],
"type" : "basic"
}, {
"from" : {
  "key_code" : "f1"
},
"to" : [ {
  "key_code" : "f1"
} ],
"conditions" : [ {
  "type" : "frontmost_application_if",
  "bundle_identifiers" : [ "^bundle_identifiers$" ]
} ],
"type" : "basic"
}

This repo vastly simplifies writing of Karabiner configs, you could consider using it: https://github.com/yqrashawn/GokuRakuJoudo

@Keagel
Copy link

Keagel commented Sep 7, 2022

That's pretty much the configuration I had written too, for me it doesn't work though.

Edit: never mind, it works just fine. Thank you!

@Keagel
Copy link

Keagel commented Dec 7, 2022

An update for those that would like to also disable media keys with modifiers (ctrl, shift, command, option):

{
    "conditions": [
        {
            "bundle_identifiers": [
                ...
            ],
            "type": "frontmost_application_if"
        }
    ],
    "from": {
        "key_code": "f12",
        "modifiers": {
            "mandatory": [
                "fn"
            ]
        }
    },
    "to": [
        {
            "consumer_key_code": "volume_increment"
        }
    ],
    "type": "basic"
},
{
    "conditions": [
        {
            "bundle_identifiers": [
                ...
            ],
            "type": "frontmost_application_if"
        }
    ],
    "from": {
        "key_code": "f12",
        "modifiers": {
            "optional": [
                "caps_lock",
                "command",
                "control",
                "shift",
                "option"
            ]
        }
    },
    "to": [
        {
            "key_code": "f12"
        }
    ],
    "type": "basic"
}

If the modifiers aren't specified in the second part of the configuration that maps the F12 key back to itself (instead of the media functionality), they get caught by the first section with the fn modifier because the mandatory configuration doesn't prevent other modifiers from being used. Without that modification, shortcuts like ⌘+F12 don't work properly as they still act as media keys.

@joexcm
Copy link

joexcm commented Sep 9, 2023

Copy-paste solution for people finding this in the future.

First you'll need to know how to create your own complex rule - video tutorial.
Once you're set up with a new json file in the right folder, launch Karabiner-EventViewer, select 'Frontmost Application', open the application you want this to work with, then replace my com.ableton.live entries with whatever it says the bundle identifier is for the application you just opened.

The fn keys act as function keys in the selected application, but change to brightness, volume etc when fn is held. This isn't the case for f3-f6 because I don't use the mission control, spotlight etc buttons, but if you want them to work you'll be able to figure it out from the code. This is Jendker's solution as above but written out in full. Hope this helps someone!

{
  "title": "Github solution - Function keys work as fn keys (instead of media keys)",
  "maintainers": [
    "harmtemolder"
  ],
  "rules": [
    {
      "description": "Function keys work as fn keys",
      "manipulators": [
        {
          "type": "basic",
          "from" : {
            "key_code" : "f1",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "display_brightness_decrement"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f1"
          },
          "to" : [ {
            "key_code" : "f1"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f2",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "display_brightness_increment"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f2"
          },
          "to" : [ {
            "key_code" : "f2"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f3"
          },
          "to" : [ {
            "key_code" : "f3"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f4"
          },
          "to" : [ {
            "key_code" : "f4"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f5"
          },
          "to" : [ {
            "key_code" : "f5"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f6"
          },
          "to" : [ {
            "key_code" : "f6"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f7",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "rewind"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f7"
          },
          "to" : [ {
            "key_code" : "f7"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f8",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "play_or_pause"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f8"
          },
          "to" : [ {
            "key_code" : "f8"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f9",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "fastforward"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f9"
          },
          "to" : [ {
            "key_code" : "f9"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f10",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "mute"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f10"
          },
          "to" : [ {
            "key_code" : "f10"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f11",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "volume_decrement"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f11"
          },
          "to" : [ {
            "key_code" : "f11"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type": "basic",
          "from" : {
            "key_code" : "f12",
            "modifiers" : {
              "mandatory" : [ "fn" ]
            }
          },
          "to" : [ {
            "consumer_key_code" : "volume_increment"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        },
        {
          "type" : "basic",
          "from" : {
            "key_code" : "f12"
          },
          "to" : [ {
            "key_code" : "f12"
          } ],
          "conditions" : [ {
            "type" : "frontmost_application_if",
            "bundle_identifiers" : [ "com.ableton.live" ]
          } ]
        }
      ]
    }
  ]
}

@Jendker
Copy link

Jendker commented Sep 11, 2023

I'll just add my 0.02$ to the post above. It's important to add:

            "modifiers" : {
              "optional" : [ "any" ]
            }

to each basic modification to make sure that any modifier keeps working as expected with F keys.

@Meligy
Copy link

Meligy commented Feb 5, 2024

Reading this issue, and seeing how Fluor seems unmaintained, I tried Karabiner Elements.

But it's too complicated for doing just this, which in my case was defaulting to F1, F2,... on Parallels Desktop.

I'm a programmer. I don't shy away from scripts and configs, etc.
But the experience is too complicated compared to what Fluor gives for this job.

I think I'll continue to use Fluor until it breaks (works well on Sonoma 14.3), then look at the best script to start with and customise.

Huge thanks to @Pyroh for creating this.

@maliayas
Copy link

maliayas commented Dec 7, 2024

My version keeps F keys as F1-12 by default and converts to multimedia keys only in Spotify, Music etc. In case anybody needs as such, here is the code:

Expand
{
    "description": "[Spotify, mpv, VLC, Music, IINA] F1-F12 => Multimedia & Functions",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f1",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f1"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f1"
            },
            "to": [
                {
                    "consumer_key_code": "display_brightness_decrement"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f2",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f2"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f2"
            },
            "to": [
                {
                    "consumer_key_code": "display_brightness_increment"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f7",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f7"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f7"
            },
            "to": [
                {
                    "consumer_key_code": "rewind"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f8",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f8"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f8"
            },
            "to": [
                {
                    "consumer_key_code": "play_or_pause"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f9",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f9"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f9"
            },
            "to": [
                {
                    "consumer_key_code": "fastforward"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f10",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f10"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f10"
            },
            "to": [
                {
                    "consumer_key_code": "mute"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f11",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f11"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f11"
            },
            "to": [
                {
                    "consumer_key_code": "volume_decrement"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f12",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "f12"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.apple\\.Music$",
                        "^com\\.colliderli\\.iina$",
                        "^com\\.spotify\\.client$",
                        "^io\\.mpv$",
                        "^org\\.videolan\\.vlc$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f12"
            },
            "to": [
                {
                    "consumer_key_code": "volume_increment"
                }
            ],
            "type": "basic"
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants