Inconsistent Modifier Keys and Layers

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
thomastthai
New User
Posts: 2
Joined: Mon Sep 23, 2019 5:56 am

Inconsistent Modifier Keys and Layers

Post by thomastthai »

XMBC Version: 2.19b1
Windows Version: Windows 10 Pro
Mouse Information (brand/model): Victsing PC106A
Relevant Computer Information (CPU, RAM etc): AMD Ryzen Threadripper 2950X, 16-Core, 128GB RAM
Did the problem occur after an upgrade of XMBC? (If so, from what version?): No
Did the problem occur after a Windows update/upgrade? (If so, from what version?): No
How long have you used XMBC?: 2 days
What language and keyboard layout do you use in Windows?: English QWERTY

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).: Thank you for this lightweight and very configurable utility. I'm new to using XMBC. I've read the manual, FAQ and all 8 pages of topics from search results of "layers modifier keys."

I'm testing out using modifier keys to switch between layers. Most of the modifier keys don't work. It depends on the program. More details below.

Test Setup
Three application profiles were added: DaVinci Resolve, MSPaint, and Notebook. Layer 1 and most of Layer 2 in each application profile were left at the default "**No Change (Don't Intercept)**" for all button and wheel settings. Mouse Button 4 (MB4) for each application's Layer 2 were set up as follows:

Resolve:
Mouse Button 4: Simulated Keys: Quit
Enter the custom key(s): {CTRL}Q
How to send the simulated keystrokes: 3 During (press down, release up)

MSPaint:
Mouse Button 4: Simulated Keys: Quit
Enter the custom key(s): {ALT}{F4}
How to send the simulated keystrokes: 3 During (press down, release up)

Notepad:
Mouse Button 4: Simulated Keys: Replace
Enter the custom key(s): {CTRL}H
How to send the simulated keystrokes: 3 During (press down, release up)

Manually Choosing Layer 2 Works
When selecting layer 2 by right-clicking on the XMBC icon and choosing layer 2, then pressing MB4, all three programs executed their respective custom keystrokes as expected.

Modifier Keys are Inconsistent
When activating layer 2 with different modifier keys or key combinations, the results were inconsistent as detailed below. The only setting that was changed from default under Settings/Modifier Keys tab was Activate Layer 2. Enabled modifier keys checkbox is checked. Below is a sample of the results using different modifier key(s). Layer 1 is set via the taskbar XMBC icon before each test. After changing modifier key(s), "OK" and "Apply" were clicked to make sure changes took place.

"Y" meant the assigned keystrokes were executed and worked. "N" meant the actions were witnessed via the X-Mouse Button Control window via highlights and changing to "Layer 2" tab, but the keystrokes weren't executed and the programs didn't execute those commands.

Activate Layer 2: Shift
Resolve: N
MSPaint: Y
Notepad: N

Activate Layer 2: Control
Resolve: Y
MSPaint: N
Notepad: Y

Activate Layer 2: Alt
Resolve: N
MSPaint: Y
Notepad: N

Activate Layer 2: Shift + Control
Resolve: N
MSPaint: N
Notepad: N

Activate Layer 2: Shift + Alt
Resolve: N
MSPaint: Y
Notepad: N

Activate Layer 2: Shift + Ctrl + Alt
Resolve: N
MSPaint: N
Notepad: N

Activate Layer 2: Control + Alt
Resolve: N
MSPaint: N
Notepad: N

Activate Layer 2: App Menu Key
Resolve: Y
MSPaint: Y
Notepad: Y

Activate Layer 2: App Menu + Ctrl
Resolve: Y
MSPaint: N
Notepad: Y

Activate Layer 2: App Menu + Alt
Resolve: N
MSPaint: Y
Notepad: N

Activate Layer 2: App Menu + Right Windows
When choosing this option, then clicking "OK", the "Apply" button on the main X-Mouse Button Control setup window was still ghosted out. Clicking on Settings / Modifier Keys again and reviewing the drop-down menu for Activate Layer 2 showed "App Menu + Alt" selected instead of "App Menu + Right Windows." The bug is repeatable.

I wasn't interested in testing Left Windows Key and Right Windows Key combinations, except for the one above.

Are the above results normal?

Thank you for your insights!
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Inconsistent Modifier Keys and Layers

Post by phil »

Yes this is perfectly normal I'm afraid.

This is covered in the FAQ (Why do layer modifier keys not work/interfere with operations?) and it has been discussed MANY times so I'm surprised your trawl through the forum didn't find the answer.
The reason they don't work is because you are holding a key down that impacts the result in the target program.

For example... if your modifier key is SHIFT and you send CTRL+Q, you are actually sending SHIFT+CTRL+Q (because you are manually holding shift down). So it will depend on the target program, and how they respond to the extra keys being held down, and also what modifier key you choose.

XMBC is unable to block modifier keys because it has no idea if you are using it as a modifier, or simply pressing the key to perform its normal function. This is a KNOWN and quite frequently discussed problem with modifier keys, and one for which I have not found a suitable solution, other than not to use modifier keys, and to do it other ways (like global hotkeys (where you don't have to keep holding the layer switching key) with a timer to return to layer 1, or by using button cording or some other method).
--[ 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)
thomastthai
New User
Posts: 2
Joined: Mon Sep 23, 2019 5:56 am

Re: Inconsistent Modifier Keys and Layers

Post by thomastthai »

Thank you Phil for your response. I did see similar posts in the past and in the FAQ, but didn't fully understand. I wanted to verify.

From my tests, applications are pretty consistent about how they each handle modifier keys. I'm curious about your thoughts on allowing the end-user the choice on how to handle these situations.

What would be the benefits of providing an additional section in each application's "Options" tab to remove or pass-through the qualifier key(s) before sending the rest of the key sequence to the application? For example:

Code: Select all

Qualifier Key Filters:

Key(s)                   Action
Shift                    [] Filter out        [X] Pass-through
Ctrl                     [] Filter out        [X] Pass-through
Alt                      [] Filter out        [X] Pass-through
Shift + Ctrl             [] Filter out        [X] Pass-through
...
App Menu + Right Windows [] Filter out        [X] Pass-through
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Inconsistent Modifier Keys and Layers

Post by phil »

That's an interesting idea and it might work - although its going to be of limited use as these keys are so often used (and can be used by other global hotkeys - I mean if you filter out ALT, then you wont be able to ALT+TAB out to any other application - so it might simply not work. Perhaps the first step will be to implement something in the backend/config file (as the GUI work will take the longest amount of time and will be a waste if it does not work!).

Of course, it would only account for the primary keys (SHIFT, CTRL, ALT, WIN (maybe but thats kind'a global), APPS, ALT GR (right alt) etc. It wont work for combos (CTRL+SHIFT) as that is just CTRL and SHIFT together, and your going to filter out/pass through one or both but you cant decide once you have received both!).

I'll see what I can do but its not going to be quick as I have a huge list of other things in the 2.19 beta run that I have been promising for too long now... So this will go somewhere near the bottom of that list I'm afraid!

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)
Post Reply