aws-toolkit-vscode icon indicating copy to clipboard operation
aws-toolkit-vscode copied to clipboard

Amazon Q chat input does not work well with IME enabled

Open tmokmss opened this issue 2 years ago • 0 comments

Problem

When I type something into Amazon Q Chat with IME enabled, it will send my message as soon as I hit enter, where I expect not to send message but to continue to input following characters.

I think we need to specially handle keydown events using event.isComposing property (ref).

eventTarget.addEventListener("keydown", (event) => {
  if (event.isComposing || event.keyCode === 229) {
    return;
  }
  // do something
});

I know Amazon Q currently supports only English, but someday it will become problem when it starts to support CJK languages.

Steps to reproduce the issue

Enable Japanese keyboard, and type a -> i-> Enter.

Current behavior: あい is sent to chat.

image

Expected behavior

Expected behavior: あい is confirmed but not sent to chat. Instead we should be able to continue to write message.

System details (run the AWS: About Toolkit command)

  • OS: macOS
  • Visual Studio Code version: 1.84.2
  • AWS Toolkit version: 2.1.0

tmokmss avatar Dec 04 '23 02:12 tmokmss