Skip to content

~ dead key immediately produce ñ on bepo layout #5238

Open

Description

@Yinameah

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

No exception or nor error message

Screenshot

No relevant screenshot

Environment data

PS Version: 7.6.10
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.4.5
PSReadLine EditMode: Vi
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 229
BufferHeight: 48

Steps to reproduce

I’m using bepo layout that is available by default on windows : "French (Standard, BÉPO)"

On this layout, typing <altgr+n> produce a dead key ~ that can be combined with other characters

<altgr+n> -> ~
<altgr+n> -> ñ
<altgr+n> -> ã
<altgr+n><altgr+n> -> ~~

But what I get instead is ñ is always immediately produced on dead key hit :
<altgr+n> -> ñ~
<altgr+n> -> ññ
<altgr+n> -> ñã
<altgr+n><altgr+n> -> ñ~~

If I do Remove-Module PSReadLine then all goes back to functioning as expected. (i.e the first <altgr+n> doesn’t produce any character, and the second hit produce the expected one.

Note that bépo layout has many other deadkeys, but this one seem to be the only one problematic.

Note that if I run the following : _Set-PSReadLineKeyHandler -Chord 'Alt+?' -Function WhatIsKey and then type <altgr+n> I get Ctrl+Alt+ñ: Key is unbound
I tried to "remap" this but neither of

Set-PSReadLineKeyHandler -Chord 'Ctrl+Alt+ñ' -ScriptBlock {
    [Microsoft.PowerShell.PSConsoleReadLine]::Insert('X')
}
Set-PSReadLineKeyHandler -Chord 'Ctrl+Alt+n' -ScriptBlock {
    [Microsoft.PowerShell.PSConsoleReadLine]::Insert('Y')
}

Produce the expected result.

I don’t know much about internals of this, but I would be happy to test / reproduce further stuff is useful. This issue is quite annoying to me.

Final note : once in neovim, hitting <ctrl+n> in insert mode results in weird binding I couldn’t fully identified, that somehow result in a <ctrl+n> caught by neovim

Expected behavior

No spurious ñ in my command line when I want to cd ~

Actual behavior

Keep trying to go to cd ñ~ which is not a place, therefore I’m sad ;-(

Activity

  1. Yinameah commented on Nov 17, 2026

    @Yinameah
    Author

    Update :

    I gave this a try with other terminals, and noctty behaves the same than window terminal, but rio seems to work fine.
    So it’s not a pure PSReadLine bug, seems to interact with the terminal somehow.... Or at least rio does something that fixes the weird behavior, walk around it ...

    Ah, but if I do the WhatIsKey test above in rio, it dosen’t trigger at all when I type <altgr+n>, so at least it makes sense that it works. The dead key is never seen by PsReadLine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions