Can I press buttons during mouse press and then another key when mouse key is released?

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 or images until they have at least 4 posts.
Post Reply
Flowgun
New User
Posts: 4
Joined: Sun Oct 06, 2019 1:07 am

Can I press buttons during mouse press and then another key when mouse key is released?

Post by Flowgun » Sun Oct 06, 2019 1:32 am

XMBC Version: 2.18.8
Windows Version: windows 10 1903
Mouse Information (brand/model): Logitech G502

long-time user (maybe 10 years or so) and I love the software. The subject basically says it all =)

for example, when I'm painting with photoshop, I want mouse button 5 to simulate pressing R and LMB during the mouse click so I can rotate the canvas, and when I release the button, I want to get back to the brush tool by pressing B.

Is this possible? I tried various combinations but I didn't succeed...
If not, please consider adding this functionality

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

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by phil » Sun Oct 06, 2019 9:02 am

Yes you can (as of version 2.17 I think). Its a bit more complex, but there are three new(ish) tags {OD} {OU} and {OR}.
So if you select the "During action" it will work as follows...
  • Anything prefixed with {OD} will ONLY happen when the button is pressed (down).
  • Anything prefixed with {OU} will ONLY happen when the button is released (up).
  • Anything without a prefix will work as before (pressed on press and released on release)
So this should work fro what you said..
{LMB}r{OU}b
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

User avatar
Kukurykus
Fanatic
Posts: 250
Joined: Sat Jul 02, 2016 1:15 pm

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Kukurykus » Sun Oct 06, 2019 10:56 am

r{LMB}{OU}b (with method 3 - DURING)

For some reason b is not pressed. What is more weird, when I select any tool (including brush) and then use LMB it is going to correctly select r tool, let for canvas rotation, but when I release LMB it selects back the tool that was selected before canvas rotation :/

btw is there any difference if I start above code from {OD}, and when exactly and what for insert {OR}?

Ps. this is powerful feature I was too lazy to test on 27th Dec 2018 (version 2.18), I will use from now on only you explain how it works, because as you see something fails or I can't figure it out. THX!
HAMA Roma, Rapoo 3920P
Windows 10 x64, Intel i5-4670K @ 3.40GHz, 8GB,
Intel(R) HD Graphics 4600, Intel SSD 179 GB HDD

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

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by phil » Sun Oct 06, 2019 11:37 am

OK I'm wrong, the {OD} {OR} and {OU} tags do nothing with DURING.
They probably should... but they don't.
So my answer was simply wrong.

Therefore I don't think its possible right now, with during, to achieve exactly what you want. I will change XMBC so they {OD} {OU} will work with during ({OR} wont ever work with during as thats only for repeating sequences)...
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

User avatar
Kukurykus
Fanatic
Posts: 250
Joined: Sat Jul 02, 2016 1:15 pm

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Kukurykus » Sun Oct 06, 2019 12:35 pm

Too bad. This feature would be most useful for me with 'during' method, and I'm not sure if only or mainly.

btw I made a post in other theard, then I deleted it and tried to repopst, but it said it needs your approval (probably some anti-spam system activated). You were on forum from then on here, so I'm not sure you missed that or you haven't got it. I tried to post it again, but again I got the same information.

https://forums.highrez.co.uk/viewtopic. ... 651#p20651
HAMA Roma, Rapoo 3920P
Windows 10 x64, Intel i5-4670K @ 3.40GHz, 8GB,
Intel(R) HD Graphics 4600, Intel SSD 179 GB HDD

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

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by phil » Sun Oct 06, 2019 6:00 pm

Too bad? You don't want me to change XMBC to make it work?
I will change XMBC so they {OD} {OU} will work with during ({OR} wont ever work with during as thats only for repeating sequences)...
It will be there and working as expected in 2.19 Beta 4!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

User avatar
Kukurykus
Fanatic
Posts: 250
Joined: Sat Jul 02, 2016 1:15 pm

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Kukurykus » Sun Oct 06, 2019 6:57 pm

Ah, I'm sorry, you are right again! You meant only {OR} won't ever be working with 'during' method ;)
HAMA Roma, Rapoo 3920P
Windows 10 x64, Intel i5-4670K @ 3.40GHz, 8GB,
Intel(R) HD Graphics 4600, Intel SSD 179 GB HDD

User avatar
Kukurykus
Fanatic
Posts: 250
Joined: Sat Jul 02, 2016 1:15 pm

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Kukurykus » Sun Oct 06, 2019 8:20 pm

Great job! r{LMB}{OU}b (with method 3 - DURING) works in v2.19 Beta 4!
HAMA Roma, Rapoo 3920P
Windows 10 x64, Intel i5-4670K @ 3.40GHz, 8GB,
Intel(R) HD Graphics 4600, Intel SSD 179 GB HDD

Flowgun
New User
Posts: 4
Joined: Sun Oct 06, 2019 1:07 am

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Flowgun » Tue Oct 08, 2019 8:14 am

Thank you Kukurykus for picking up on the issue and thank you Phil for the quick replies and even the quick update for X-mouse! I'm going to try it right now. Thank you a lot =D

Flowgun
New User
Posts: 4
Joined: Sun Oct 06, 2019 1:07 am

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Flowgun » Tue Oct 08, 2019 8:32 am

I just tried the 2.19 beta 4 (r{LMB}{OU}b) with During (3). It worked more often than not but it was inconsistent. tried adding a wait command after {OU} (r{LMB}{OU}{WAITMS:100}b) but it "b" wasn't pressed.
Maybe wait commands don't work on release after "during"? I hope this helps.

Anyway, I solved the inconsistency problem by adding the wait command just before {LMB}: r{WAITMS:100}{LMB}{OU}b). This worked perfectly. I tried to reduce the waiting time to 10MS but the inconsistency came back. I set it to 50MS (r{WAITMS:50}{LMB}{OU}b) and now it's smooth enough and it works every time =D

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

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by phil » Tue Oct 08, 2019 11:01 am

Glad your getting there.
The reason that B was not pressed when you did r{LMB}{OU}{WAITMS:100}b is that you applied the ON UP to the wait but did not also apply the ON UP to the 'b', so B would have been send when the button was pressed and cleared when the button was release, which is back to the original problem!. You have to prefix EVERY key AND TAG you want sent when then button is released with {OU}
You should try: r{LMB}{OU}{WAITMS:100}{OU}b

It might also be worth trying {OD}r{LMB}{OU}b - but if the delay is working prior to {LMB} then all is good I guess.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

User avatar
Kukurykus
Fanatic
Posts: 250
Joined: Sat Jul 02, 2016 1:15 pm

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Kukurykus » Tue Oct 08, 2019 4:15 pm

Wouldn't it be better to not preced every tag, so if there is {OU} that'd be bound to everything that's after?
HAMA Roma, Rapoo 3920P
Windows 10 x64, Intel i5-4670K @ 3.40GHz, 8GB,
Intel(R) HD Graphics 4600, Intel SSD 179 GB HDD

Flowgun
New User
Posts: 4
Joined: Sun Oct 06, 2019 1:07 am

Re: Can I press buttons during mouse press and then another key when mouse key is released?

Post by Flowgun » Wed Oct 09, 2019 6:39 am

Thank you Phil. Kukurykus stop being annoying xD

Post Reply