View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001634 | OpenMPT | User Interface | public | 2022-10-30 19:51 | 2022-11-03 06:38 |
Reporter | c0d3h4x0r | Assigned To | Saga Musix | ||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 10 |
Product Version | OpenMPT 1.30.07.00 / libopenmpt 0.6.6 (upgrade first) | ||||
Target Version | OpenMPT 1.30.08.00 / libopenmpt 0.6.6 (upgrade first) | Fixed in Version | OpenMPT 1.30.08.00 / libopenmpt 0.6.6 (upgrade first) | ||
Summary | 0001634: Keyboard input largely (completely?) broken over Remote Desktop | ||||
Description | I want to use Remote Desktop from my iPad Pro to my PC to do some tracking from bed or while away from home. Sadly, keyboard input (in the pattern editor, at least) appears to be totally broken over Remote Desktop. I'm guessing OpenMPT leverages keyboard events/APIs that are lower level than the key down/up events sent over the wire by Remote Desktop. Is there any way to enable usage of higher level keyboard events to support working over Remote Desktop? Even if that means the custom keyboard mappings don't apply the same way, it's still better to be able to track with goofy key mappings than not at all; OpenMPT could even put up a warning dialog saying "you're using Remote Desktop, so keyboard mappings won't be applied", or something, if that's a technical limitation that cannot be overcome. | ||||
Steps To Reproduce |
ACTUAL: doesn't work | ||||
Tags | No tags attached. | ||||
Has the bug occurred in previous versions? | don't know | ||||
Tested code revision (in case you know it) | |||||
related to | 0001635 | resolved | Saga Musix | iOS RDP: typing into sample rate edit box double-registers each typed character |
I'm pretty sure I was able to use OpenMPT over RDP before, but that was from another Windows client. Maybe your iOS RDP client indeed synthesizes higher-level keyboard events ( |
|
It's the official Microsoft Remote Desktop client for iOS, and I haven't encountered this issue with any other Windows apps, so I don't think the explanation can be quite that simple. Is there any key event logging I can enable, or do you have a build with matching symbols I can use to set up some tracepoints with Visual Studio? |
|
I found this elsewhere online:
|
|
And elsewhere, I found this:
|
|
Most notably: arrow keys work for navigating around inside the pattern editor, none of the alphnumeric keys work, which seems to support the “scan codes versus unicode” explanation. |
|
It sounds like what iOS RDP sends are “virtual key codes” instead of the “scan codes” that would normally generate them. And sure enough, OpenMPT’s general key input handling relies entirely upon scancodes: https://github.com/OpenMPT/openmpt/blob/e0cdb885c09d888e14b03789762fd7743f580ee7/mptrack/InputHandler.cpp#L109 |
|
It looks like that function could/should additionally check |
|
typo correction: by examining the |
|
I don't think that should be required; |
|
No.
Debug symbols for all official releases are available at https://download.openmpt.org/archive/.symbols/ |
|
I downloaded and installed VS2022 and Win10SDK last night and successfully built and began debugging. The message being produced by the keypress from the iOS RDP app is VK_PACKET. That's about as far as I got before running out of steam for the night, but I'll keep digging. |
|
In this repro, the key I pressed on the iPad was
The message is: According to the MSDN docs, when the stack unwinds back to But before that can happen, another
0xe7 ( As expected, a few message pumps later, I see But neither |
|
Interesting remarks from https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-keybdinput:
It sounds like this might be a viable approach: Modify Thoughts? |
|
The alternative would be to rewrite all the existing keyboard handling to use "Raw Input": https://learn.microsoft.com/en-us/windows/win32/inputdev/about-raw-input |
|
Handling |
|
PR created: https://github.com/OpenMPT/openmpt/pull/12 |
|
Thanks, I can see that the same issue exists with the Windows on-screen keyboard, so I can round off the patch (e.g. by extending it to cover the other views such as sample and instrument editor) without RDP. Edit: No, I was wrong, the on-screen keyboard is fine. I was just testing the wrong pattern column... |
|
This should be fixed as of r18129 in all views, not just pattern view. |
|
Awesome, thanks! |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2022-10-30 19:51 | c0d3h4x0r | New Issue | |
2022-10-30 19:53 | manx | Relationship added | related to 0000713 |
2022-10-30 21:38 | Saga Musix | Note Added: 0005341 | |
2022-10-31 00:43 | c0d3h4x0r | Note Added: 0005342 | |
2022-10-31 01:04 | c0d3h4x0r | Note Added: 0005343 | |
2022-10-31 01:07 | c0d3h4x0r | Note Added: 0005344 | |
2022-10-31 01:12 | c0d3h4x0r | Note Added: 0005345 | |
2022-10-31 02:18 | c0d3h4x0r | Note Added: 0005346 | |
2022-10-31 02:24 | c0d3h4x0r | Note Added: 0005347 | |
2022-10-31 02:25 | c0d3h4x0r | Note Added: 0005348 | |
2022-10-31 18:21 | Saga Musix | Note Added: 0005350 | |
2022-10-31 18:22 | Saga Musix | Note Added: 0005351 | |
2022-10-31 20:01 | c0d3h4x0r | Note Added: 0005352 | |
2022-10-31 21:19 | c0d3h4x0r | Note Added: 0005353 | |
2022-10-31 22:12 | c0d3h4x0r | Note Added: 0005354 | |
2022-10-31 23:54 | c0d3h4x0r | Note Added: 0005355 | |
2022-11-01 00:22 | c0d3h4x0r | Note Added: 0005356 | |
2022-11-01 00:33 | c0d3h4x0r | Note Added: 0005357 | |
2022-11-01 15:29 | Saga Musix | Note Added: 0005358 | |
2022-11-01 15:29 | Saga Musix | Assigned To | => Saga Musix |
2022-11-01 15:29 | Saga Musix | Status | new => assigned |
2022-11-01 15:30 | Saga Musix | Note Edited: 0005358 | |
2022-11-01 16:17 | Saga Musix | Status | assigned => feedback |
2022-11-01 16:17 | Saga Musix | Note Added: 0005359 | |
2022-11-01 16:17 | Saga Musix | Target Version | => OpenMPT 1.30.08.00 / libopenmpt 0.6.6 (upgrade first) |
2022-11-01 16:35 | c0d3h4x0r | Note Added: 0005360 | |
2022-11-01 16:35 | c0d3h4x0r | Status | feedback => assigned |
2022-11-01 16:36 | Saga Musix | Status | assigned => resolved |
2022-11-01 16:36 | Saga Musix | Resolution | open => fixed |
2022-11-01 16:36 | Saga Musix | Fixed in Version | => OpenMPT 1.30.08.00 / libopenmpt 0.6.6 (upgrade first) |
2022-11-01 16:59 | Saga Musix | Relationship deleted | related to 0000713 |
2022-11-03 06:38 | c0d3h4x0r | Relationship added | related to 0001635 |