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

Mouse buttons keycodes? #261

Closed
GhostValk opened this Issue Oct 7, 2016 · 52 comments

Comments

Projects
None yet
@GhostValk

GhostValk commented Oct 7, 2016

Sorry if it's a bit obvious the answer, but, what are the keycodes for the mouse buttons? I've tried button1, button2, button3, etc. unsuccesfully (are already implemented?)

@graygilmore

This comment has been minimized.

Show comment
Hide comment
@graygilmore

graygilmore Oct 11, 2016

I've gone through the source and have been unable to figure it out. I thought I could do something like:

{
  "profiles": [
    {
      "name": "Default profile",
      "selected": true,
      "simple_modifications": {
        "caps_lock": "escape"
      },
      "fn_function_keys": {
        // mac function stuff
      },
      "pointing_buttons": {
        "button4": "left"
      }
    }
  ]
}

I feel like I'm on the right path but can't quite filter through the source to figure out where it should be (v0.90.46).

graygilmore commented Oct 11, 2016

I've gone through the source and have been unable to figure it out. I thought I could do something like:

{
  "profiles": [
    {
      "name": "Default profile",
      "selected": true,
      "simple_modifications": {
        "caps_lock": "escape"
      },
      "fn_function_keys": {
        // mac function stuff
      },
      "pointing_buttons": {
        "button4": "left"
      }
    }
  ]
}

I feel like I'm on the right path but can't quite filter through the source to figure out where it should be (v0.90.46).

@mikefoley

This comment has been minimized.

Show comment
Hide comment
@mikefoley

mikefoley Oct 11, 2016

I'd love to know as well. I miss my "back" key on my mouse!

mikefoley commented Oct 11, 2016

I'd love to know as well. I miss my "back" key on my mouse!

@GhostValk

This comment has been minimized.

Show comment
Hide comment
@GhostValk

GhostValk Oct 11, 2016

Mouse usage is key for me, i got Dashboard and Expose binded to lateral buttons of the mouse =/

GhostValk commented Oct 11, 2016

Mouse usage is key for me, i got Dashboard and Expose binded to lateral buttons of the mouse =/

@GhostValk

This comment has been minimized.

Show comment
Hide comment
@GhostValk

GhostValk Oct 14, 2016

Any update here?

GhostValk commented Oct 14, 2016

Any update here?

@SaschaKrieg

This comment has been minimized.

Show comment
Hide comment
@SaschaKrieg

SaschaKrieg Oct 18, 2016

I also want to know how to map a key to a mouse button click.

SaschaKrieg commented Oct 18, 2016

I also want to know how to map a key to a mouse button click.

@GhostValk

This comment has been minimized.

Show comment
Hide comment
@GhostValk

GhostValk Oct 25, 2016

It would be good to have an answer from a dev, just to know if the mouse buttons can't currently be remapped or they can be but i'm not seeing the option :s

GhostValk commented Oct 25, 2016

It would be good to have an answer from a dev, just to know if the mouse buttons can't currently be remapped or they can be but i'm not seeing the option :s

@kurtlloyd

This comment has been minimized.

Show comment
Hide comment
@kurtlloyd

kurtlloyd Oct 27, 2016

I'm also hoping that mapping of keys (e.g., R-command, R-option) to mouse keys (e.g., middle-click, right-click) will be added. That is critical for me. It worked great in the original Karabiner.

kurtlloyd commented Oct 27, 2016

I'm also hoping that mapping of keys (e.g., R-command, R-option) to mouse keys (e.g., middle-click, right-click) will be added. That is critical for me. It worked great in the original Karabiner.

@LunaticoCR

This comment has been minimized.

Show comment
Hide comment
@LunaticoCR

LunaticoCR Nov 8, 2016

+1 on this. I used to have middle button mapped to left alt which in return through BetterTouchTools would help me drag windows easily.
Hope a dev can chime in and shed some light.

LunaticoCR commented Nov 8, 2016

+1 on this. I used to have middle button mapped to left alt which in return through BetterTouchTools would help me drag windows easily.
Hope a dev can chime in and shed some light.

@AJLivine

This comment has been minimized.

Show comment
Hide comment
@AJLivine

AJLivine Nov 21, 2016

+1. I understand tekezo is incredibly busy working on Karabiner, but I hope he finds some time to at least let us know if this is possible.

AJLivine commented Nov 21, 2016

+1. I understand tekezo is incredibly busy working on Karabiner, but I hope he finds some time to at least let us know if this is possible.

@sunaj

This comment has been minimized.

Show comment
Hide comment
@sunaj

sunaj Dec 17, 2016

+1 from me too - its one of primary features of Karabiner for me. Thanks for any time / energy spent on this aspect! :)

