54 keyboard windows-7 keyboard-shortcuts notepad text-editing
当我按下Ctrl+ 时Backspace,有时会插入一个小方块,而不是整个单词被删除。
问题只发生在一些文本框中;在其他人中,快捷方式就像它应该的那样工作。
开始菜单搜索框:有效
记事本:不工作
Notepad2:有效
火狐:有效
我正在运行 Windows 7 x64。
Ror*_*ane 31
您可以通过使用AutoHotkey覆盖Ctrl+Backspace快捷方式来修复此行为。使用给定的文件名和扩展名将以下代码保存在纯文本文件中,然后使用 AutoHotkey 启动脚本:
FixCtrlBackspace.ahk
; how to write scripts: http://www.autohotkey.com/docs/
#IfWinActive ahk_class CabinetWClass ; File Explorer
^Backspace::
#IfWinActive ahk_class Notepad
^Backspace::
Send ^+{Left}{Backspace}
#IfWinActive
; source and context: http://superuser.com/a/636973/124606
; relevant documentation links:
; writing hotkeys
; http://www.autohotkey.com/docs/Hotkeys.htm
; list of key codes (including Backspace)
; http://www.autohotkey.com/docs/KeyList.htm
; the #IfWinActive directive
; http://www.autohotkey.com/docs/commands/_IfWinActive.htm
; the Send command
; http://www.autohotkey.com/docs/commands/Send.htm
Run Code Online (Sandbox Code Playgroud)
您可能会发现从 GitHub 下载此脚本文件比自己创建文件并粘贴其内容更容易。
要在启动时自动启动此脚本,请将快捷方式添加到“开始”菜单中的“启动”文件夹中,如如何使程序在任何计算机上启动时运行中所述。
脚本的基本思想是这样的:
; how to write scripts: http://www.autohotkey.com/docs/
#IfWinActive ahk_class CabinetWClass ; File Explorer
^Backspace::
#IfWinActive ahk_class Notepad
^Backspace::
Send ^+{Left}{Backspace}
#IfWinActive
; source and context: http://superuser.com/a/636973/124606
; relevant documentation links:
; writing hotkeys
; http://www.autohotkey.com/docs/Hotkeys.htm
; list of key codes (including Backspace)
; http://www.autohotkey.com/docs/KeyList.htm
; the #IfWinActive directive
; http://www.autohotkey.com/docs/commands/_IfWinActive.htm
; the Send command
; http://www.autohotkey.com/docs/commands/Send.htm
Run Code Online (Sandbox Code Playgroud)
这会更改所有程序中的Ctrl+Backspace快捷方式,使其等效于按Ctrl+ Shift+ ?,选择上一个单词,然后按Backspace,将其删除。
这种选择并删除的解决方法虽然比键入一个框更好,但很脆弱。在已经使用Ctrl+ 的程序中不启用此快捷方式会更安全Backspace。这就是为什么我使用#IfWinActive
将热键限制为仅我知道不支持该快捷方式的程序的原因。
Jar*_*ley 24
您看到的“框”就是所谓的控制字符。显示该框是因为,正如您所发现的,并非所有程序都处理 ctrl+backspace 来删除单词。
此控制字符是 128 个字符的ASCII 字符编码方案中的 33 个“非打印”字符之一。
归档时间: |
|
查看次数: |
54985 次 |
最近记录: |