3rd Mouse button - double click except in games

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.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
tdimarzio
New User
Posts: 4
Joined: Sun Sep 29, 2024 4:42 pm

3rd Mouse button - double click except in games

Post by tdimarzio »

Please fill in this template when posting!
XMBC Version: 2.20.5
Installed or Portable version: Installed
Windows Version: 11 23H2
Mouse Information (brand/model): Zowie EC2-A
How long have you used XMBC?: Many years

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).: Am I doing this the right way? Is there a better way? I want middle mouse to double-click in Windows, but I don't want that behavior in games. So, for every new game I create a profile and save it. The default profile has middle mouse button set to double click. This works fine but is there a better way to have middle mouse double-click not occur in games, only outside of games? Screenshot of the behavior on imgur at path 6uMSoUc
User avatar
phil
Site Admin
Posts: 7755
Joined: Sun Apr 06, 2003 11:12 pm

Re: 3rd Mouse button - double click except in games

Post by phil »

Yes there is another way that may make life easier... You can create a single profile that is shared by multiple processes (games/apps whatever).
All you need to do, is put the process names in manually, separated with ||.

For example: calculatorapp.exe||notepad.exe||notepad++.exe||winword.exe
Untitled.png
This will mean that one profile will activate (in the above example) for four different applications (calculator, notepad, notepad++ and Word). That should help keep the list of profiles minimal, assuming they are all the same other than the middle mouse button!

You can also do it with regex in the advanced window profile, but that's probably more complex than you want, especially if you are not familiar with regular expressions!

Regards,
Phil
You do not have the required permissions to view the files attached to this post.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
tdimarzio
New User
Posts: 4
Joined: Sun Sep 29, 2024 4:42 pm

Re: 3rd Mouse button - double click except in games

Post by tdimarzio »

Thank you! Yes, I'm very familiar with regex and glad to know that's an option to help capture multiple possibilities. Is there any limit to the string length in the multi-app profile application field? I currently have about 130 profiles, each of which is just a default profile for a game, so it doesn't inherit the mouse button double click. This field would end up being over 1k characters pretty easily.
User avatar
phil
Site Admin
Posts: 7755
Joined: Sun Apr 06, 2003 11:12 pm

Re: 3rd Mouse button - double click except in games

Post by phil »

I'm not sure if there is a limit, I would have to dig through the code... I'm pretty sure there is a limit, but I cant remember off the top of my head. Its C++ so the string length is probably a fixed size buffer, and its probable 2000 characters but it may be less.

I'm at work right now with no access to my code at home so I'll have to get back you you.

It's a shame it cant be done by process path (which would be handy if all your games were installed under a games folder (or a Steam folder etc.)) but it just works with the process name itself, rather than any paths :(
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
phil
Site Admin
Posts: 7755
Joined: Sun Apr 06, 2003 11:12 pm

Re: 3rd Mouse button - double click except in games

Post by phil »

Ahhh remote desktop is handy... I had a quick sneak.. It looks like it is NOT limited... But the more that is in there, the slower it will be so I don't know if performance might be a problem with hundreds of process names in a single one... Probably not so much as to notice, but it does do the check quite often (as the mouse moves over different windows at least) so if you notice any performance issues or stutters, let me know.

String splits, compares are not to bad but doing hundreds in a loop, it could become an issue... Then again, iterating 130+ profiles and doing the string compare each time will all be doing the same amount of work if not more, so it could actually perform better!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
tdimarzio
New User
Posts: 4
Joined: Sun Sep 29, 2024 4:42 pm

Re: 3rd Mouse button - double click except in games

Post by tdimarzio »

Remote desktop is handy as long as your employer doesn't flag it as malicious via crowdstrike like mine! I even tunneled my RDP through SSH port forwarding and crowdstrike flagged me. I digress. Glad to hear the field length is not limited. Will definitely let you know if I see any performance issues with either the current 100+ profile way or combining process names with "||". Maybe my processor is fast enough that I just never noticed anything.

Yes, absolutely it would be great if it could match by parent path (maybe it could already with regex match?). All (most) of my games are under a few steam folders. There are some others from Epic, EA, and emulators, things not installed via game stores, etc., but would probably be like less than 20 entries as opposed to the 130+ and growing with each new game. Thanks for all your help btw and really excellent / essential tool!
User avatar
phil
Site Admin
Posts: 7755
Joined: Sun Apr 06, 2003 11:12 pm

Re: 3rd Mouse button - double click except in games

Post by phil »

Remote desktop is handy as long as your employer doesn't flag it as malicious via crowdstrike like mine! I even tunneled my RDP through SSH port forwarding and crowdstrike flagged me.
Been there, done that!... Luckily, now I work for a very small company, and I am in control of IT (and software, and coffee!) :)

Yeh XMBC is pretty small and light, so hopefully it will be OK... Not something that is used often though so let me know!

Unfortunately, even via regex it will not be possible because its just looking at the process name. I'm not sure if the path is there and stripped off (probably), but maybe its something I can add in a later version (regex and not regex).
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
tdimarzio
New User
Posts: 4
Joined: Sun Sep 29, 2024 4:42 pm

Re: 3rd Mouse button - double click except in games

Post by tdimarzio »

Great! Well, enjoy your proper coffee (ours is terrible) and much less draconian IT security 🙂 and thanks again for all the help. I'm much better informed now and will stay tuned to any future changelogs for mention of path support.
Post Reply