CadMouse Wireless Macro problem

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
Meende
Posts: 7
Joined: Wed Apr 10, 2019 8:59 am

CadMouse Wireless Macro problem

Post by Meende » Fri Sep 06, 2019 12:23 am

Hello.
Just got CadMouse Wireless and i love it, but i cannot program macro for 'Ctrl + Win + Right Arrow'. The problem i think is with arrow key part, i just cannot enable it and despite i press it do not show in macro window. I want to adress macro for a hotkey to switch between windows virtual desktops. Maybe there is another way to do it.

Thank you very much.

Intuos
Posts: 23
Joined: Tue Jun 19, 2018 8:01 am

Re: CadMouse Wireless Macro problem

Post by Intuos » Fri Sep 06, 2019 6:26 am

As you may have noticed, the driver's UI will no longer be active after execution of the macro, so it cannot record the macro entirely.
It may be possible to achieve this, but it requires some scripting. You could try to map the arrow key to a button and check in the generated XML what button is being reported. These files reside under: C:\Users\USERNAME\AppData\Roaming\3Dconnexion\3DxWare\Cfg and are generated per program. You could then combine the mapped arrow key with the Ctrl + Win-key macro using a text editor (Notepad++ is a good and free choice), don't forget to backup the files just in case. I don't know whether it is possible or not, since it's a macro reserved by Windows. Perhaps someone more knowledgeable could shed a light on this.

jwick
Moderator
Moderator
Posts: 2560
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: CadMouse Wireless Macro problem

Post by jwick » Mon Sep 09, 2019 1:05 am

The OS gets in the way of recording some of these macros (e.g., Alt+Tab thinks you want to switch apps).

You should be able to create this macro by editing the XML.
To keep the OS from acting on them, create a kb macro for each of the pieces. The combine them.
E.g.,

Code: Select all

		<MacroEntry>
			<ID>Ctrl-Win-Right Arrow</ID>
			<Sequence>
				<KeyPress>E0</KeyPress>   <!-- ctrl key -->
				<KeyPress>E3</KeyPress>   <!-- Win key -->
				<KeyPress>4F</KeyPress>   <!-- Right Arrow.  FYI, Left Arrow is 50 -->
				<KeyRelease>4F</KeyRelease>
				<KeyRelease>E3</KeyRelease>
				<KeyRelease>E0</KeyRelease>
			</Sequence>
		</MacroEntry>
The Key values (e.g., E0) are kb layout-specific. These were recorded on a EN-GB keyboard with an EN-US layout. It is possible that your kb may have a different layout. You may need to record them on your kb.

Make sure you release all keys you press. E.g., having a modifier key stuck down makes it very difficult to work with windows.

bogordo
Posts: 10
Joined: Tue Jul 16, 2019 1:43 pm

Re: CadMouse Wireless Macro problem

Post by bogordo » Mon Sep 09, 2019 1:32 am

Thanks, how can we know the IDs for differents keys?

My aim is to get "Alt gr+Tab" so i can reproduce the "Cycle apps" behaviour, not available for Revit.

jwick
Moderator
Moderator
Posts: 2560
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: CadMouse Wireless Macro problem

Post by jwick » Mon Sep 09, 2019 1:45 am

Those are hex HID usage codes. It is far easier to just record them in our GUI with your current kb layout. Record whatever keys work for you in Revit (one at a time).

bogordo
Posts: 10
Joined: Tue Jul 16, 2019 1:43 pm

Re: CadMouse Wireless Macro problem

Post by bogordo » Mon Sep 09, 2019 2:03 am

Sorry but i don't understand, so there is no way to know the codes so i can write my own combination in XML??

Now i was missing Cycle apps (achieved with "Alt Gr+Tab") and some other Macro available within Explorar, Chrome...but not Revit, AutoCAD...

jwick
Moderator
Moderator
Posts: 2560
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: CadMouse Wireless Macro problem

Post by jwick » Mon Sep 09, 2019 2:27 am

When you use our GUI to create a macro, it will write the needed codes into %appdata%\3Dconnexion\3DxWare\Cfg\Revit.xml (if you have Revit in focus at that time).

You can't create exactly the complex macro you want in the GUI because the O/S will intercept the keys before they get to the GUI. You have to edit the XML. If you record those keys separately, you can get the correct codes to create your own macro in the XML.

You can try to look up the keys in HID usage tables (available online) but they may not match your keyboard. It is far easier to use your current environment to record the keys needed by your current environment.

bogordo
Posts: 10
Joined: Tue Jul 16, 2019 1:43 pm

Re: CadMouse Wireless Macro problem

Post by bogordo » Mon Sep 09, 2019 3:44 am

Thank you,

In my case the windows jump before they get the Tab key, so just returned to macro editor and after clicking the box pressed Tab. Then edited the XML to rmeove the "left click" code...It works :D

Code: Select all

<MacroEntry>
      <ID>CYCLE</ID>
      <Sequence>
        <KeyPress>E0</KeyPress>
        <KeyPress>E2</KeyPress>
        <KeyPress>2B</KeyPress>
        <KeyRelease>2B</KeyRelease>
      </Sequence>
    </MacroEntry>

jwick
Moderator
Moderator
Posts: 2560
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: CadMouse Wireless Macro problem

Post by jwick » Mon Sep 09, 2019 3:58 am

That's terrific. Hopefully others will find this post useful.

You might want to add the explicit release of E0 and E2. The driver will try to release them for you if it notices a new application coming in focus. Having control keys stuck down makes for a bad day.

bogordo
Posts: 10
Joined: Tue Jul 16, 2019 1:43 pm

Re: CadMouse Wireless Macro problem

Post by bogordo » Mon Sep 09, 2019 4:22 am

Thank you, added to the end by the case (was not giving problems).

BTW don't understand why are 3 codes if i only use 2 keys (Alt Gr and Tab)...

Code: Select all

     <ID>CYCLE</ID>
      <Sequence>
        <KeyPress>E0</KeyPress>
        <KeyPress>E2</KeyPress>
        <KeyPress>2B</KeyPress>
        <KeyRelease>2B</KeyRelease>
        <KeyRelease>E0</KeyRelease>
        <KeyRelease>E2</KeyRelease>
      </Sequence>
    </MacroEntry>

jwick
Moderator
Moderator
Posts: 2560
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: CadMouse Wireless Macro problem

Post by jwick » Mon Sep 09, 2019 4:57 am

It looks like the Control key was pressed, followed by Alt key, then the Tab key.

I don't have that key on my keyboard to test. Possibly it is implemented in the kb as a Ctrl+Alt combination.
But if it works it works.

Post Reply