Саш*_*ных 13 windows keyboard-shortcuts autohotkey sublime-text-3 windows-10
我只想禁用一些 Windows 10 默认全局热键,以使用此热键运行 Sublime Text 命令。
我有 Windows 32 位 10.0.14393。在 Windows 10 中,我们有许多本机热键。
例如,我想禁用自定义热键Win+K、Win+H和Ctrl+Win+P。
但是,例如,我不想禁用Win+D和Win+R热键。我经常使用这些热键。
{
"keys": ["super+k"],
"command": "paste"
},
Run Code Online (Sandbox Code Playgroud)
我的代码:
#k::return
Run Code Online (Sandbox Code Playgroud)
Win+K global hotkey is disabled for me, but my Sublime Text command paste
doesn't run too.
My code:
#IfWinActive ahk_class PX_WINDOW_CLASS
$#2::ControlSend, ahk_parent, % SubStr(A_ThisHotkey, 2)
#IfWinActive
Run Code Online (Sandbox Code Playgroud)
It is worked for me, but I have bugs, for example:
For other hotkeys I have bugs too. It would be nice if someone will improve this code.
SharpKeys program can disable or reassign Win key, but I don't want this.
I can disable some default hotkeys, but:
我下载简单的禁用键?我Win+K在程序中禁用?我重新启动Windows?Win+K对我来说没有禁用。
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
Run Code Online (Sandbox Code Playgroud)
我DisableHotkeys
用 value创建字符串参数KHPE
。
Win+E例如,对我来说是禁用的,但是
您可以使用 Autohotkey 重新映射任何热键,以使用Send命令发送另一个热键:
#k::
Send {WIN up}
Send {k up}
Send ^+p
return
Run Code Online (Sandbox Code Playgroud)
之后按 Win+K 将发送一个 Ctrl+Shift+P,它将在 Sublime Text 中显示命令面板,您可以使用这种方式覆盖任何热键以发送另一个热键,将其设置为 Ctrl+Shift+F3 之类的内容并分配该热键Sublime Text 的粘贴热键(在键绑定中),然后使用 Win+K 将 Ctrl+Shift+F3 发送到 Sublime Text,这将调用粘贴。
自动热键脚本:
#k::
Send {WIN up}
Send {K up}
Send !^+{F3}
return
Run Code Online (Sandbox Code Playgroud)
Sublime Text 按键绑定:
{ "keys": ["ctrl+alt+shift+f3"], "command": "paste" }
Run Code Online (Sandbox Code Playgroud)
编辑:
看到你的Please, don't offer AutoHotkey shortcuts redirect to other shortcuts.
为什么不呢?上面的示例甚至适用于 Win+R:
#r::
Send {WIN up}
Send {r up}
Send !^+{F3}
return
Run Code Online (Sandbox Code Playgroud)
在 Sublime Text 中通过 Win+R 成功粘贴文本。
编辑2:
如果您确实喜欢分配真正的热键,您可以禁用所有Win+{KEY}
热键,然后创建与默认热键相同的热键,Win+{Key}
并为另一个热键分配您自己的操作。
以 Win+R 为例:
explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
Run Code Online (Sandbox Code Playgroud)
有效,但对于某些热键来说,很难找到如何调用它们的操作。
归档时间: |
|
查看次数: |
5400 次 |
最近记录: |