Terminal: Windows Terminal 1.1 breaks WinCompose input

Created on 27 Jul 2020  ·  3Comments  ·  Source: microsoft/terminal

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): 1.1.2021.0

Any other software?
Ubuntu 20.04 LTS (WSL2)
WinCompose v0.9.4 (https://github.com/samhocevar/wincompose/releases/tag/v0.9.4)

Steps to reproduce

  1. Start WinCompose and Windows Terminal (cmd, powershell, or WSL does not matter)
  2. Input any character using the WinCompose compose key
    e.g. rightAlt + o a

Expected behavior


The correct character ('å' in the above example) is sent to the terminal.

Actual behavior


Seemingly no character is sent, at least nothing is displayed.

Probably related to #6309 as setting "experimental.input.forceVT": true gives the expected behavior.

Area-Input Issue-Bug Needs-Tag-Fix Priority-1 Product-Terminal

Most helpful comment

As far as I can see, this issue was fixed in #7900. I'll close this issue for now as WinCompose works just fine on my end with the latest WT version.

The good thing is that I now finally understood, why we've been receiving weird key events, containing invalid scan codes, for third party applications employing SendInput: WT doesn't use TranslateMessage(Ex) properly. (I mean there's a very specific reason it doesn't... Namely the necessity to receive key events even for character keys.)

All 3 comments

Huh. This doesn't exactly work in the traditional console either, and it was somewhat of a fluke that it worked in WT. It _should_, though.

This is what I get if I peek at the key events coming out of WC into the traditional console:

v 001 0010 002a 0000 ^@   00000010
^ 001 0010 002a 0000 ^@   00000000
v 001 0000 0000 00f6 �    00000000
^ 001 00e7 0000 00f6 �    00000000
^ 001 004f 0018 006f o    00000000

and here's what I'm getting over the tap:

␛[255;0;0;1;16;1_␛[255;0;0;0;16;1_

that 255 definitely ain't right

So, how should a third-party application send Unicode characters to Windows Terminal if SendInput() no longer works by default?

As far as I can see, this issue was fixed in #7900. I'll close this issue for now as WinCompose works just fine on my end with the latest WT version.

The good thing is that I now finally understood, why we've been receiving weird key events, containing invalid scan codes, for third party applications employing SendInput: WT doesn't use TranslateMessage(Ex) properly. (I mean there's a very specific reason it doesn't... Namely the necessity to receive key events even for character keys.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carlos-zamora picture carlos-zamora  ·  3Comments

miniksa picture miniksa  ·  3Comments

mrmlnc picture mrmlnc  ·  3Comments

dev-logan picture dev-logan  ·  3Comments

TayYuanGeng picture TayYuanGeng  ·  3Comments