question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control+PageUp is not send correctly to the underlying shell/application

See original GitHub issue

While 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: image


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:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lzybkrcommented, Oct 12, 2019

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.

0reactions
simleicommented, Oct 9, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Page up/Page down scrolling in WSL shell doesn't work #237
The page up/page down keys don't scroll in the WSL console (installed Debian from Windows store), neither do any combinations with Ctrl, ...
Read more >
Del, PgUp and PgDown input "~" in terminal : r/zsh
I've completely emptied my .zshrc file, so the terminal seemingly loads as default, but when I press delete, page up or page down,...
Read more >
tmux keyboard shortcuts not working properly
The default command key bindings are: C-b Send the prefix key (C-b) through to the application. C-o Rotate the panes in the current...
Read more >
Page up in Terminal - The UNIX and Linux Forums
Hi all-- I'm using a SunOS machine at my campus and my pageup and pagedown keys are unresponsive inside of vi. I'm not...
Read more >
Fix the OS X Terminal Home/End/Page Up/Down Keys
Set Action: to send string to shell: Set the string to \005 (or press Ctrl+e). Edit (or Add) the entry for Page Up....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found