Using a chord to insert emoji changes all emoji on the line to "??"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the issue in Windows Terminal with Set-PSReadLineKeyHandler and the Microsoft.PowerShell.PSConsoleReadLine insert entry point. Check how chord insertion and subsequent keypresses handle emoji, and verify that inserted emoji render immediately without changing existing emoji on the line.
Written by the indexing model from the issue text.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
N/A
Screenshot

Environment data
PS Version: 7.2.5
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.6
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 30
Steps to reproduce
Use this code to add a chord which inserts an emoji (I have tried a few emoji, it happens for all of them):
Set-PSReadLineKeyHandler -Chord 'CTRL+y' -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::insert('👍')
}
Then use the chord. First the emoji is inserted as ?? instead of the image, after pressing a normal letter or spacebar it turns into the image. Then using the chord again, the new emoji is inserted as ?? and all previously inserted emoji (the same emoji or different ones) change to ?? until pressing a normal letter or space returns them to being emoji.
Entering emoji through Windows' emoji keyboard (WIN+.) does not change the existing emoji in a line, and inserts them directly without entering ??. Then use the chord again, the emoji entered by Windows keyboard also turn to ??.
Expected behavior
Inserting an emoji makes it appear without needing any subsequent keypress to see them; existing emoji are unchanged while this happens.
Actual behavior
Inserting an emoji shows ?? until a subsequent keypress, and all existing emoji on the line turn to ?? until the subsequent keypress changes them back.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PSReadLine
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/PSReadLine#3470 · 3 reactions ·