Windows Subsystem Linux terminal scrolling using keyboard
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping
--
Chapters
00:00 Windows Subsystem Linux Terminal Scrolling Using Keyboard
00:32 Answer 1 Score 5
00:50 Accepted Answer Score 4
01:53 Answer 3 Score 2
02:21 Answer 4 Score 2
02:39 Thank you
--
Full question
https://superuser.com/questions/1408859/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windowssubsystemforlinux
#avk47
ANSWER 1
Score 5
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
ACCEPTED ANSWER
Score 4
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.
ANSWER 3
Score 2
I don't agree with Biswapriyo. The Windows 10 Terminal (Preview) is awesome and using it with VSCode is a pleasure. For instance, it automatically notices when you called code
in WSL and starts your Windows VSCode with the Remote Extension—very seamless.
Scrolling is possible with Ctrl+Shift+PgUP. Using both these modifiers seems to be the theme here.
ANSWER 4
Score 2
I use Windows Terminal. From PowerShell I can SSH into my virtual machines and use Ctrl+Shift+UP/DOWN (arrow keys) to scroll up or down, out of the box. Also works with WSL machines.