在 Windows 中创建自定义命令(不是应用程序)快捷方式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9664222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:21:17  来源:igfitidea点击:

Create a custom command (not application) shortcut in Windows

windowskeyboard-shortcuts

提问by Jose Faeti

Is it possible to create a custom command shortcut in windows to execute some basic actions, or modify the keys combinations of existing ones?

是否可以在 Windows 中创建自定义命令快捷方式来执行一些基本操作,或修改现有操作的组合键?

I suppose to have a greater flexibility I could just create some batch or perl (or whatever) scripts and just create application shortcuts for those, but I was wondering if Windows offer the flexibility to add custom command shortcuts, maybe via the registry?

我想有更大的灵活性,我可以创建一些批处理或 perl(或其他)脚本,并为这些脚本创建应用程序快捷方式,但我想知道 Windows 是否提供添加自定义命令快捷方式的灵活性,也许是通过注册表?

For example win 7 introduces the ALT+SHIFT+N shortcut to create a new folder, which is simply great. But before there was no shortcut for this kind of basic operation, and it's something that somebody may like to implement if missing.

例如win 7引入了ALT+SHIFT+N快捷键来创建一个新文件夹,这简直太棒了。但之前这种基本操作没有捷径可走,如果缺少,可能有人想实现。

回答by Ankit

This is not exactly what you want.

这不正是您想要的。

  • But I think this might be helpfulHot Key Controls(Developer's Choice)

  • If you just need custom Keyboard shortcuts for Triggering an action try Auto Hot Key.
    (End Users' Choice)

  • 但我认为这可能会有所帮助Hot Key Controls(Developer's Choice)

  • 如果您只需要自定义键盘快捷键来触发操作,请尝试使用Auto Hot Key
    (最终用户选择)

I prefer using Auto Hot Key,

我更喜欢使用自动热键,

  • It is open-source utility for Windows.
  • It offers many features besides application launching,
  • you can make any key or mouse button act as a modifier key.
  • You can even OVERRIDE Windows' own shortcut keys such as Win+E and Win+R.
  • You can also automate a lot of other actions using it.
  • 它是 Windows 的开源实用程序。
  • 除了应用程序启动之外,它还提供许多功能,
  • 您可以将任何键或鼠标按钮用作修饰键。
  • 您甚至可以覆盖 Windows 自带的快捷键,例如 Win+E 和 Win+R。
  • 您还可以使用它自动执行许多其他操作。

回答by Dave

Tasklayout always helps me to open my favorite folders and applications with hotkeys. I have created additional layouts to lock current Windows session, to hibernate my workstation, etc. The point is: Tasklayout allow user to specify actual command line that should be executed when layout is restored. Thus, you can configure Tasklayout to run any commands with a shortcut.

Tasklayout 总是帮助我使用热键打开我最喜欢的文件夹和应用程序。我已经创建了额外的布局来锁定当前的 Windows 会话、休眠我的工作站等。重点是:Tasklayout 允许用户指定在布局恢复时应该执行的实际命令行。因此,您可以将 Tasklayout 配置为使用快捷方式运行任何命令。