Windows Subsystem Linux terminal scrolling using keyboard
Mouse scroll works fine, but not the keyboard.
I suggest using AutoHotkey with the following script to enable Shift+PgUp and Shift + PgDn:
#IfWinActive ahk_class ConsoleWindowClass
+PgUp::
Send {WheelUp}
Return
+PgDn::
Send {WheelDown}
Return
#IfWinActive
Let have some little introduction. In Windows, Command Prompt is a shell, not a terminal. And wsl.exe
is a command line program. There are many terminal emulators with Unix-like terminal features for Windows.
For shared environment, using ssh with WSL (Windows Subsystem for Linux) is better option. Run sshd
daemon in WSL with sudo service ssh start
command (Here I skip the certificate exchange step). There are many articles and Q&A you can follow. Now the main part i.e. keyboard shortcuts. In Windows side, run ssh user_name@localhost
with any terminal emulator like putty, mintty, kitty, MobaXterm, ConEmu etc., all have that page up/down keyboard shortcuts built-in.
If you want to skip the hassle of ssh setup then you can use wsltty, which uses mintty (terminal emulator) and wslbridge (same as ssh but pre-configured). mintty has the keyboard shortcuts like previous examples.