How to set double-click to close browser tab

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
pthesis
New User
Posts: 3
Joined: Tue Dec 15, 2020 6:23 pm

How to set double-click to close browser tab

Post by pthesis »

XMBC Version: Latest
Windows Version: 10
Mouse Information (brand/model): Dell touchpad
Relevant Computer Information (CPU, RAM etc): n/a
Did the problem occur after an upgrade of XMBC? (If so, from what version?): n/a
Did the problem occur after a Windows update/upgrade? (If so, from what version?): n/a
How long have you used XMBC?: new
What language and keyboard layout do you use in Windows?: Eng

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

Firefox and Vivaldi web browsers have this feature built-in: You can double left-click on the tab title (not "anywhere" on the web page) to close that tab.

I want to use X-Mouse Button Control to do this in Opera (and any other web browser later). I haven't been able to figure it out so far.

Can someone please give me a tutorial on how to set that up using X-Mouse Button Control software?

(I'm using a standard touchpad on a Dell laptop, not an actual mouse or some add-on device.)

pthesis
New User
Posts: 3
Joined: Tue Dec 15, 2020 6:23 pm

Re: How to set double-click to close browser tab

Post by pthesis »

Did I leave out some important information about what I'm trying to do?

Does anyone who uses Firefox or the Vivaldi browser know the feature I'm talking about, and trying to recreate in Opera and other browsers??

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

Re: How to set double-click to close browser tab

Post by phil »

Code: Select all

Did I leave out some important information about what I'm trying to do?
Does anyone who uses Firefox or the Vivaldi browser know the feature I'm talking about, and trying to recreate in Opera and other browsers??
No, please don't expect immediate responses from me (especially when your in a significantly different time zone!).
I use Firefox but I have never seen this behaviour (indeed it cant be default because double clicking my firefox tabs does nothing here).

Anyway....

XMBC can't detect and remap a double click, only individual button clicks. XMBC uses Windows mouse hooks and at that point in the system, there is no concept of double clicks - windows does that later on (higher up in the message chain).

XMBC can send multiple clicks when you press a button once - unfortunately I don't think that will help/is relevant in this case.

You *may* be able to do it still using a layer that resets to default if you don't click again in a given time (e.g. 0.5s), but it may be less reliable. You also have the difficulty of isolating the tab title (that's not going to be easy either) but we can try and narrow it down a bit (to the top window area maybe)...
If you want to try this, then:
  1. Create a profile for Opera - so if you setup an "specific window" profile for opera (presume its opera.exe but you can use the dragger tool to highlight the Opera window)
  2. Select the "Activate the profile only when the cursor is in the specified area" and use numbers like 0 (top), 0 (left), 40ish (bottom) -1 (right)
  3. For this profile, on layer one set the left button to Simulated keystrokes and enter {LMB}{LAYER2}
  4. On Layer two, set the left button to simulated keystrokes and in there type the keyboard shortcut for close tab for example: {CTRL}{F4} (in firefox its control+F4, I'm not sure about Opera)
  5. On layer two, turn on the "Switch to" layer 1 in 0.5s (note: be persistent typing 0.5 - it may give you an error a few times but it will let it in eventually!)
Apply it and try it. You may need to adjust the numbers in steps 2 and 5!
EDIT: On reflection this may break dragging the tabs around if you do this on the left button. So maybe its not an option!

XMBC can do lots but not this one is a bit of a hack and may be less reliable than one of the standard built in actions. If you could train yourself to use button held actions or button chording it would be more reliable I expect.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

pthesis
New User
Posts: 3
Joined: Tue Dec 15, 2020 6:23 pm

Re: How to set double-click to close browser tab

Post by pthesis »

You can enable this feature by:

1. Going to about:config
2. Adding the following key/value pair: browser.tabs.closeTabByDblclick , true

From what you've said though, it doesn't seem possible with X-Mouse, so thanks anyway for trying to help!

Post Reply