Skip to content

Sending unicode character via KEYEVENTF_UNICODE/VK_PACKET in SendInput outputs the wrong characters #12977

Closed

Description

Windows Terminal version

1.12.10982.0

Windows build number

10.0.19043

Other Software

Reproducible in:

  • cmd.exe
  • wsl ubuntu 20.04

powershell just displays ?? , not sure which behaviour is more incorrect

Uses SendInput:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput

Steps to reproduce

Via SendInput, send the unicode character 🙁

E.g. in
https://github.com/jtroo/kanata/blob/master/src/oskbd/windows.rs#L168

Expected Behavior

The correct unicode value gets typed in: 🙁

Actual Behavior

The characters 翿翿 are typed in instead

Additional info

When copy-pasting the unicode character, it's rendered correctly (in cmd/wsl). It's just not typed correctly via SendInput.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Area-InputRelated to input processing (key presses, mouse, etc.)Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingPriority-2A description (P2)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions