Control+PageUp is not send correctly to the underlying shell/application
See original GitHub issueWhile tryijng out how good the VIM experience would be with PS Core, I stumbled upon a crucial key binding (Ctrl+PageUp for switching between tabs) that didnt work.
Steps to reproduce
vim
:nmap <C-PageUp> :echo "binding this key works"
# type Control+Page Up Key
# nothing happens
# verify that some keys get passed:
# type i to enter insert mode; type Control+V to enter a character verbatim; type Control+PageUp and see if something gets inserted (with me, it does - see screenshot)
Expected behavior
The Control+PageUp should be sent to the terminal in a way any X-Term recognizes it. Especially VIM bindings should work with it.
Actual behavior
Result of the previous walkthrough:
Environment data
I am using the default PowerShell Core terminal // not Windows Terminal
Name Value
PSVersion 7.0.0-preview.4 PSEdition Core GitCommitId 7.0.0-preview.4 OS Microsoft Windows 10.0.18362 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Closing as a dupe of the conpty issue https://github.com/microsoft/terminal/issues/879
This has nothing to do with PowerShell, you can reproduce the issue running vim directly or from cmd or in another terminal emulator like alacritty.
@kilasuit definitely not. Readline has nothing to do with it. In my example, I had VIM running which processes stdin (and does not recognize C-PageUp correctly), readline would not see it.
It may well be that VIM is at fault and just does not “speak” powershell special characters. That is, does not know how powershell escape characters look like for every modifier. Looking more into it, running it from cmd.exe has the same effect. It could be that my version of VIM just needs to be taught how escape sequences work under windows. Is anyone versed in this and knows where to get the exact escape sequences for modifier keys and keys like “PageUp”?
In sight of that I’d absolutely not mind closing this issue as not PowerShell specific, by the way.