sunaj commented Dec 17, 2016

+1 from me too - its one of primary features of Karabiner for me. Thanks for any time / energy spent on this aspect! :)

@ngtjah

This comment has been minimized.

Show comment
Hide comment
@ngtjah

ngtjah Jan 13, 2017

i'm a curious party

ngtjah commented Jan 13, 2017

i'm a curious party

@sanderboele

This comment has been minimized.

Show comment
Hide comment
@sanderboele

sanderboele Jan 23, 2017

I would love to be able to map button4 to cmd-[

sanderboele commented Jan 23, 2017

I would love to be able to map button4 to cmd-[

@luispedrofonseca

This comment has been minimized.

Show comment
Hide comment
@luispedrofonseca

luispedrofonseca commented Jan 23, 2017

+1

@jhimanka

This comment has been minimized.

Show comment
Hide comment
@jhimanka

jhimanka Feb 1, 2017

Now that MacOs provides capslock->control, the only reason to use Karabiner for me is to map left mouse button to left_control. A key issue.

jhimanka commented Feb 1, 2017

Now that MacOs provides capslock->control, the only reason to use Karabiner for me is to map left mouse button to left_control. A key issue.

@patrickwelker

This comment has been minimized.

Show comment
Hide comment
@patrickwelker

patrickwelker May 17, 2017

Regarding Mouse Buttons

I'd love to see this getting a higher priority, too. I can simulate Karabiner's other features with other software, or, my Ergodox EZ, but when it comes to my 6 button mouse, I'm out of luck so far. It's my main usage for Karabiner, along with my Trackball buttons.

Karabiner was - at least to my knowledge - the only app which could assign actions to all three different modes: click, double-click and hold.

I'd love to use this again:

patrickwelker commented May 17, 2017

Regarding Mouse Buttons

I'd love to see this getting a higher priority, too. I can simulate Karabiner's other features with other software, or, my Ergodox EZ, but when it comes to my 6 button mouse, I'm out of luck so far. It's my main usage for Karabiner, along with my Trackball buttons.

Karabiner was - at least to my knowledge - the only app which could assign actions to all three different modes: click, double-click and hold.

I'd love to use this again:

@piotr-tobolski

This comment has been minimized.

Show comment
Hide comment
@piotr-tobolski

piotr-tobolski May 18, 2017

Any news on this one? Simple mapping mouse buttons (3+) to keyboard or actions like previous/next space would be amazing. This was the only thing I used in original Karabiner.

piotr-tobolski commented May 18, 2017

Any news on this one? Simple mapping mouse buttons (3+) to keyboard or actions like previous/next space would be amazing. This was the only thing I used in original Karabiner.

@oin

This comment has been minimized.

Show comment
Hide comment
@oin

oin May 18, 2017

I got tired of waiting for this, so I wrote Clicker, a little app with no user interface that translates presses/releases of a key to presses/releases of the left mouse button.
I've tested it for two months on OS X 10.11 and macOS 10.12, and it works flawlessly, even for complex mouse dragging operations.
The only downside is that it doesn't work when a password field is focused (a security limitation of the Event Tap library).

Note that this doesn't translate mouse button presses to key presses or actions (even though one could make it work based on similar code).

Feel free to use it and modify it until Karabiner-Elements supports keyboard key to mouse button mapping.

oin commented May 18, 2017

I got tired of waiting for this, so I wrote Clicker, a little app with no user interface that translates presses/releases of a key to presses/releases of the left mouse button.
I've tested it for two months on OS X 10.11 and macOS 10.12, and it works flawlessly, even for complex mouse dragging operations.
The only downside is that it doesn't work when a password field is focused (a security limitation of the Event Tap library).

Note that this doesn't translate mouse button presses to key presses or actions (even though one could make it work based on similar code).

Feel free to use it and modify it until Karabiner-Elements supports keyboard key to mouse button mapping.

@LunaticoCR

This comment has been minimized.

Show comment
Hide comment
@LunaticoCR

LunaticoCR Jun 19, 2017

@tekezo Are you planning on implementing mouse button mapping support at some stage? Thanks!

LunaticoCR commented Jun 19, 2017

@tekezo Are you planning on implementing mouse button mapping support at some stage? Thanks!

@timbitzen

This comment has been minimized.

Show comment
Hide comment
@timbitzen

timbitzen Jun 22, 2017

My Google searches for how to use the scroll drag on my Logitech mouse on my MBP pointed me to karabiner Elements (which I already had installed). Bummer that it's not working. I miss my Magic Mouse, but between it and the Magic Keyboard, I had gotten tennis elbow.

timbitzen commented Jun 22, 2017

My Google searches for how to use the scroll drag on my Logitech mouse on my MBP pointed me to karabiner Elements (which I already had installed). Bummer that it's not working. I miss my Magic Mouse, but between it and the Magic Keyboard, I had gotten tennis elbow.

@PayneJoe

This comment has been minimized.

Show comment
Hide comment
@PayneJoe

PayneJoe Sep 4, 2017

still be waiting for it

PayneJoe commented Sep 4, 2017

still be waiting for it

@nawkwan

This comment has been minimized.

Show comment
Hide comment
@nawkwan

nawkwan Sep 14, 2017

I'd love to map [button4]/[button5] to [cmd]+<[eft_arrow]/[right_arrow], respectively.

nawkwan commented Sep 14, 2017

I'd love to map [button4]/[button5] to [cmd]+<[eft_arrow]/[right_arrow], respectively.

@jimmy-biznessapps

This comment has been minimized.

Show comment
Hide comment
@jimmy-biznessapps

jimmy-biznessapps Sep 19, 2017

@nawkwan @PayneJoe @timbitzen @LunaticoCR @piotr-tobolski @pattulus @jhimanka @graygilmore @GhostValk etc --

Looks like as of Karabiner Elements 11.0, this can work if you don't mind json hacking:

(Note: This is just a snippet of the JSON, not the entire thing.)

            "complex_modifications": {
                "parameters": {
                    "basic.to_if_alone_timeout_milliseconds": 1000
                },
                "rules": [
                    {
                        "manipulators": [
                            {
                                "description": "Swipe down to move left one space",
                                "from": {
                                    "pointing_button": "button4",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "description": "Swipe up to move right one space",
                                "from": {
                                    "pointing_button": "button5",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            },

I titled them "swipe down" and "swipe up" because that's how I trigger button4/button5 on my Microsoft Sculpt Comfort Mouse, AND you'll want to change "left_control" to "left_command" in both of these, but the above works for me. HUZZAH!

jimmy-biznessapps commented Sep 19, 2017

@nawkwan @PayneJoe @timbitzen @LunaticoCR @piotr-tobolski @pattulus @jhimanka @graygilmore @GhostValk etc --

Looks like as of Karabiner Elements 11.0, this can work if you don't mind json hacking:

(Note: This is just a snippet of the JSON, not the entire thing.)

            "complex_modifications": {
                "parameters": {
                    "basic.to_if_alone_timeout_milliseconds": 1000
                },
                "rules": [
                    {
                        "manipulators": [
                            {
                                "description": "Swipe down to move left one space",
                                "from": {
                                    "pointing_button": "button4",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "description": "Swipe up to move right one space",
                                "from": {
                                    "pointing_button": "button5",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            },

I titled them "swipe down" and "swipe up" because that's how I trigger button4/button5 on my Microsoft Sculpt Comfort Mouse, AND you'll want to change "left_control" to "left_command" in both of these, but the above works for me. HUZZAH!

@jimmy-biznessapps

This comment has been minimized.

Show comment
Hide comment
@jimmy-biznessapps

jimmy-biznessapps Sep 19, 2017

...but the magic sauce, in both "complex" and simple rules, is to use "pointing_button" : "button4" to refer to button4, etc. These work if you put them in the JSON, but as far as I can tell, they don't work the same in the GUI (and show up as weird-looking entries there).

jimmy-biznessapps commented Sep 19, 2017

...but the magic sauce, in both "complex" and simple rules, is to use "pointing_button" : "button4" to refer to button4, etc. These work if you put them in the JSON, but as far as I can tell, they don't work the same in the GUI (and show up as weird-looking entries there).

@threescales

This comment has been minimized.

Show comment
Hide comment
@threescales

threescales Sep 20, 2017

image

I think this function is cool !but it doesn't work in Karabiner-Element.

threescales commented Sep 20, 2017

image

I think this function is cool !but it doesn't work in Karabiner-Element.

@johnwilhite

This comment has been minimized.

Show comment
Hide comment
@johnwilhite

johnwilhite Sep 20, 2017

@jimmy-biznessapps Your json isn't working for me, but if I look in the log I see:
[2017-09-20 11:18:30.594] [info] [grabber] USB Optical Mouse (device_id:3) is ignored.

So It doesn't look like it's going to register any pointing events. Do you see your mouse under Devices? I only have my keyboard and the Apple Internal Keyboard / Trackpad.

johnwilhite commented Sep 20, 2017

@jimmy-biznessapps Your json isn't working for me, but if I look in the log I see:
[2017-09-20 11:18:30.594] [info] [grabber] USB Optical Mouse (device_id:3) is ignored.

So It doesn't look like it's going to register any pointing events. Do you see your mouse under Devices? I only have my keyboard and the Apple Internal Keyboard / Trackpad.

@jimmy-biznessapps

This comment has been minimized.

Show comment
Hide comment
@jimmy-biznessapps

jimmy-biznessapps Sep 20, 2017

I do see my mouse under "devices." So that's probably a prerequisite for this to work.

jimmy-biznessapps commented Sep 20, 2017

I do see my mouse under "devices." So that's probably a prerequisite for this to work.

@graygilmore

This comment has been minimized.

Show comment
Hide comment
@graygilmore

graygilmore Sep 20, 2017

@jimmy-biznessapps thanks for that. Unfortunately I have the similar error as above:

[2017-09-20 10:46:23.334] [info] [grabber] Razer DeathAdder 2013 (device_id:4) is ignored.

Oddly enough the mouse does appear under "Devices" in the GUI and I'm able to modify some of its values in the JSON config (for example, setting "is_keyboard": false on the mouse causes it to stop working entirely).

I'll have to return to this when I have a little more debugging time.

graygilmore commented Sep 20, 2017

@jimmy-biznessapps thanks for that. Unfortunately I have the similar error as above:

[2017-09-20 10:46:23.334] [info] [grabber] Razer DeathAdder 2013 (device_id:4) is ignored.

Oddly enough the mouse does appear under "Devices" in the GUI and I'm able to modify some of its values in the JSON config (for example, setting "is_keyboard": false on the mouse causes it to stop working entirely).

I'll have to return to this when I have a little more debugging time.

@spamwax

This comment has been minimized.

Show comment
Hide comment
@spamwax

spamwax Sep 30, 2017

@nawkwan My device is also ignored in Karabiner. For now to map M4 and M5 to a keystroke I am using ControllerMate app (free) with a custom made program.
(Sample ControllerMate programe: M4M5.cmate.zip)

spamwax commented Sep 30, 2017

@nawkwan My device is also ignored in Karabiner. For now to map M4 and M5 to a keystroke I am using ControllerMate app (free) with a custom made program.
(Sample ControllerMate programe: M4M5.cmate.zip)

@hanamiche

This comment has been minimized.

Show comment
Hide comment
@hanamiche

hanamiche Oct 16, 2017

Hello!
From the Karabiner-Elements 11.1.8(11.2.0?) mouse was supported!

Mouse button modifications has been added.

Mouse buttons 4, 5 and 6 are now available. I also moved in my environment.
I could assign Button 4 to "Back".
Thank you☺️

{ "description": "button4 → [ + command", "from": { "pointing_button": "button4" }, "to": [ { "key_code": "close_bracket", "modifiers": [ "command" ] } ], "type": "basic" },

hanamiche commented Oct 16, 2017

Hello!
From the Karabiner-Elements 11.1.8(11.2.0?) mouse was supported!

Mouse button modifications has been added.

Mouse buttons 4, 5 and 6 are now available. I also moved in my environment.
I could assign Button 4 to "Back".
Thank you☺️

{ "description": "button4 → [ + command", "from": { "pointing_button": "button4" }, "to": [ { "key_code": "close_bracket", "modifiers": [ "command" ] } ], "type": "basic" },

@luispedrofonseca

This comment has been minimized.

Show comment
Hide comment
@luispedrofonseca

luispedrofonseca Oct 16, 2017

@hanamiche Where do you put that? It didn't work for me if I put it under "Simple Modifications". Under "Complex Modifications" doesn't seem to have that format.

luispedrofonseca commented Oct 16, 2017

@hanamiche Where do you put that? It didn't work for me if I put it under "Simple Modifications". Under "Complex Modifications" doesn't seem to have that format.

@LunaticoCR

This comment has been minimized.

Show comment
Hide comment
@LunaticoCR

LunaticoCR Oct 16, 2017

@luispedrofonseca I think you need to pull down a beta build.
image

LunaticoCR commented Oct 16, 2017

@luispedrofonseca I think you need to pull down a beta build.
image

@luispedrofonseca

This comment has been minimized.

Show comment
Hide comment
@luispedrofonseca

luispedrofonseca Oct 16, 2017

@LunaticoCR Thanks, but yes, I have the latest beta. I can assign a mouse button to a key (like backspace) but I can't add the modifiers.

luispedrofonseca commented Oct 16, 2017

@LunaticoCR Thanks, but yes, I have the latest beta. I can assign a mouse button to a key (like backspace) but I can't add the modifiers.

@hanamiche

This comment has been minimized.

Show comment
Hide comment
@hanamiche

hanamiche Oct 17, 2017

@luispedrofonseca Hello. I put this file under "Complex Modifications".
Could you please use the json file? my setting json file.
The path is "~/.config/karabiner/assets/complex_modifications/mouse.json".
(I'm using Japanese keyboard, so I may need to modify "key_code".)

I also made a screen shot of the setting screen.
screenshot

I hope to go well.

hanamiche commented Oct 17, 2017

@luispedrofonseca Hello. I put this file under "Complex Modifications".
Could you please use the json file? my setting json file.
The path is "~/.config/karabiner/assets/complex_modifications/mouse.json".
(I'm using Japanese keyboard, so I may need to modify "key_code".)

I also made a screen shot of the setting screen.
screenshot

I hope to go well.

@luispedrofonseca

This comment has been minimized.

Show comment
Hide comment
@luispedrofonseca

luispedrofonseca Oct 17, 2017

@hanamiche That did it! Thanks for the explanation!

luispedrofonseca commented Oct 17, 2017

@hanamiche That did it! Thanks for the explanation!

@hanamiche

This comment has been minimized.

Show comment
Hide comment
@hanamiche

hanamiche Oct 17, 2017

@luispedrofonseca Was good! Congratulations!!! 😉

hanamiche commented Oct 17, 2017

@luispedrofonseca Was good! Congratulations!!! 😉

@piotr-tobolski

This comment has been minimized.

Show comment
Hide comment
@piotr-tobolski

piotr-tobolski Oct 17, 2017

Works great. Now I can change spaces by tilting mouse wheel 👍

piotr-tobolski commented Oct 17, 2017

Works great. Now I can change spaces by tilting mouse wheel 👍

@ScottStevenson

This comment has been minimized.

Show comment
Hide comment
@ScottStevenson

ScottStevenson Oct 24, 2017

@piotr-tobolski How did you reference the scrollwheel tilt input? I successfully got all my mouse buttons working, but after digging through the source code I still can't determine how to reference scrollwheel::LEFT and scrollwheel::RIGHT like in the previous version!

ScottStevenson commented Oct 24, 2017

@piotr-tobolski How did you reference the scrollwheel tilt input? I successfully got all my mouse buttons working, but after digging through the source code I still can't determine how to reference scrollwheel::LEFT and scrollwheel::RIGHT like in the previous version!

@piotr-tobolski

This comment has been minimized.

Show comment
Hide comment
@piotr-tobolski

piotr-tobolski Oct 25, 2017

@ScottStevenson in my mouse (Logitech M325) tilting scrollwheel triggers mouse buttons 4 and 5. I am not using any 3rd party drivers or other software. I used Karabiner-EventViewer to check what events are triggered.

piotr-tobolski commented Oct 25, 2017

@ScottStevenson in my mouse (Logitech M325) tilting scrollwheel triggers mouse buttons 4 and 5. I am not using any 3rd party drivers or other software. I used Karabiner-EventViewer to check what events are triggered.

@ScottStevenson

This comment has been minimized.

Show comment
Hide comment
@ScottStevenson

ScottStevenson Oct 25, 2017

@piotr-tobolski Ah I see. I am using a Microsoft Sculpt mouse where tilting the scrollwheel outputs a "ScrollWheel" event in Karabiner-EventViewer with x and y coordinates/velocity.

After parsing through the source I am pretty sure this can't be referenced in the configuration at this time.

ScottStevenson commented Oct 25, 2017

@piotr-tobolski Ah I see. I am using a Microsoft Sculpt mouse where tilting the scrollwheel outputs a "ScrollWheel" event in Karabiner-EventViewer with x and y coordinates/velocity.

After parsing through the source I am pretty sure this can't be referenced in the configuration at this time.

@nawkwan

This comment has been minimized.

Show comment
Hide comment
@nawkwan

nawkwan Oct 30, 2017

@jimmy-biznessapps @hanamiche
The magic sauce of "pointing_button" didn't work for me. In fact, I've tried copying a slightly modified version (my_mouse.json) of hanamiche's mouse.json settings file under ~/.config/karabiner/assets/complex_modifications/mouse.json and it didn't map correctly. In fact, the rules didn't even show up under the Complex Modifications tab under KE's Preferences.
KE Log

KE Complex Modifications tab

UPDATE: Please ignore these screenshots, they don't offer any insight. Instead, read about my new finings in my next reply.

nawkwan commented Oct 30, 2017

@jimmy-biznessapps @hanamiche
The magic sauce of "pointing_button" didn't work for me. In fact, I've tried copying a slightly modified version (my_mouse.json) of hanamiche's mouse.json settings file under ~/.config/karabiner/assets/complex_modifications/mouse.json and it didn't map correctly. In fact, the rules didn't even show up under the Complex Modifications tab under KE's Preferences.
KE Log

KE Complex Modifications tab

UPDATE: Please ignore these screenshots, they don't offer any insight. Instead, read about my new finings in my next reply.

@hanamiche

This comment has been minimized.

Show comment
Hide comment
@hanamiche

hanamiche Oct 30, 2017

@nawkwan Hello. I think that ignoring the mouse when looking at the log.
Is karabiner-elements the latest beta version?
  (In my environment, it is 11.1.11)
Forgive me if I am wrong.

hanamiche commented Oct 30, 2017

@nawkwan Hello. I think that ignoring the mouse when looking at the log.
Is karabiner-elements the latest beta version?
  (In my environment, it is 11.1.11)
Forgive me if I am wrong.

@FatCash

This comment has been minimized.

Show comment
Hide comment
@FatCash

FatCash Oct 30, 2017

@hanamiche Thank you very much, works great! Have been waiting for mouse feature forever!

FatCash commented Oct 30, 2017

@hanamiche Thank you very much, works great! Have been waiting for mouse feature forever!

@nawkwan

This comment has been minimized.

Show comment
Hide comment
@nawkwan

nawkwan Oct 30, 2017

@hanamiche
Yes, I have updated to 11.1.11. The fact that the rules defined in your mouse.json don't even show up on the Complex Modifications tab suggests that something is wrong on my end. Since the last post, I've taken a closer look at the Log messages and compared it to the USB hardware on my MBP and have discovered where the conflict might be. But before I continue, I want to apologize for posting the previous screenshots of the Log and the Event Viewer, because they offer no insights.

This time around, I've disconnected all external USB devices from my MBP and restarted Karabiner-Elements.
screenshot 2017-10-30 05 33 40
(The activities that occur starting from the arrow is when I first inserted the USB receiver for the mouse)

After KE started, I inserted the mouse USB Receiver directly into my MBP. Here you might be wondering why KE detected and registered ("grabbed") two USB receivers. Well, that's because I have two device entries with the same vendor_id and product_id for the two Logitech USB receivers -- one for the keyboard, and the other one for the mouse. (Please see lines 234 and 256 of my karabiner.json) This is probably causing some confusion for KE, because it's recognizing the receiver as both for the keyboard and the mouse.

Now, what I don't understand is why the VirtualHIDPointing device is being ignored.

Here's the Devices listing:
screenshot 2017-10-30 07 44 19

Additionally, there are a few things I'd like to ask about putting settings json files under ~/.config/karabiner/assets/complex_modifications:

Take your mouse.json for example:

  1. Which profile(s) are the rules defined in mouse.json applied to when you stick it under the /complex_modifications directory?

  2. A follow up to 1): When you just stick that mouse.json file under the /complex_modifications directory, how does KE know what type of device are the rules for? There's no device-related information in mouse.json; you only have rules in there.

Can someone who has pointing_buttons working please share their karabiner.json file?

nawkwan commented Oct 30, 2017

@hanamiche
Yes, I have updated to 11.1.11. The fact that the rules defined in your mouse.json don't even show up on the Complex Modifications tab suggests that something is wrong on my end. Since the last post, I've taken a closer look at the Log messages and compared it to the USB hardware on my MBP and have discovered where the conflict might be. But before I continue, I want to apologize for posting the previous screenshots of the Log and the Event Viewer, because they offer no insights.

This time around, I've disconnected all external USB devices from my MBP and restarted Karabiner-Elements.
screenshot 2017-10-30 05 33 40
(The activities that occur starting from the arrow is when I first inserted the USB receiver for the mouse)

After KE started, I inserted the mouse USB Receiver directly into my MBP. Here you might be wondering why KE detected and registered ("grabbed") two USB receivers. Well, that's because I have two device entries with the same vendor_id and product_id for the two Logitech USB receivers -- one for the keyboard, and the other one for the mouse. (Please see lines 234 and 256 of my karabiner.json) This is probably causing some confusion for KE, because it's recognizing the receiver as both for the keyboard and the mouse.

Now, what I don't understand is why the VirtualHIDPointing device is being ignored.

Here's the Devices listing:
screenshot 2017-10-30 07 44 19

Additionally, there are a few things I'd like to ask about putting settings json files under ~/.config/karabiner/assets/complex_modifications:

Take your mouse.json for example:

  1. Which profile(s) are the rules defined in mouse.json applied to when you stick it under the /complex_modifications directory?

  2. A follow up to 1): When you just stick that mouse.json file under the /complex_modifications directory, how does KE know what type of device are the rules for? There's no device-related information in mouse.json; you only have rules in there.

Can someone who has pointing_buttons working please share their karabiner.json file?

@hanamiche

This comment has been minimized.

Show comment
Hide comment
@hanamiche

hanamiche Oct 31, 2017

@nawkwan Hello, thank you for the information.
My device list is the same Logitech. Even in my environment "USB Receiver" is the only one.
I have not used the Logitech keyboard, so I unchecked it.
2017-10-31 10 20 05

It is necessary to enable json in ~/.config/karabiner/assets/complex_modifications from the GUI.
It is merged into ~/.config/karabiner/karabiner.json and it becomes available. So I do not edit karabiner.json directly.
You can activate it for each profile. (Will it be an answer to 1.?)

I will post the procedure.
Karabiner-Elements Preferences -> Complex Modifications -> "Add rule"
2017-10-31 10 21 29

Since the rule list of the json file placed in ~/.config/karabiner/assets/complex_modifications is displayed
Please Enable All or Enable.
2017-10-31 10 21 57

In the Enabled rules, the selected rule will be displayed and ready to use.
(merged into ~/.config/karabiner/karabiner.json)
2017-10-31 10 22 13

I uploaded the ~/.config/karabiner/karabiner.json as it might be useful.

(I occasionally have Japanese but do not mind.😉)

I hope that it will work.

hanamiche commented Oct 31, 2017

@nawkwan Hello, thank you for the information.
My device list is the same Logitech. Even in my environment "USB Receiver" is the only one.
I have not used the Logitech keyboard, so I unchecked it.
2017-10-31 10 20 05

It is necessary to enable json in ~/.config/karabiner/assets/complex_modifications from the GUI.
It is merged into ~/.config/karabiner/karabiner.json and it becomes available. So I do not edit karabiner.json directly.
You can activate it for each profile. (Will it be an answer to 1.?)

I will post the procedure.
Karabiner-Elements Preferences -> Complex Modifications -> "Add rule"
2017-10-31 10 21 29

Since the rule list of the json file placed in ~/.config/karabiner/assets/complex_modifications is displayed
Please Enable All or Enable.
2017-10-31 10 21 57

In the Enabled rules, the selected rule will be displayed and ready to use.
(merged into ~/.config/karabiner/karabiner.json)
2017-10-31 10 22 13

I uploaded the ~/.config/karabiner/karabiner.json as it might be useful.

(I occasionally have Japanese but do not mind.😉)

I hope that it will work.

kbd added a commit to kbd/setup that referenced this issue Nov 1, 2017

Upgrade from Karabiner to Karabiner-Elements
As of the newest beta version (11.2.0 beta, curretly 1.1.11) it's
possible to modify mouse buttons, so I could finally switch.

tekezo/Karabiner-Elements#261 (comment)
https://github.com/tekezo/Karabiner-Elements/blob/master/NEWS.md#version-1120-beta

kbd added a commit to kbd/setup that referenced this issue Nov 1, 2017

@xbjconan

This comment has been minimized.

Show comment
Hide comment
@xbjconan

xbjconan Nov 5, 2017

Hi @jimmy-biznessapps
Do your json code have a modified function on the tilt and click of the scrollwheel on MS comfort sculpt mouse? If possible could you please share your json code with me/us?

Thank you

xbjconan commented Nov 5, 2017

Hi @jimmy-biznessapps
Do your json code have a modified function on the tilt and click of the scrollwheel on MS comfort sculpt mouse? If possible could you please share your json code with me/us?

Thank you

@ultimate-s

This comment has been minimized.

Show comment
Hide comment
@ultimate-s

ultimate-s Nov 6, 2017

Anybody have any idea why my Logitech G5 is ignored by Karabiner? It's not in the device list.

[2017-11-06 10:23:42.999] [info] [grabber] USB Gaming Mouse (device_id:2) is ignored.

[update] finally works on 11.2.0

        {
            "description": "Mouse button4 → command+[",
            "manipulators": [
                {
                    "from": {
                        "pointing_button": "button4"
                    },
                    "to": [
                        {
                            "key_code": "open_bracket",
                            "modifiers": [
                                "command"
                            ]
                        }
                    ],
                    "conditions": [
                        {
                            "type": "frontmost_application_unless",
                            "bundle_identifiers": [
                                "^com\\.microsoft\\.rdc\\.osx"
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        }

ultimate-s commented Nov 6, 2017

Anybody have any idea why my Logitech G5 is ignored by Karabiner? It's not in the device list.

[2017-11-06 10:23:42.999] [info] [grabber] USB Gaming Mouse (device_id:2) is ignored.

[update] finally works on 11.2.0

        {
            "description": "Mouse button4 → command+[",
            "manipulators": [
                {
                    "from": {
                        "pointing_button": "button4"
                    },
                    "to": [
                        {
                            "key_code": "open_bracket",
                            "modifiers": [
                                "command"
                            ]
                        }
                    ],
                    "conditions": [
                        {
                            "type": "frontmost_application_unless",
                            "bundle_identifiers": [
                                "^com\\.microsoft\\.rdc\\.osx"
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
@jimmy-biznessapps

This comment has been minimized.

Show comment
Hide comment
@jimmy-biznessapps

jimmy-biznessapps Nov 6, 2017

@xbjconan -- nope, I'm leaving that as-is. Sorry I can't help.

Also, turns out my other two MS Sculpt Comfort mice send different codes for the blue button... :|

jimmy-biznessapps commented Nov 6, 2017

@xbjconan -- nope, I'm leaving that as-is. Sorry I can't help.

Also, turns out my other two MS Sculpt Comfort mice send different codes for the blue button... :|

@rodneicouto

This comment has been minimized.

Show comment
Hide comment
@rodneicouto

rodneicouto Nov 9, 2017

Can i remap Command + Left mouse click to Control + Left Arrow and Command + Right Mouse to Control + Right Arrow? Is something like this?

  ` "manipulators": [
            {
                "from": {
                    "pointing_button": "RIGHT",
                    "modifiers": {
                      "mandatory": [
                        "command"
                      ],
                      "optional": [
                        "any"
                      ]
                    }
                },
                 "to": [
                    {
                      "key_code": "right_arrow",
                      "modifiers": [
                        "control"
                      ]
                    }
                  ],
                "type": "basic"
            }
        ]`

rodneicouto commented Nov 9, 2017

Can i remap Command + Left mouse click to Control + Left Arrow and Command + Right Mouse to Control + Right Arrow? Is something like this?

  ` "manipulators": [
            {
                "from": {
                    "pointing_button": "RIGHT",
                    "modifiers": {
                      "mandatory": [
                        "command"
                      ],
                      "optional": [
                        "any"
                      ]
                    }
                },
                 "to": [
                    {
                      "key_code": "right_arrow",
                      "modifiers": [
                        "control"
                      ]
                    }
                  ],
                "type": "basic"
            }
        ]`
@MrDesjardins

This comment has been minimized.

Show comment
Hide comment
@MrDesjardins

MrDesjardins Nov 22, 2017

For those who are looking to have the back button to their Microsoft Sculpt mouse on Mac 10.12 you can use the following configuration:

{
                        "manipulators": [
                            {
                                "description": "Mouse back",
                                "from": {
                                    "pointing_button": "button4"
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": [
                                            "left_command"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }

Inside /Users/YOURNAME/.config/karabiner/karabiner.json

Also, make sure that in the Karabiner preference you have checked Microsoft 2.4Ghz Transceiver v9.0 (Microsoft) with the "mouse" icon in the type column.

MrDesjardins commented Nov 22, 2017

For those who are looking to have the back button to their Microsoft Sculpt mouse on Mac 10.12 you can use the following configuration:

{
                        "manipulators": [
                            {
                                "description": "Mouse back",
                                "from": {
                                    "pointing_button": "button4"
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": [
                                            "left_command"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }

Inside /Users/YOURNAME/.config/karabiner/karabiner.json

Also, make sure that in the Karabiner preference you have checked Microsoft 2.4Ghz Transceiver v9.0 (Microsoft) with the "mouse" icon in the type column.

@connorsadlervelo

This comment has been minimized.

Show comment
Hide comment
@connorsadlervelo

connorsadlervelo Feb 9, 2018

Thanks very much for this thread, it helped me get my mouse4/5 buttons working as I like them.
Karabiner seems to have some great functionality in this area.
How do we "officially" share these excellent add ons?

connorsadlervelo commented Feb 9, 2018

Thanks very much for this thread, it helped me get my mouse4/5 buttons working as I like them.
Karabiner seems to have some great functionality in this area.
How do we "officially" share these excellent add ons?

@cdarsch

This comment has been minimized.

Show comment
Hide comment
@cdarsch

cdarsch Feb 23, 2018

For those of you using a Logitech bluetooth mouse (I have the MX Revolution), are you also using the Logitech bluetooth dongle? I lost mine so I connected via the built-in bluetooth on my mid-2011 Mac Mini. Unfortunately Karabiner isn't showing any mouse click events at all. It shows up under Devices and it's enabled (checked). Any ideas?

cdarsch commented Feb 23, 2018

For those of you using a Logitech bluetooth mouse (I have the MX Revolution), are you also using the Logitech bluetooth dongle? I lost mine so I connected via the built-in bluetooth on my mid-2011 Mac Mini. Unfortunately Karabiner isn't showing any mouse click events at all. It shows up under Devices and it's enabled (checked). Any ideas?

@stale

This comment has been minimized.

Show comment
Hide comment
@stale

stale bot Apr 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale bot commented Apr 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 24, 2018

@stale stale bot closed this May 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment