De-bounce and startup API hooking

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
JagaTelesin
New User
Posts: 2
Joined: Mon Jan 09, 2023 6:34 pm

De-bounce and startup API hooking

Post by JagaTelesin »

XMBC Version: 2.19.2
Installed or Portable version: Installed (as Admin)
Windows Version: Windows 10 Pro (version 22H2, build 19045.2364)
Mouse Information (brand/model): Mad Catz R.A.T. 7 Mouse, using Mad Catz driver v7.0.60.6, 01/27/2017 (latest)
Relevant Computer Information (CPU, RAM etc): i7-6600k, 64GB Ram
How long have you used XMBC?: Recent install
What language and keyboard layout do you use in Windows?: English, Querty

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).:

I was under the assumption that XMBC (after installation and configuration) was set to load with Windows at startup, possibly hooking at a low level to better intercept mouse API calls. I've installed twice (second time as Admin), verified settings in the program, and it still isn't loading when Windows starts.

Primary issue: De-bounce doesn't appear to work consistently, even set as high as 110ms. The R.A.T. mouse on this system started hammering the primary (left) button a few months ago, and this was an attempt to alleviate that behavior. If it is set any higher than 110ms, natural double-clicks are unusable. Currently with 110ms set, some of the bouncing is deflected, but much of it is not. I was concerned the startup API hooking might be to blame.

For reference, I have de-bounce turned on, have tried "start timer when button is released (on/off seems to make no difference)", and have tried different timings for delay on de-bounce (from 70ms to 120). The manual only has boilerplate info (same as GUI) on the feature and it's possible uses.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: De-bounce and startup API hooking

Post by phil »

I'm afraid the de-bounce option is not all that reliable in my experience - I put it in when my mouse had similar issues, but ended up replacing the micro-switches in the mouse because the de-bounce is so ineffective. The problem is (I think, but I cant be sure as its been a while) that it works on messages through the windows low level hook, and timing at user level is never that accurate because of the windows scheduler/event framework.

Debug logging may be useful - if your button is consistently bouncing then turn on debug logging in settings/logging tab and then capture some bouncing buttons - the log should indicate every message it receives along with timing and probably log the de-bounce attempts. Send me a copy if you want me to have a closer look.

Having said that, XMBC should start automatically with windows by default - is the icon there in the system tray (or hidden part of the system tray - see the FAQ if your not sure what I'm talking about!). You can also look in task manager to see if the process is running! NOTE: XMBC autostart can be disabled on the startup tab in task manager - make sure it is a) in the start-up tab and b) not disabled at startup!

Also, with the XMBC setup GUI open, you should be able to see if the hook is correctly installed and functioning because the buttons should highlight in orange when pressed. If nothing is highlighting in orange, then either XMBC is not running, or the hook has been removed or overridden by another process hooking the mouse.

Regards'
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)
JagaTelesin
New User
Posts: 2
Joined: Mon Jan 09, 2023 6:34 pm

Re: De-bounce and startup API hooking

Post by JagaTelesin »

Thanks for the input Phil. (pun intended)

I've found the app was disabled in Windows startup (for whatever weird reason), and re-enabled it. I've also enabled logging and have briefly poked around in the file to see how it was structured (seems to be around events).

I don't know if the app filters based on application in the foreground - I've assumed that disabling the second profile and using just the first had an affect on all windows processes, regardless of which was focused.

If there's an event id/name in particular I should watch for, please let me know. Otherwise I'm simply searching on the term "bounce" and looking at nearby details. Cheers.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: De-bounce and startup API hooking

Post by phil »

The default profile should be in effect unless any other profile overrides it, so if you only have default (or disable any other profiles) then default should apply everywhere.

The de-bounce settings are (should be) at a lower level still (at least the de-bounce settings in the advanced settings tab) and should apply globally all of the time XMBC is active no matter what profile is active.

As to what to look for in the log, I would expect to see button messages (DOWN / UP) for the relevant button, and then something after that saying something along the lines "MouseHookLLProc: De-Bounce mouse button" or "MouseHookLLProc: De-bBounce mouse button" - yes I just found a typo while searching for the messages!!

Searching for bounce would be a good bet :). The log message should include the button and timings that try and explain why it is ignoring the message (e.g. ignoring RIGHT button DOWN as it only 13ms since the last time (<150ms)!)
--[ 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