Sublime Forum

No right click in macOS on ST3 build 3126 with Wacom Tablet

#1

Hello! I’ve got ST3 on my Mac (macOS 10.11.6) and I’m using a Wacom Tablet as my mouse. One of the pen’s buttons is mapped to right-click and another to double-click, yet ST3 doesn’t recognize any of the buttons. Pressing any button just results in a single left-click (using the command palette to turn-on the “show all commands” output in the logs shows “button1” commands issued for any button I click on my pen regardless of system-wide configuration, which works in every other app).

I’ve read that certain packages can mess with mouse mappings, but this issue remains even after disabling all plugins/packages.

Some features, like spell checking, just don’t work without the right-click. Please help!

0 Likes

#2

I have the same problem here.

0 Likes

#3

Same here! Neither the on-tablet or the pen right click works. Very annoying.

0 Likes

#4

there is no such command by default…

I suggest opening the ST console, typing sublime.log_input(True) Enter and sublime.log_commands(True) Enter and seeing what output you get when using the pen/tablet’s buttons. Although log_input seems to only log keyboard events, it might still be useful.

0 Likes

#5

Right. Those two commands are what I was referring to; specifically the sublime.log_commands(True) command.

I enabled both log commands you mentioned. Here’s the result:

command: drag_select {"event": {"button": 1, "x": 619.94921875, "y": 247.2890625}}
command: drag_select {"event": {"button": 1, "x": 620.45703125, "y": 249.5625}}

The first line is a left click. The second line is a right click. They are identical… Here’s the difference when I use a traditional mouse instead of my tablet:

command: drag_select {"event": {"button": 1, "x": 631.86328125, "y": 249.296875}}
command: context_menu {"event": {"button": 2, "x": 632.86328125, "y": 248.76953125}}

The first line is a left click. The second is a right click – properly recognized this time… So there’s a bug here. Every other app on my Mac works just fine with my Wacom pen tablet. Why doesn’t Sublime work just the same…?

1 Like

#6

Hello, has anyone found a solution yet?

0 Likes

#7

Hi,

I ran into this today when I moved from a Bamboo CTH-470 to a Bamboo MTE-450, which use different drivers.

I was able to find two solutions:

  1. Install the older drivers from Wacom’s site - http://www.wacom.com/en-us/support/product-support/drivers 5.3.6-6 (1/7/2015)
  2. Ctrl-click works, though is really awkward.

I rolled back to the old drivers and it seems to fix it.

0 Likes

#8

Thanks! This worked for me. I had to use driver “PenTablet_5.3.5-4.dmg”. I’m on Max OSX 10.11.6 with SublimeText 3125.

0 Likes

#9

OK, Wacom driver 5.3.6 or lower is not working well with Sierra, so I had to update the driver to 5.3.7-6 and this issue is back. It’s definitely a bug on Sublime’s part since all my other apps are working fine. Here is the log output for a:

left click
right click
middle click
4th click
5th click

:

command: drag_select {“event”: {“button”: 1, “x”: 186.47265625, “y”: 216.40625}}
command: drag_select {“event”: {“button”: 1, “x”: 223.5859375, “y”: 231.28515625}}
command: drag_select {“by”: “columns”, “event”: {“button”: 3, “x”: 244.5, “y”: 192.5}}
command: prev_view {“event”: {“button”: 4, “x”: 220.5, “y”: 245.5}}
command: next_view {“event”: {“button”: 5, “x”: 268.5, “y”: 213.5}}

It looks like someone forgot to map button 2 correctly.

How can we get this fixed? I use this older Bamboo/CTL-471 tablet because the pen on it is lightweight & the curved thumb button. The newer pens are heavier (Intuos Pro), and the regular Intous pens suck… they have no grip and the button is flat.

So, any help would be very much appreciated, as I hold this pen for many hours a day, and spend alot of time in Sublime… for now.

Thanks

FYI I am using ST3 build 3141

0 Likes

#10

Lame… looks like PhpStorm is doing the same thing. Not sure what’t the prob though, maybe it’s on Wacom’s side. :frowning:

0 Likes

#11

If I had one of the hardware devices you are having trouble with, it would likely be a trivial fix.

Most likely the driver is not setting the proper buttonNumber property on the NSEvent. My hunch from the info you provided is that they are not setting buttonNumber to 1 for NSRightMouseDown.

0 Likes

#12

@seekr Perhaps you can find a program that displays raw NSEvent info and you can test this theory?

0 Likes

#13

@wbond I’m happy to run a diagnostic program if you have one in mind. I don’t know of any.

0 Likes

#14

No, I don’t currently. Perhaps someone with this device can try to find one. Otherwise, the next time I am working on some Mac-specific stuff I can try to come up with a solution.

0 Likes

#15

Maybe, but my mouse right click works fine, and so does my trackpad. So, it’s something with this tablet/driver. The older version driver right click works, but everything else lags in Sierra.

Yah, it seems like it would be trivial, but my Wacom’s save my wrists from carpal well over 15 years ago… so I put a lot of importance to it. I have 15 years of right clicking with my wacom pen working fine, and all of the sudden it’s not… it’s a pretty serious hiccup in my workflow.

But this issue is also happening in PhpStorm, so I’m going to just retire this tablet.

Thanks for the help though!

0 Likes

#16

Yes, I do believe it is the driver. I think it is the driver not properly create the NSEvent object and not setting the buttonNumber to 1. See, normally buttonNumber is necessary with NSOtherMouseDown and NSOtherMouseUp, but it is also set for NSLeftMouseDown (to 0) and NSRightMouseDown (to 1). I’m sure some applications strictly work off of the type (NSLeft, NSRight) but for ST we utilize the buttonNumber property to support more buttons also. If the driver isn’t setting buttonNumber to 1 (as it should for properly compatibility), it most likely defaults to 0, which would make a right click show up as a left click.

I’d prefer not to change the input handling code with a guess, so I was hoping someone with a wacom and a little technical know-how could test it. I’m working on some other things right now, but if no one gets around to it, my plan is to put together a simple Python script you can run on your machine to confirm.

0 Likes

#17

Ahh, makes sense. OK, whenever you get around to making that script, I can test it. Thx!

0 Likes

#18

I was able to find a solution with this application, BetterTouchTool (https://www.boastr.net/), which can map input events to other ones. I set the upper pen button to “middle click” in the Wacom settings (since ST3 can recognize that click from the pen), then mapped the middle click to right click in that app. Works great. That BetterTouchTool app is only $8, so I’m happy with it.

I was also able to fix the issue in PhpStorm via it’s keymapping admin, so I’m :grin:

1 Like