cmd.exe是一个shell and not a terminal. Many terminals actually have their own way to scroll the console window without passing the shortcut key to the shell so you can easily scroll any shells running in it including cmd
旧版 Windows 中的默认终端是conhost.exe,它的滚动功能可以通过Alt+ Space、E、/或/访问,正如 Remirol 回答的L那样(更新:现已删除),它也适用于 PowerShell,因为 PowerShell 默认情况下也使用 conhost。但 PowerShell 已经有了自己更方便的滚动快捷方式/ 。其他 shell 可能有类似的键,例如UpDownPageUpPageDownPageUpPageDownShift+PageUp/PageDown in bash. Unfortunately cmd only has a key to scroll by line and not by page
If you use another better terminal then they likely have their own scrolling shortcut. For example
在Windows 终端(Windows 11 中默认并且可以安装到较旧的 Windows)中,快捷键可以在 中自行定义settings.json。这是一个可以添加到"keybindings"该文件中的数组的示例
// Unbind keys first from any other actions so that we can use
{ "command": "unbound", "keys": "ctrl+shift+pageup" },
{ "command": "unbound", "keys": "ctrl+shift+pagedown" },
{ "command": "unbound", "keys": "ctrl+shift+up" },
{ "command": "unbound", "keys": "ctrl+shift+down" },
{ "command": "scrollUpPage", "keys": "ctrl+shift+pageup" },
{ "command": "scrollDownPage", "keys": "ctrl+shift+pagedown" },
{ "command": "scrollUp", "keys": "ctrl+shift+up" },
{ "command": "scrollDown", "keys": "ctrl+shift+down" },
Run Code Online (Sandbox Code Playgroud)
在ConEmu(及其“扩展” cmder )中,有各种事件可以滚动Key.Buf*Up缓冲区Key.Buf*Dn。默认情况下Ctrl+Up/Down和Ctrl+PgUp/PgDn将分别用于滚动一行和一页
| 归档时间: |
|
| 查看次数: |
8547 次 |
| 最近记录: |