Closed trusktr closed 6 years ago
ALRIGHT, FIGURED IT OUT HALF WAY (AS YOU CAN TELL): IF I PUT MAPPING OF RIGHT_OPTION INTO COMPLEX MODIFIERS, THEN IT SUCCEEDS TURNING ON CAPSLOCK, BUT IT DOES NOT TURN OFF.
HOW CAN I MAKE IT TOGGLE, NOT ONLY TURN ON??? 🤔
Oh, okay, I quit Karabiner app to make it turn off. 😆
Alright, I read the documentation more, and it says to put manipulators
in order so that the first match is executed and subsequent ones are ignored. However, this still isn't working. My config looks like the following. I'm trying to make Capslock be Control or Command, and Right Option to be Casplock. But what happens is that Right Option turns Capslock on, but can never turn it off.
Any ideas?
{
"title": "Capslock as Control or Command, Right Option as Capslock",
"rules": [
{
"description": "Capslock as Control in Terminal or similar apps, Right Option as Capslock",
"manipulators": [
{
"type": "basic",
"from": { "key_code": "right_option" },
"to": [ { "key_code": "caps_lock" } ]
},
{
"type": "basic",
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$",
"^co\\.zeit\\.hyperterm$",
"^co\\.zeit\\.hyper$",
"^io\\.alacritty$",
"^net\\.kovidgoyal\\.kitty$",
"^com\\.github\\.atom$"
]
}
],
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": [ "any" ] }
},
"to": [ { "key_code": "left_control" } ]
}
]
},
{
"description": "Capslock as Command in non-Terminal or similar apps, Right Option as Capslock",
"manipulators": [
{
"type": "basic",
"from": { "key_code": "right_option" },
"to": [ { "key_code": "caps_lock" } ]
},
{
"type": "basic",
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$",
"^co\\.zeit\\.hyperterm$",
"^co\\.zeit\\.hyper$",
"^io\\.alacritty$",
"^net\\.kovidgoyal\\.kitty$",
"^com\\.github\\.atom$"
]
}
],
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": [ "any" ] }
},
"to": [ { "key_code": "left_command" } ]
}
]
}
]
}
I thought I would try to_if_alone
so that I can just press capslock to turn on capslock, otherwise act as Control or Command with other keys, but it doesn't seem to work, capslock doesn't turn on. That config looks like this:
{
"title": "Capslock as Control or Command, Right Option as Capslock",
"rules": [
{
"description": "Capslock as Control in Terminal or similar apps, Right Option as Capslock",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$",
"^co\\.zeit\\.hyperterm$",
"^co\\.zeit\\.hyper$",
"^io\\.alacritty$",
"^net\\.kovidgoyal\\.kitty$",
"^com\\.github\\.atom$"
]
}
],
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": [ "any" ] }
},
"to": [ { "key_code": "left_control" } ],
"to_if_alone": [ { "key_code": "caps_lock" } ]
}
]
},
{
"description": "Capslock as Command in non-Terminal or similar apps, Right Option as Capslock",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$",
"^co\\.zeit\\.hyperterm$",
"^co\\.zeit\\.hyper$",
"^io\\.alacritty$",
"^net\\.kovidgoyal\\.kitty$",
"^com\\.github\\.atom$"
]
}
],
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": [ "any" ] }
},
"to": [ { "key_code": "left_command" } ],
"to_if_alone": [ { "key_code": "caps_lock" } ]
}
]
}
]
}
When this config is in effect, the events look like this:
But it does not turn on capslock, and everything is still lowercase.
Perhaps am I having a bug related to https://github.com/tekezo/Karabiner-Elements/issues/467?
Oops, this this is the wrong repo, moving there.
In my Complex Modifications tab I've mapped
caps_lock
toleft_control
. Then in my Simple Modifications tab I've mappedright_option
tocaps_lock
.Expected: I want
right_option
to toggle capslock on/offActual:
right_option
pressesleft_control
becauseright_option
->caps_lock
->left_control
(the mapping is recursive).How do I make it non-recursive?