Changing the functionality of MMB in SketchUp

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
Post Reply
JuJitsoup
New User
Posts: 5
Joined: Fri May 25, 2018 12:09 pm

Changing the functionality of MMB in SketchUp

Post by JuJitsoup » Tue May 29, 2018 7:16 pm

XMBC Version: Latest
Windows Version: 10 Pro
Mouse Information (brand/model): Logitech MX Master
Computer Information: Dell XPS 15 I7 (2017)
Did the problem occur after an upgrade of XMBC or Windows?: No
How long have you used XMBC?: Month
What language and keyboard layout do you use in Windows?: English

Clear description of the problem: When using SketchUp with a wheeled mouse when you click and hold down the MMB then drag the mouse the native Orbit command is activated. To activate the Pan command you do exactly the same but also hold down the Shift key. This is the opposite of the behaviour in many other CAD programs and its what I'm used to. I'd like to recreate this behaviour (click+hold MMB = Pan) in SketchUp (i.e swap the native SketchUp MMB functionality) using XMBC. I've looked into this and tried as many combinations as I could to try and get it to work but can't get there. Does anyone know if this is possible?

I have fixed the slow zoom issue in LayOut (SketchUp paperspace) using XMBC.

User avatar
phil
Site Admin
Posts: 5501
Joined: Sun Apr 06, 2003 11:12 pm

Re: Changing the functionality of MMB in SketchUp

Post by phil » Wed May 30, 2018 8:00 am

Well, if you want to make the MMB pan, then you could use simulated keystrokes and set method 3 (during) and use the key simkey sequence:
{SHIFT}{MMB}

... But that will then prevent MMB from working with orbit I suspect.... And to make orbit work when shift is held down is more tricky... You could make SHIFT change layers in XMBC while it is held down using layer modifier keys, but as you will be holding shift, SketchUp will see it and will still activate pan (I think). You could make another button pan (button 4 or 5 for example) using simkeys as above or use button chording so when you press and hold another button (eg. right) and + mmb, it enables orbit...
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

JuJitsoup
New User
Posts: 5
Joined: Fri May 25, 2018 12:09 pm

Re: Changing the functionality of MMB in SketchUp

Post by JuJitsoup » Mon Jun 04, 2018 11:33 am

phil wrote:
Wed May 30, 2018 8:00 am
Well, if you want to make the MMB pan, then you could use simulated keystrokes and set method 3 (during) and use the key simkey sequence:
{SHIFT}{MMB}
Phil, thanks, works perfectly to activate pan (instead of orbit) when MMB is clicked and held and mouse dragged around.
phil wrote:
Wed May 30, 2018 8:00 am
... But that will then prevent MMB from working with orbit I suspect.... And to make orbit work when shift is held down is more tricky... You could make SHIFT change layers in XMBC while it is held down using layer modifier keys, but as you will be holding shift, SketchUp will see it and will still activate pan (I think). You could make another button pan (button 4 or 5 for example) using simkeys as above or use button chording so when you press and hold another button (eg. right) and + mmb, it enables orbit...
....But I've looked into making this work but I can't see how to do it, there's so many options :?. Any chance you post up the steps so I can see if this works?

User avatar
phil
Site Admin
Posts: 5501
Joined: Sun Apr 06, 2003 11:12 pm

Re: Changing the functionality of MMB in SketchUp

Post by phil » Mon Jun 04, 2018 11:57 am

Which method do you want to try....

Option one... Choose another button to use... (Suggest 4 or 5 if you have them)
  1. For the chosen button, select simulated keystrokes
  2. In simulated keystrokes, type {MMB} and select method 3
