Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ignore ConsoleKey.Packet type as that is simply Unicode #2632

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Jul 1, 2021

PR Summary

When using IOS Remote Desktop client, the virtual keyboard sends keypresses as ConsoleKey.Packet which per documentation is used to pass Unicode characters, so we should not be ignoring those. The previous code ignored this, so those characters were dropped. Tested manually.

Fix #1428

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@daxian-dbw daxian-dbw merged commit ad74cef into PowerShell:master Jul 1, 2021
@SteveL-MSFT SteveL-MSFT deleted the packet-type branch July 2, 2021 21:58
@ghost
Copy link

ghost commented Oct 28, 2021

🎉 v2.2.0-beta4 has been released which incorporates this pull request. 🎉

@daxian-dbw
Copy link
Member

daxian-dbw commented Aug 11, 2022

Just to add more context information about the ConsoleKey.Packet: https://stackoverflow.com/a/66918568.

Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods.

INPUT_KEYBOARD supports nonkeyboard-input methods—such as handwriting recognition or voice recognition—as if it were text input by using the KEYEVENTF_UNICODE flag. If KEYEVENTF_UNICODE is specified, SendInput sends a WM_KEYDOWN or WM_KEYUP message to the foreground thread's message queue with wParam equal to VK_PACKET.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard not working with RDP windows host using iOS on pwsh 7.0.0
2 participants