命令提示符窗口 常用命令_如何使用键盘滚动命令提示符窗口

命令提示符窗口 常用命令

命令提示符窗口 常用命令

If you’re using a real Linux shell, you can usually scroll up from the keyboard, but sadly that’s not an option in the Windows command shell world. Naturally, we can fix this up with a little AutoHotkey magic.

如果您使用的是真正Linux Shell,通常可以通过键盘向上滚动,但是遗憾的是,这不是Windows命令Shell世界中的选项。 自然,我们可以使用一些AutoHotkey魔术来解决此问题。

Of course, there actually is a way to scroll the command prompt with the keyboard, but it’s really complicated and requires too many keystrokes to be useful. This is a better way.

当然,实际上有一种方法可以使用键盘来滚动命令提示符 ,但这确实很复杂,需要太多的击键才有用。 这是更好的方法。

image

What we’ll do to solve the problem is create an AutoHotkey script that makes it so whenever you press Shift+Page Up/Down,  or Ctrl + Up/Down, it will send a mouse wheel scroll command to the window, scrolling it up or down.

我们将解决此问题的方法是创建一个AutoHotkey脚本,使该脚本可以在您每次按Shift + Page Up / Down或Ctrl + Up / Down时向窗口发送鼠标滚轮滚动命令,并将其向上滚动或下降。

设置滚动窗口脚本 (Setting Up the Scrolling Window Script)

Create a new AutoHotkey script, or paste the following into your existing script:

创建一个新的AutoHotkey脚本,或将以下内容粘贴到现有脚本中:

#IfWinActive ahk_class ConsoleWindowClass+PgUp::Send {WheelUp} Return

#IfWinActive ahk_class ConsoleWindowClass + PgUp :: Send {WheelUp}返回

+PgDn::Send {WheelDown}Return

+ PgDn ::发送{WheelDown}返回

^Up:: Send {WheelUp}Return

^ Up ::发送{WheelUp}返回

^Down:: Send {WheelDown} Return

^ Down ::发送{WheelDown}返回

#IfWinActive

#IfWinActive

Once you’ve done so, save the script and double-click on it to start it up—you’ll be able to scroll the command prompt window with the keyboard now. Personally I prefer using Shift+Page Up or Down to scroll, since that’s the more Linux way to do it.

完成此操作后,保存脚本并双击以启动它-现在就可以使用键盘滚动命令提示符窗口。 就我个人而言,我更喜欢使用Shift + Page Up或Down滚动,因为这是Linux的更多实现方式。

If you want to add this to your startup to run every time you start your PC, open up a new Windows Explorer window and type in the following into the location bar:

如果要将它添加到启动中以在每次启动PC时运行,请打开一个新的Windows资源管理器窗口,然后在位置栏中键入以下内容:

shell:startup

shell:启动

image

Then simply put a shortcut to the AutoHotkey script into that folder.

然后只需将AutoHotkey脚本的快捷方式放入该文件夹。

Extra: if you like this one, make sure to read our article on how to enable Ctrl+V for pasting into the Windows command prompt.

附加:如果您喜欢这一点,请确保阅读我们的文章, 文章关于如何启用Ctrl + V粘贴到Windows命令提示符中

可下载的滚动窗口脚本 (Downloadable Scrolling Window Script)

Simply download, extract, and double-click on the script file. Note: if you want to remove the tray icon from the script when it’s running, you’ll need to add the #NoTrayIcon line to the beginning of the script.

只需下载,解压缩并双击脚本文件即可。 注意:如果要在脚本运行时从任务栏中删除任务栏图标,则需要在脚本的开头添加#NoTrayIcon行。

Download ScrollingCommandPrompt AutoHotkey Script

下载ScrollingCommandPrompt AutoHotkey脚本

翻译自: https://www.howtogeek.com/howto/27080/how-to-scroll-the-command-prompt-window-with-the-keyboard/

命令提示符窗口 常用命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值