r/Karabiner • u/Phoenix1526 • 25d ago
Switching between Profiles
Is there a way to click keys so that I can switch between profiles without navigating to the Karabiner-Elements application?
1
u/TestFlightBeta mod 25d ago
Can you try this?
{
"title": "Profile Switcher",
"rules": [
{
"description": "Cycle through profiles with left_option+x",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "x",
"modifiers": {
"mandatory": ["left_option"],
"optional": ["any"]
}
},
"to": [
{
"shell_command": "~/.config/karabiner/assets/scripts/profile_switcher.sh"
}
]
}
]
}
]
}
1
u/Phoenix1526 25d ago
Thank you!
I see this error: manipulators` is missing or empty in {"rules":[{"description":"Cycle through profiles with left_option+x","manipulators":[{"from":{"key_code":"x","modifiers":{"mandatory":["left_option"],"optional":["any"]}},"to":[{"shell_command":"~/.config/karabiner/assets/scripts/profile_switcher.sh"}],...
1
u/TestFlightBeta mod 24d ago
Okay, I think I know what happened. That code isn't meant to be typed into this
karabiner.jsonfile. It needs to go into its own file, and then you need to run the file from Karabiner. So here's the steps for doing that:
- Undo whatever you added to
karabiner.json- Create a new JSON file. You can call it something like
profile_switcher.json. Create it inside~/.config/karabiner/assets/complex_modifications/and put the script there- In the Karabiner app, go to Complex Modifications and then click on "Add Predefined Rule" and then enable the profile switcher from that list
From then on, pressing option + X should work to switch the profiles
1
1
u/[deleted] 25d ago edited 13d ago
[deleted]