'Alt' prints '@' when it's remapped to an unassigned key code (vkE8 or vkFF)

Open
#2,036 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, powershell
Domain
cli

Research direction

Reproduce this in PowerShell 7.2 with PSReadLine enabled using the AutoHotkey vkE8 or vkFF mapping, then trace how those unassigned key signals are handled. Done means pressing the remapped Alt key produces no @ character, matching cmd.exe and PowerShell without PSReadLine.

Written by the indexing model from the issue text.

Description

Needs-Attention :wave: Needs-Triage :mag:

I'm using Autohotkey to suppress the annoying menukey functionality of the Alt key (selecting menu items on a single press of Alt). However, in PowerShell with PSReadline enabled it prints @ symbols instead of printing nothing
(this bug report is a copy of https://github.com/PowerShell/PowerShell/issues/14357 where I learned that the culprit is PSReadline (I don't get any @ symbols when loading Powershell without this module))

Environment

PS version: 7.2.0-preview.1
PSReadline version: 2.2.0-beta1
os: 10.0.19041.320 (WinBuild.160101.0800)
PS file version: 7.2.0.0
HostName: ConsoleHost
BufferWidth: 127
BufferHeight: 30000

Steps to reproduce

Assign the following Autohotkey (this is for v2, in v1 omit the ' symbols) mapping to the Alt key:

~Alt::Send '{Blind}{vkE8}'

This sends an unassigned key signal that should do nothing, but has the benefit of masking the menukey functionality (vkFF has no mapping, but still bugs Powershell).

Press the Alt key

Expected behavior

Nothing should be printed, just like nothing is printed in all the other apps (cmd.exe console, old system powershell.exe console or any other GUI app)


Actual behavior

I get an @ symbol printed instead

@
Dominant language
C#
Stars
4.4k
Forks
341
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/PSReadLine

All issues in PowerShell/PSReadLine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.