在 Word 中,有一个很酷的键盘快捷键可以插入带有符号的字母。例如,第一个À
字符,您需要按下ctrl键和`键,然后按下Shift和键A以创建带有重音符号的大写字母 A。(来源)
有没有办法将其扩展到所有窗口?
答案1
Word 和 drk.com.ar 提出的解决方案之间的区别在于
- 立即显示变音符号 (
'"^~`
),而不需要空格键 - 需要 ctrl + 变音符号,而不是只使用变音符号
如果您觉得这“不可接受”(像我一样),以下 AutoHotkey 脚本可以准确实现 Word 的功能,但其功能却是全系统的:
StringCaseSense, On
^'::
{
Input, char, L1
if char = a
Send á
else if char = A
Send Á
else if char = e
Send é
else if char = E
Send É
else if char = i
Send í
else if char = I
Send Í
else if char = o
Send ó
else if char = O
Send Ó
else if char = u
Send ú
else if char = U
Send Ú
else if char = c
Send ç
else if char = C
Send Ç
else if char = y
Send ý
else if char = Y
Send Ý
else
Send %char% ;ignores ctrl+' is if it isn't followed by any of aeioucyAEIOUCY
return
}
^`::
{
Input, char, L1
if char = a
Send à
else if char = A
Send À
else if char = e
Send è
else if char = E
Send È
else if char = i
Send ì
else if char = I
Send Ì
else if char = o
Send ò
else if char = O
Send Ò
else if char = u
Send ù
else if char = U
Send Ù
else
Send %char% ;ignores ctrl+` is if it isn't followed by any of aeiouAEIOU
return
}
^+6:: ; +6 is circumflex
{
Input, char, L1
if char = a
Send â
else if char = A
Send Â
else if char = e
Send ê
else if char = E
Send Ê
else if char = i
Send î
else if char = I
Send Î
else if char = o
Send ô
else if char = O
Send Ô
else if char = u
Send û
else if char = U
Send Û
else
Send %char% ;ignores ctrl+^ is if it isn't followed by any of aeiouAEIOU
return
}
^~::
{
Input, char, L1
if char = a
Send ã
else if char = A
Send Ã
else if char = i
Send ĩ
else if char = I
Send Ĩ
else if char = n
Send ñ
else if char = N
Send Ñ
else if char = o
Send õ
else if char = O
Send Õ
else
Send %char% ;ignores ctrl+~ is if it isn't followed by any of ainoAINO
return
}
^"::
{
Input, char, L1
if char = a
Send ä
else if char = A
Send Ä
else if char = e
Send ë
else if char = E
Send Ë
else if char = i
Send ï
else if char = I
Send Ï
else if char = o
Send ö
else if char = O
Send Ö
else if char = u
Send ü
else if char = U
Send Ü
else if char = y
Send ÿ
else if char = Y
Send Ÿ
else
Send %char% ;ignores ctrl+" is if it isn't followed by any of aeiouyAEIOUY
return
}
我将编译版本放在我的 Windows 启动文件夹中,以便自动使用这些快捷方式。
答案2
您可能会得到类似的行为:您必须将键盘设置为使用带有死键的布局。如果您使用西班牙语键盘,这种情况很常见。但您可以对英语键盘执行相同的操作。在 Windows 中,它称为美国国际键盘。您可以在控制面板>地区和语言>键盘和语言>更换键盘...
之后,当您按下单引号键',然后按下任意元音时,您将得到重音字符,例如 Á,如果您按下键`,然后按下元音,您将得到另一个重音 À。最后,如果您想打印单引号,您必须按下'键,然后按下space