Bug - Simulated {PAUSE} sends {LCTRL}

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
ChowGuy
Member
Posts: 15
Joined: Sun May 22, 2016 4:49 am

Bug - Simulated {PAUSE} sends {LCTRL}

Post by ChowGuy »

Not a new or urgent problem with 2.13, as it exists in version 2.12 as well, but Simulated Keystrokes appears to send the wrong virtual code for {PAUSE}. According to my keysniffer, I'm getting vkc:11h when I should be getting vkc:13h. I get the same result with {VKC:!9} (decimal), so it's hard to work around. This is a problem since the only effective way to regain control of an MSTSC (Terminal Server) session in full screen is the keyboard command CTRL-ALT-PAUSE and I'd really like to be able to add that to my MSTSC profile.

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

Has it ever worked with XMBC and remote desktop? Ive tried before but ctrl+alt+pause seems to be handled very differently and I have never managed to simulate it despite several attempts in the past. That could be because its always sent the wrong codes, but you seem to be suggesting it has worked in the past? Any idea what version worked if it ever did?
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

PS: what keysniffer? sound like it might be usefull for my debugging?
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

ChowGuy
Member
Posts: 15
Joined: Sun May 22, 2016 4:49 am

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by ChowGuy »

I've only been using XBMC since version 2,12, so I can't say if it's ever worked before, but entering the PAUSE from the keyboard while XMBC is holding CTRL/ALT works. I have an application-specific profile tied to mstsc;IHWindowClass;UIContainerClass, and other RDC hotkey combinations sent from XBMC such as alt-home (Show remote start menu) are properly seen acted on.

Currently I'm using an app called ShowOff to display mouse and keyboard events. It runs in user mode so apparently just works off the message queue and is the least intrusive I can find. Theres;s no log or persistent display, just a single window showing the most recent event(s), but it's useful for testing scan-code re-mapping and things like this.

ETA: I should add that sending {PAUSE} alone in any profile is not seen correctly either, so it doesn't seem to be anything hinky in the way MSTSC handles that particular sequence. It's just that this is about the only place where the Pause/Break key still any use ;)

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

The interesting question - what does it send if you use the Windows on screen keyboard - because I found that that does not work with MSTSC either. I will have a look at ShowOff - sounds useful (and good that it does not log anything :)). Might get a chance at the weekend but its a bit of a busy period coming up so no promises.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

ChowGuy
Member
Posts: 15
Joined: Sun May 22, 2016 4:49 am

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by ChowGuy »

Good question. But I'm not sure how OSK handles input in general. Clicking on it should give it the input focus, so I wonder if it's sending the simulated keystrokes directly to the next window in the z-order rather then injecting them into the event queue.
Might get a chance at the weekend but its a bit of a busy period coming up so no promises.
No rush on my account. It was just one of those things that had me scratching my head wondering "Why doesn't that work?" Which is a feeling I suspect you're familiar with.

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

Yes indeed I am familiar with that! OSK uses the same SendInput API as XMBC I think which is pretty much why O stopped looking last time as I couldn't get that working either.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

ChowGuy
Member
Posts: 15
Joined: Sun May 22, 2016 4:49 am

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by ChowGuy »

[q] OSK uses the same SendInput API as XMBC[/q]

OK, your question about the OSK may have struck paydirt after all. After thinking about it I realized that while just about everybody including Microsoft says "ctrl-alt-PAUSE", the actual hotkey code must be "ctrl-alt-BREAK" since the control key is neccessarily pressed as well. Which is significant because the 101 (and presumably the 104/105) keyboard provides special translation of that key as well as SysReq and a couple others for backward compatability with the 84-key AT keyboard. It sends the key pair as a different scan code sequence then for the PAUSE/BREAK key by itself. Poking around on MSDN, I see the virtual code for that event is VK_CANCEL (03H) rather than VK_PAUSE (13h), which jibes with the CTRLBREAK I see from ShowOff/AutoHotKey. Neither Window's OSK nor a couple other virtual apps I tried duplicate this functionality, showing me just "PAUSE BREAK."

Unfortunately that doesn't help much either; entering {VKC:3} in XMBC sends SCROLLLOCK instead of CTRLBREAK, and the (unlisted) {BREAK} tag shows {RCTRL} so still no joy but maybe closer to the answer.


FWIW, I did find a reference to a macro key binding using the CTRLBREAK code on the AutoHotKey Forum, which gives me hope. The poster there notes that "it'll expand from windowed to fullscreen, but won't take me back" but I suspect he was trying to use the keyboard directly to trigger the macro. Once he's in full-screen the original keystroke would be passed to the Remote Session and not the handled/expanded on the local machine to be seen by the MSTSC process. XMBC shouldn't have that problem as it's still running and doing the expansion locally. Worth a shot anyway.

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

Well that is what I call a constructive discussion :). Well found. With this extra information I will have a play around and see if I can get any further. I'm not sure why VKC:3 does not work but at least it gives me something to go on.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

ChowGuy
Member
Posts: 15
Joined: Sun May 22, 2016 4:49 am

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by ChowGuy »

I'm not sure why VKC:3 does not work but at least it gives me something to go on.
Just to update you on the situation after playing around, I tried using {ctrl}{alt}(EXT:3} instead of (VKC:3} and it did indeed work as expected (once I added it to the correct profile - DOH! :oops: ) so the original objective has met if not the original subject line. Given that no one else seems to have ever noticed that the PAUSE tag doesn't work I'd say it's probably not worth worying about unless you'v got some other updates in the pipeline.

Thanks anyway for your attention, and pointing me in the right direction. Considering the number of comments I've found on various fora about ("How do I make my laptop send CTRL-BREAK in RDC?" I'd say the ability of XMBC to do it is worth noting.

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

Brilliant thanks for your persistence. I will certainly fix this in the next version - as actually someone else has noticed this and asked for resolution via facebook (that was when I couldn't figure it out last time).

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

Just to follow up on this, I was looking to fix this in XMBC but I have just tried the {CTRL}{ALT}{EXT:3} here and it dos not appear to work :(

How exactly have you got it setup and working - in the default profile or a specific profile (neither seem to work here on Windows 10).

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

FYI: In 2.14 Beta 2, {CTRL}{ALT}{BREAK} should work, as should just {CTRLBREAK} :)
I should make the beta available shortly. Find it in the 2.14 Beta thread.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

ChowGuy
Member
Posts: 15
Joined: Sun May 22, 2016 4:49 am

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by ChowGuy »

Sorry, just caught this.
How exactly have you got it setup and working - in the default profile or a specific profile (neither seem to work here on Windows 10).
In an application profile: mstsc.exe;IHWindowCLass;UIContainerClass

Simulted Keys (pressed)[{CTRL}{ALT}{EXT:3}]
Only send if... = True
Block original... = True
Randomize = False

Normally I have it as part of a layer on 4 (Xbutton1) together with some other MSTC-specif actions and simulated XB1/XB2 so I can send 1-5 through to the remote machine (I use a four-button trackball). Given that I have an MSTSC profile it would be pointless default profile as well since it's meaniness unless MSTSC has the focus anyway.

Works under Win7 with 2.14ß2 as well as 2.13.1, so I no idea why it's not working there.

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

Re: Bug - Simulated {PAUSE} sends {LCTRL}

Post by phil »

If did towrk, once I typed {EXT:3} correctly - I thought I had edited my post but apparently not :oops:
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Post Reply