Page 1 of 1

How I can set double click on middle button = F9 ?

Posted: Mon Feb 11, 2019 5:43 am
by vladimirs
XMBC Version: 2.18.2
Windows Version: win7x64sp1
Mouse Information (brand/model): A4Tech N-708X
Computer Information: DualCore AMD Athlon 64 X2, 2600 MHz (13 x 200) 5000+, MSI K9N Neo v2/v3 (MS-7369) (3 PCI, 2 PCI-E x1, 1 PCI-E x16, 4 DDR2 DIMM, Audio, LAN), 8192 ?? (DDR2 SDRAM), ATI Radeon HD 2600 XT (256 ??)
Did the problem occur after an upgrade of XMBC or Windows?: No
How long have you used XMBC?: Several years
What language and keyboard layout do you use in Windows?: English, Russian

Clear description of the problem:
I want to set double click on middle button (wheel) = F9, but I can not find how set double or triple click on left, right, middle and 4 or 5 button. Can you help me?

Re: How I can set double click on middle button = F9 ?

Posted: Mon Feb 11, 2019 11:01 am
by phil
Sorry, XMBC currently has no concept of different actions for double or triple clicks.
The closes you have right now is button held (time dependent) where you can have different actions depending how long you hold the button down).

XMBC sees button down and button up messages only - the Windows mouse hook has no concept of double clicks (its done at a different, higher level) and unless remapped, does not block them from Windows. In order to differentiate between single and double clicks, XMBC would need to block all clicks until it knew what you intended and then re-inject simulated clicks if for example you only clicked once. This is a problem (maybe less so for the middle, 4th and 5th buttons) because many applications (games in particular) block injected clicks. So as of now I haven't even attempted to do this!.

Maybe in the future I could add support for this with similar tactics to those used in button chording and button timed actions but it will be quite a big job and therefore finding the time to do it will not be easy (I already have a list of things to look at for the next few versions). So, I will add this to the list but cant make any promises at this time.


Re: How I can set double click on middle button = F9 ?

Posted: Tue Feb 12, 2019 9:00 am
by vladimirs
Hello, Phil. Thank you for replay.
I understand. But middle button held (time dependent) is not for me...
May be XMBC can remember first-pressed button for double click and first- and second-pressed button for triple click? After that XMBC send my F9 or other action without any blocks. This function will be as "Add action", not "Replace action". Is it really for implementation?

Re: How I can set double click on middle button = F9 ?

Posted: Tue Feb 12, 2019 9:34 am
by phil
Would that really work? It would be a little easier but I think for the majority it would be pretty useless.

If the first press did action one, prior to the second click doing action 2 and the third click doing action 3 (assuming they are all withing the required time for double/triple click).... when you triple clicked you would end up with 3 actions all being played out?! I'm pretty sure that would not work for most people (including me!) :).

In that scenario, what would you set the initial click action to?

I suspect, even thought it would be more work and more testing etc, it would be more worthwhile to go down the block until the double click time expires and then send the appropriate action according to how many clicks were executed within that time (either re-inject the button or the mapped action). By adding a GUI option which looks a little like the button held configuration, allowing you to specify a time between clicks and an action for each click which would not be played out until the number of milliseconds between clicks expires. Similar to how the button held works but obviously not holding but "multi-clicking") - it may cause problems with games and use of the original button, in case of using "nothing (no change)" on the initial click but then you can always setup a profile for the games that does not use this method!


Re: How I can set double click on middle button = F9 ?

Posted: Wed Mar 06, 2019 4:17 am
by vladimirs
I asked my friend-programmer. He wrote for me small application using Gma.System.MouseKeyHook.dll.
So, we can forget this problem. Thank you.

Re: How I can set double click on middle button = F9 ?

Posted: Wed Mar 06, 2019 7:23 am
by Kukurykus
Share how your friend did that, so double and triple click as that's something others asked too, but it's not that easy to implement to XMBC. Maybe that programmer had some brilliant idea that's interesting for Phil.