Suggestion (Right + Left click simultaneously)

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
Moda
New User
Posts: 1
Joined: Thu May 13, 2010 6:02 pm

Suggestion (Right + Left click simultaneously)

Post by Moda »

Hello,, and thanks alot for your nice software tool..

I would love it if I can use both clicks together to perform an action..
so my mouse will be 6 buttons rather than 5

like click both right and left buttons together to close a window (alt F4)

I'm sure its not impossible.. as I found it in many games.. Including "Tibia"


Thank you
111111
New User
Posts: 10
Joined: Fri Apr 09, 2010 6:16 pm

Re: Suggestion (Right + Left click simultaneously)

Post by 111111 »

That could be very nice, but it's more like mouse gestures :)
//if it will be implemented some day, i want "Hold Right Button then Left Click" and "Hold Left Button then Right Click" actions :D
User avatar
phil
Site Admin
Posts: 7681
Joined: Sun Apr 06, 2003 11:12 pm

Re: Suggestion (Right + Left click simultaneously)

Post by phil »

The problem is with all these gestures and combinations is that in user mode, its difficult to rely on timings... How do you know if your pressing two buttons when you get independent messages from Windows...

The only way to do it would be to queue up the messages and wait for a short time (which will be unreliable under heavy CPU load) before processing them, to see if there are two buttons around the same time ad treat that differently. This would delay all mouse button operations which I think would be undesirable to most people.

likewise, to do a "right button when left button is held down".... that's going to perform any left button down action first...

So unless anyone has some good ideas, I cant see a simple and effective way of doing it at user level...


Thanks,
Phil
--[ 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)
111111
New User
Posts: 10
Joined: Fri Apr 09, 2010 6:16 pm

Re: Suggestion (Right + Left click simultaneously)

Post by 111111 »

I didn't clearly understood you, isn't this script suitable:

Code: Select all

While  1

IF __IsPressed(0x01) THEN   ; IF LMB
  While __IsPressed(0x01)   ; While LMB
    IF __IsPressed(0x02) THEN  ; IF RMB
      Beep(3000,50) ; LMB was pressed before RMB, do Beep
    ENDIF
  WEnd
ENDIF

IF __IsPressed(0x02) THEN  ; IF RMB
  While __IsPressed(0x02)  ; While RMB
    IF __IsPressed(0x01) THEN ; IF LMB
      Beep(8000,50) ; RMB was pressed before LMB, do Beep
    ENDIF
  WEnd
ENDIF

Sleep(250)
Wend
//it's written with AutoIT
//i'm an engineer, not a programmer, so i don't know c++, c# or similar :oops:
//function __IsPressed() is described in attached file, it uses DLLCall to user32.dll, to read buttons statements
//infinite "while 1" loop is usual for AutoIT scripts
//"Sleep 250" (250 milliseconds) needed, 'cause otherwise script will use 99% of CPU
//and 250 is still to much, 'cause it detects more than 1 click, while i do single click
//it's difficult to me, to click faster than 250 ms

This have only 1 problem - LMB and RMB acts as usual, so then u click RMB while holding LMB, menu popups
(usual popup menu of RMB), don't know how to suppress it.
You do not have the required permissions to view the files attached to this post.
User avatar
phil
Site Admin
Posts: 7681
Joined: Sun Apr 06, 2003 11:12 pm

Re: Suggestion (Right + Left click simultaneously)

Post by phil »

In a way thats my point... Its all well and good giving me an autoit script but the design of that is completely different to XMBC. You may as well just use autoit if that's what you want (its always going to offer better scripting for the advanced user).

XMBC is right now quite a simplistic application that uses mouse hooks. Inside the mouse hook, you cant start waiting around in while loops because it will block all other mouse input. So that means the operation of XMBC would become a lot more complex, and that not only goes against the principles in XMBC but more perhaps importantly requires my time which quite frankly, I don't want to have to spend on XMBC where I can help it (its a hobby not a job - and my job involves too much software development to always be in the mood to get home and do more!).

I understand that its a useful feature to have, its just not that straight forward - perhaps one day I will find enough time to implement it - but I certainly make no promises.

Thanks,
Phil
--[ 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)
111111
New User
Posts: 10
Joined: Fri Apr 09, 2010 6:16 pm

Re: Suggestion (Right + Left click simultaneously)

Post by 111111 »

Thank, phil, for reply, now i know something about hooks :) (never read about before)
User avatar
phil
Site Admin
Posts: 7681
Joined: Sun Apr 06, 2003 11:12 pm

Re: Suggestion (Right + Left click simultaneously)

Post by phil »

I'm guessing AutoIT, at the basic level, also uses hooks... Its just they probably send off messages to separate threads to process the hook data thus leaving the hook thread to continue.

While I have dabbled with multi-threading in XMBC (for some of the simulated keystrokes) its not quite there yet at the level it would need to offload gesture processing.... Like I said, it will probably get there one day, and maybe with "simple" gestures like this, sooner rather than later, but no promises :)

Thanks,
Phil
--[ 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)
bap2703
New User
Posts: 1
Joined: Wed Aug 04, 2010 11:01 am

Re: Suggestion (Right + Left click simultaneously)

Post by bap2703 »

I am bringing back this subject to the top, so that if you have some free time you know what to do :angel: :mrgreen:

Allowing combinations of buttons would be a really great addition to the already wonderful xmouse.

For example in my case I am using the middle button +right or +left to perform wheel up/down (since my ergonomic mouse has no wheel).
User avatar
phil
Site Admin
Posts: 7681
Joined: Sun Apr 06, 2003 11:12 pm

Re: Suggestion (Right + Left click simultaneously)

Post by phil »

While I'm not committing to adding combinations to XMBC (the GUI will need far to much overhaul for now), you can actually already achieve this (to some basic extent) using layers.

On layer one, make the middle mouse button switch to layer 2 which it is held down.
On layer two, set the left/right buttons to mouse wheel scroll up / down

Hit apply

Now when you hold the middle mouse button, XMBC switches to layer 2 and the left/right buttons scroll the window.

Of course this does not help the original question of left+right simultaneously. thats a lot more complicated and layers just wont help.

Thanks,
Phil
--[ 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)
Post Reply