Option two.... Button chording... Lets assume you want to chord the right button + Middle button... (so click and hold right and then middle - I'm not sure how easy that is with your fingers - you can always choose different buttons)
  1. For the chosen chord (e.g. right button) select button chording
  2. In button chording, tick the three boxes (Block/Delay, Unblock after & Unblock when the mouse moves) if they are not already ticked.
  3. In button chording, for the middle button (or any button of choice), select simulated keystrokes
  4. In simulated keystrokes, type {MMB} and select method 3
That should do it.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

User avatar
phil
Site Admin
Posts: 5501
Joined: Sun Apr 06, 2003 11:12 pm

Re: Changing the functionality of MMB in SketchUp

Post by phil » Mon Jun 04, 2018 11:59 am

Just a thought, is sketchup free - if it is I could grab it and try out these options before suggesting them - and create a profile for you to import
(when I get home form work of course! :wink:)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

JuJitsoup
New User
Posts: 5
Joined: Fri May 25, 2018 12:09 pm

Re: Changing the functionality of MMB in SketchUp

Post by JuJitsoup » Mon Jun 04, 2018 12:02 pm

phil wrote:
Wed May 30, 2018 8:00 am
You could make SHIFT change layers in XMBC while it is held down using layer modifier keys, but as you will be holding shift, SketchUp will see it and will still activate pan (I think)
Phil, apologies, should have been more clear. This is the option I want to try. i.e. trying to get SHIFT to change the PAN command into ORBIT when pressed. I don't really want to start using extra buttons as I've been using CAD software so long there's just no way I'll remember to press an additional button to activate it. If this doesn't work I'll have no choice but it will slow me down so I'd like to give this option a go first, to see if it works.

JuJitsoup
New User
Posts: 5
Joined: Fri May 25, 2018 12:09 pm

Re: Changing the functionality of MMB in SketchUp

Post by JuJitsoup » Mon Jun 04, 2018 12:39 pm

phil wrote:
Mon Jun 04, 2018 11:59 am
Just a thought, is sketchup free - if it is I could grab it and try out these options before suggesting them - and create a profile for you to import
(when I get home form work of course! :wink:)
Haha, yeah of course, don't let anything distract you from your work........ :D...It's not free, at least not anymore, they shifted the free version online, which is usless tbh. Last year it was free, SketchUp Make 2017. I've tried posting a link but won't let me for some reason. I'm on SU2018 but the principles have been ingrained in there for years so should work on all version.

Link is (you'll need to adjust)

https://help.sketchup dot com/en/article/60107

User avatar
phil
Site Admin
Posts: 5501
Joined: Sun Apr 06, 2003 11:12 pm

Re: Changing the functionality of MMB in SketchUp

Post by phil » Mon Jun 04, 2018 1:56 pm

Well the shift option is not really an option... as I said before... "but as you will be holding shift, SketchUp will see it and will still activate pan (I think)".
If you use shift as a modifier key, sketchup WILL see the shift so you will not be able to do anything but PAN.

You may be able to use another key (like CTRL or ALT), but it depends if there are any that don't have an adverse affect in Sketchup (ie. if CTRL+MMB or ALT+MMB already does something else they its going to be a problem).
  1. In settings, on the layer modifer tab, tick the box to enable layer modifier keys, then for layer 2, press the key you want to use (I'm pretty sure SHIFT wont work but you can try it I guess :))
  2. OK that, then on the main XMBC screen, select layer 2
  3. Make sure the MMB is set to 'Nothing Don't Intercept) which should cause the normal middle button to be passed through - in theory thats all you should need to do, but you could set the middle button to simulated keystrokes {MMB} - although leaving the middle button as 'No Change (Don't intercept)" should be exactly the same at that!
The only thing you could potentially do, is to use SHIFT as a global hotkey to switch layers - so you press and then release shift, then layer 2 MMB can work without shift being seen by the application (as you released it)...
  1. In settings, on the global hotkeys tab, tick the box to enable global hotkeys, then for layer 2, press the key you want to use (shift)
  2. OK that, then on the main XMBC screen, select layer 2
  3. For the middle button, select Simulated Keystrokes. Use method 3 (during) and the sim key sequence: {MMB}{LAYER:1} (I think that will press and hold the middle button and reactivate layer 1 - but I havn't tested it yet!)
NOTE: Modifier keys change the layer while the key is held down. Global hotkeys change the layer as the key is pressed, and it stays changed until you change it back (which you can do manually, or on a timer (defined on the layer), or using sim keys {LAYER:x}).

Then to use, tap shift to switch from PAN (layer 1) to ORBIT (layer 2).
NOTE: You probably want to do all of this on an application specific profile for sketchup rather than the default profile (else it will impact all applications!).

Thanks,
Phi
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

JuJitsoup
New User
Posts: 5
Joined: Fri May 25, 2018 12:09 pm

Re: Changing the functionality of MMB in SketchUp

Post by JuJitsoup » Mon Jun 04, 2018 3:14 pm

Almost works. If I set Layer 1 to Simulated Keys: (during)[{SHIFT}{MMB}] and Layer 2 to (during)[{SHIFT}] it will activate PAN when MMB is clicked and will change to ORBIT when SHIFT is clicked. However, when SHIFT is clicked again it won't revert back to ORBIT (with MMB still held down). It also won't go to ORBIT if SHIFT is held down (which is what I'm trying to achieve). It will though revert back to PAN if you release the MMB and click and hold it again. This behaviour repeats.

I also tried both of your suggested methods of using Hotkeys or Modifier keys. You said "press the key you want to use (shift)" but all I get under Hotkeys (Switch to Layer 2) is it flashes up "SHIFT +" and stays on the screen but when I release the SHIFT key on the keyboard it reverts back to "None" in the box, can't get it SHIFT to stick, as it were. When I tried the Modifier Keys option under "Activate Layer 2" I could select Shift from the grey dropdown but it didn't have any effect in SketchUp - should I add something into the extra box next to the dropdown?

Am I missing a step?

User avatar
phil
Site Admin
Posts: 5501
Joined: Sun Apr 06, 2003 11:12 pm

Re: Changing the functionality of MMB in SketchUp

Post by phil » Mon Jun 04, 2018 9:30 pm

JuJitsoup wrote:
Mon Jun 04, 2018 3:14 pm
Almost works. If I set Layer 1 to Simulated Keys: (during)[{SHIFT}{MMB}] and Layer 2 to (during)[{SHIFT}] it will activate PAN when MMB is clicked and will change to ORBIT when SHIFT is clicked. However, when SHIFT is clicked again it won't revert back to ORBIT (with MMB still held down). It also won't go to ORBIT if SHIFT is held down (which is what I'm trying to achieve). It will though revert back to PAN if you release the MMB and click and hold it again. This behaviour repeats.
Oh that's a new one... I didn't realize you could change between shift and orbit while holding the button down - thats going to be near impossible to deal with in XMBC because XMBC works with mouse buttons - that is, the key is pressing or releasing the mouse button.... Anything doen with shift in-between is not going to be seen by XMBC...
JuJitsoup wrote:
Mon Jun 04, 2018 3:14 pm
I also tried both of your suggested methods of using Hotkeys or Modifier keys. You said "press the key you want to use (shift)" but all I get under Hotkeys (Switch to Layer 2) is it flashes up "SHIFT +" and stays on the screen but when I release the SHIFT key on the keyboard it reverts back to "None" in the box, can't get it SHIFT to stick, as it were. When I tried the Modifier Keys option under "Activate Layer 2" I could select Shift from the grey dropdown but it didn't have any effect in SketchUp - should I add something into the extra box next to the dropdown?

Am I missing a step?
No your not missing anything - my bad... Global hotkeys don't work with just a "control" key like shift,ctrl,alt... its a combo... Oh well there goes that plan!

As I said, with layer modifiers, it almost certainly isn't going to work, because SketchUp will see the shift being pressed so will always activate PAN no matter what simkey sequence you select).

In fact, having just signed up and tried the "web" sketchup (not sure if there is a non-web version), I think the closest you will get (with XMBC at least) is what you already have already found above... {SHIFT}{MMB} which will PAN by default, then press (and release SHIFT) to switch to PAN... And then you have to release the button and press again to go back and stay in PAN mode... The fact that its in a browser makes it all the more difficult to create a profile to do this... You can create a profile for the browser but thats probably as far as you will get, so you may find this has adverse effects on other websites :(. You can create a profile that detects the site name, but this does not work well with tabbed browsers, i.e. changing the tab will not detect the profile change as the process/window hasn't changed :(

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Post Reply