Keyboard 'Ctrl' provokes scrolling... Possible? How?

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
User avatar
markfilipak
New User
Posts: 6
Joined: Fri Jan 18, 2019 3:34 am

Keyboard 'Ctrl' provokes scrolling... Possible? How?

Post by markfilipak »

Hello. It looks like Phil has done a comprehensive job -- Thank you, Phil! I'm new to XMBC. I'm glad to be here. This is my first topic.

Is there a way to set up XMBC so that, while the user is depressing the keyboard 'Ctrl' key, in addition to being reported as cursor movement (the usual response), 'mickeys' are also reported as scrolls? In other words, scrolling is toggeled on and 'mickeys' are piped to the x-y scrolling inputs while the 'Ctrl' key is depressed (and only then).

I must confess that I don't know how Windows handles 'mickeys'. I imagine 2 possiblities:
1, If cursor position is document-centric, then the effect would be that the cursor appears to stand still while the mouse-moves scroll the document, or
2, If cursor position is window-centric, then in order to achieve the effect, 'mickeys' would need to be blocked instead of being passed to the API.
I believe that the earliest versions of Windows utilized window-centric mouse reports (i.e., #2), but that was a long, long time ago and I may be wrong.

I tried to create this effect and wound up having to assign it to a mouse button (rather than to the naked 'Ctrl' key). So, I assigned 'Ctrl' as a left mouse button modifier and tested the result. It did not go well. I managed to lock up the GUI in scroll mode (but fear not; I did find a way to recover by launching Task Manager via keyboard and then using it to kill the process, so that's not the reason for this topic).

Is it possible to achieve the desired effect? How?

Your thoughts are very welcome... Let the Rumpus begin!
Mark.
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Keyboard 'Ctrl' provokes scrolling... Possible? How?

Post by phil »

Hi Mark,

Its not currently possible. But I think there is an item on the todo list to enable this functionality which will probably go into the next version.
It will do this by adding an action to be enabled when switching to a layer (without having to press a button). Then you should be able to set that action to "Change movement to scroll". I haven't started to look at this yet so it may be more difficult than I imagine. Keep an eye on the 2.19 beta thread (when it gets created) to monitor progress/test/feedback :)

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)
User avatar
markfilipak
New User
Posts: 6
Joined: Fri Jan 18, 2019 3:34 am

Re: Keyboard 'Ctrl' provokes scrolling... Possible? How?

Post by markfilipak »

Thanks, Phil.

I'm having way too much fun exploring XMBC.

PS: Inability to block the 'Ctrl' key's transmittal to the application (TextPad in this case) is screwing the pooch.
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Keyboard 'Ctrl' provokes scrolling... Possible? How?

Post by phil »

Hi, yes the inability to block the keys is a known problem with layer modifier keys...
Unfortunately its simply not possible to block keys without breaking sooo much of Windows functionality.
I cant block the key on the assumption hat you *may* want to use it to switch layers, because if you don't, say you pressed CTRL+C, and the CTRL were blocked, then you wont COPY, you will simply type C... On top of that, If XMBC blocked the CTRL key and waited, and then realized it should not have blocked CTRL, it could inject a CTRL, but not before the second key (C) was sent, resulting in C+CTRL which again wouldn't work. And on top of that injecting keys does not always work - some (mostly games) blok injected input, leaving the key not working at all :(.

Put simply, I believe it too dangerous to block keys and thus have left it at that.
The only workaround is to use global hotkeys to switch layers and add a timer on the layer to switch it back.. That way no key needs to be held down while the layer is switched and the button pressed.

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)
User avatar
markfilipak
New User
Posts: 6
Joined: Fri Jan 18, 2019 3:34 am

Re: Keyboard 'Ctrl' provokes scrolling... Possible? How?

Post by markfilipak »

phil wrote: Fri Jan 18, 2019 9:27 am ... I cant block the key on the assumption hat you *may* want to use it to switch layers, because if you don't, say you pressed CTRL+C, and the CTRL were blocked, then you wont COPY, you will simply type C...
I hesitate to belabor (Amer. for "belabour") the point but consider:

'Ctrl' press: Block key & activate modifier ...
'Ctrl' release: Unblock key & deactivate modifier ...

OR

'Ctrl' press: Block key & activate modifier ...
'C' press: Send 'Ctrl+C' to application & unblock key & deactivate modifier ...
'Ctrl' release or 'C' release: Do nothing ...
XMBC 2.18.1 in Win10(x64) v.1803 + generic mouse driver + US keyboard
Acer Predator: Core i7-6700 (32GB DDR4) @ 3.3GHz + 1TB SSD-RAID +
3840x2160 UltraHD: Intel HD530 (1GB) + NVIDIA M980 (8GB GDDR5)
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Keyboard 'Ctrl' provokes scrolling... Possible? How?

Post by phil »

Yes it might work in some cases, but as I said, for anything that blocks simulated input, that wont work because the injected CTRL will not be received.
And that's quite a big problem - maybe it wont affect you but anyone that uses XMBC in apps/games that don't like injected keys will be screwed!
--[ 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