Open dciesielkiewicz opened 2 years ago
you are missing the "type": "basic" from the second manipulator that's why it doesn't work when a modifier is there
@Bashwy Thanks for your feedback ;-) In the meantime I've changed config to the proper one, but it still doesn't work for me:
{
"title": "Go back and forward with command and mouse buttons 4,5",
"rules": [
{
"description": "Maps command + button 5 to go back, 4 to go forward",
"manipulators": [
{
"type": "basic",
"from": {
"pointing_button": "button5",
"modifiers": "command"
},
"to": [
{
"key_code": "open_bracket",
"modifiers": "left_command"
}
]
},
{
"type": "basic",
"from": {
"pointing_button": "button4",
"modifiers": "command"
},
"to": [
{
"key_code": "close_bracket",
"modifiers": "left_command"
}
]
}
]
}
]
}
ahh yes the key codes for "[" and "]" are actually "open_bracket" and "close_bracket". you can find the names of all keys with the Karabiner-EventViewer app
@Bashwy I updated the json above and after replacing [
and ]
with open_bracket
and close_bracket
it still doesn't work.
Instead of simulating command and a bracket, it still treats it as a standard command and mouse button.
The thing is completely opposite when I drop modifier "modifiers": "command"
. Then it works properly
{
"title": "Go back and forward with command and mouse buttons 4,5",
"rules": [
{
"description": "Maps command + button 5 to go back, 4 to go forward",
"manipulators": [
{
"type": "basic",
"from": {
"pointing_button": "button5"
},
"to": [
{
"key_code": "open_bracket",
"modifiers": "left_command"
}
]
},
{
"type": "basic",
"from": {
"pointing_button": "button4"
},
"to": [
{
"key_code": "close_bracket",
"modifiers": "left_command"
}
]
}
]
}
]
}
Also I tested it will all the other complex modifications dropped to be sure that nothing else overrides my config.
there shouldn't be a title before the rules also you forgot the brackets for the modifiers
{ "description": "Maps command + button 5 to go back, 4 to go forward", "manipulators": [ { "from": { "modifiers": { "mandatory": [ "left_command" ], "optional": [ "caps_lock" ] }, "pointing_button": "button5" }, "to": [ { "key_code": "close_bracket", "modifiers": [ "left_command" ] } ], "type": "basic" }, { "from": { "modifiers": { "mandatory": [ "left_command" ], "optional": [ "caps_lock" ] }, "pointing_button": "button4" }, "to": [ { "key_code": "open_bracket", "modifiers": [ "left_command" ] } ], "type": "basic" } ] }
sorry it looks weird karabiner should clean it up to look normal but this should work
@Bashwy When I've pasted your JSON to the file in ~/.config/karabiner/assets/complex_modifications/{fileName}.json
, it didn't even appear after clicking Add rule
.
After formatting it and wrapping in { "rules": [...your-stuff-here] }
it still didn't work for me.
{
"rules": [
{
"description": "Maps command + button 5 to go back, 4 to go forward",
"manipulators": [
{
"from": {
"modifiers": {
"mandatory": [
"left_command"
],
"optional": [
"caps_lock"
]
},
"pointing_button": "button5"
},
"to": [
{
"key_code": "close_bracket",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"from": {
"modifiers": {
"mandatory": [
"left_command"
],
"optional": [
"caps_lock"
]
},
"pointing_button": "button4"
},
"to": [
{
"key_code": "open_bracket",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
}
]
}
after pasting the code directly into the file can you see the name next to your other complex mods? if so you might need to let karabiner manipulate the mouse in the devices tab
The thing is completely opposite when I drop modifier "modifiers": "command". Then it works properly
IIRC, from Catalina onwards, there was a bug which prevented remapping modfier+mouse_click combo. ~I suspect this bug has not been fixed or has been reintroduced.~ (Edit: it's working. See the next post.)
after pasting the code directly into the file can you see the name next to your other complex mods?
@dciesielkiewicz wants to save complex modifications in ~/.config/karabiner/assets/complex_modifications/
and import it from KE, rather than to directly add rules to karabiner.json
file. That's why, there is title
and rules
in the config they posted.
@dciesielkiewicz: I have tested mapping control+button3
to control+left_arrow
and it's working for me. I suspect you have not enabled input modification for the mouse and keyboards. Can you post a screenshot of "Devices" tab?
Software versions: KE: 14.4.0, macOS: 12.0.1
Config used: note: I typed this, so there might be syntax errors. See "Log" tab after adding this config to check if there is any error.
{
"title": "Test: mouse button with modifier",
"rules": [{
"description": "control+button3 -> control+left_arrow",
"manipulators": [{
"type": "basic",
"from": {
"pointing_button": "button3",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [{
"key_code": "left_arrow",
"modifiers": ["control"]
}]
}]
}]
}
Hi, I'm using Intel MacBook with latest version of Mac OS Monterey with Karabiner v14.3.0 and I couldn't make mouse button complex modification working properly.
This is how my modification looks like:
I have "Modify events from this device" enabled and modification works perfectly fine, when
modifiers
is missingDoes anyone have an idea, what could be wrong, here?