在Windows 7中按下Alt时,禁用菜单栏的激活


17

在Windows 7中,如何禁用在Alt按下时激活菜单栏的功能?

是否有一些注册表值可以修改此行为?

Answers:


2

答案是不。他们该怎么做?如果他们这样做了,并且有人禁用了它,那么他们将使人们脱离非常必要的菜单项。这将是一场噩梦。

您唯一可以做的就是使用它,或者通过单击组织>布局>菜单栏永久激活菜单。


9
应该是一个评论。
摩押

@Moab我以为是答案,但是我会更加清楚。
KCotreau

@KCotreau:就像您说的那样,有一种获取菜单栏的方法,因此对我来说,不需要ALT键来产生菜单栏。
mjsr 2011年

@voodoomsr但是,如果您没有ALT,并且以前没有永久暴露过它,那么您将被锁定,不是吗?
KCotreau

程序很容易在全局范围内禁用Alt,但是测试它很棘手。无法保证另一个程序不会在您之前截获调用。。。
surfasb 2011年

12

我已经在使用AutoHotkey,所以我在脚本中添加了这一行,并修复了几乎所有应用程序中的这种烦人行为:

~LAlt Up:: return

它在IE中不起作用,但我还是不使用IE。:)

顺便说一句,我还通过以下方法消除了烦人的开始菜单弹出窗口:

~LWin Up:: return
~RWin Up:: return

6
这个应该是公认的答案。

请参阅下面的答案,以获取也可以与Alt + Shift键组合一起使用的解决方案。
anrieff

3

我发现了这个问题,因为我有一个新键盘,有时ALT在Gmail中键入电子邮件时不小心按下了键。焦点丢失,随后的所有击键都传递给我的浏览器(有时可能会产生非常令人讨厌的结果)。

我发现的最佳解决方案是改进但不是完美的解决方案,是使用名为KeyTweak的密钥映射程序,据我所知,该程序会更改注册表

在节目中,您映射Left AltRight Alt,并Right AltLeft Alt。这使得Alt功能仍有些工作(Ctrl- - )。Alt Delete但是,Alt- Tab已部分损坏(至少在我的Windows-7上)。它允许您部分移动到其他应用程序,但是当您释放Alt键时,不会选择“下一个”应用程序(但是,您可以通过单击鼠标来进行选择)。

Windows太糟糕了,Windows无法阻止错误的Alt按键使焦点丢失。例如,ShiftCtrl键没有效果。


我使用类似的方法使用SharpKeys,重新映射注册表!:D
mjsr 2012年

通过SharpKeys重新映射(无法安装KeyTweak,只是退出而已。也许它不能在XP中使用?),重新启动,但是but 俩没有用
Hi-Angel

2

这个很有趣。除了Autokey,我不知道其他任何程序。或者只是结束编写程序。但是没有注册表设置。那会破坏大量的程序。


我尝试用AutoHotkey的,但我有问题,我两个问题解释说,我张贴在AutoHotkey的论坛上,这里是最相关:autohotkey.com/forum/viewtopic.php?t=74033
mjsr

2

在Windows 10上,此自动热键确实对我有用:

Alt::Return ;Disables the key alt when it's pressed alone

(Zengabor的答案对我不起作用)。

罗威德的所有荣耀


乍一看似乎可行,但是例如在按下并释放Alt之后再执行Ctrl-Z第一次无效。
Alexandre G

1

如@MS

  1. 按Windows键+ R,键入Regedit,然后按Enter。
  2. 导航 HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Preference
  3. 现在创建或修改一个调用的字符串值(REG_SZ)On并将其值设置为1
  4. 注销计算机以生效。

2
与其发布完全相同的答案(而不是多个问题),而是应该专门定制适合OP的答案。如果一个问题完全相同,并且可以由完全相同的答案回答,那么您应该标记为将一个问题作为重复项关闭,而不是发布重复的答案。
Mokubai

1
我没有时间搜索主持人应如何标记重复项,对不起,也许您可​​以这样做?而不是让支持解决方案的人大吃一惊。
Jens Marchewka '16

1

我正在寻找解决同一问题的解决方案:修复Windows对“ Alt + Shift”(更改输入语言)的反应,但是您键入错误并按Alt,然后按Shift,没有重叠。在那种情况下,Windows会将单独的Alt解释为“选择菜单”,而单独的Shift不执行任何操作,并且您随后按的任何字符都会选择并输入您不打算打开的随机菜单。

当您使用Skype等聊天应用并且您是外语用户时,经常使用Alt + Shift进行切换,您可以急忙做很多愚蠢的事情。

@ user3419297向我指出了他的解决方案,我对其进行了修改以允许在所有情况下都可以进行Alt + Shift。它只是一个#If more,但非常重要!相关摘录:

; Disable stand-alone Alt key press: make Alt purely a modifier key.
; The If statement is required to get Alt+Shift work as expected. If it's not
; there, only [Press Alt], [Press Shift], [Release Shift], [Release Alt] would
; trigger the input language change. The other, more common sequence would be
; [Press Alt], [Press Shift], [Release  Alt], [Release Shift], but AutoHotKey
; would block it before it reaches Windows if the "#If" isn't there.
#If not GetKeyState("LShift", "P")
~LAlt::
    KeyWait, LAlt
return

; Make Alt+Something still work:
~LAlt Up::
    Send, {LAlt Up}
return

我的完整脚本还启用了两个Linuxish功能:Alt + F2打开“快速启动命令”,然后按右Alt可以最小化当前活动的窗口:

;==============================================================================
; AutoHotKey script for "Linuxifying" Windows 8.
; Based on suggestions on SuperUser (http://superuser.com/questions/1147370)
; 
; Written by: Veselin Georgiev
; Date      : 2016-11-18
;==============================================================================

; Optional: Make Alt+F2 bring up the "quick launch command" Window.
; In this case, it simulates the Windows logo key press. On Windows 8, the
; cursor would be in the search bar, which nicely emulates launching a
; command.
!F2::
    Sleep 200
    Send {LWin}
return

; Disable stand-alone Alt key press: make Alt purely a modifier key.
; The If statement is required to get Alt+Shift work as expected. If it's not
; there, only [Press Alt], [Press Shift], [Release Shift], [Release Alt] would
; trigger the input language change. The other, more common sequence would be
; [Press Alt], [Press Shift], [Release  Alt], [Release Shift], but AutoHotKey
; would block it before it reaches Windows if the "#If" isn't there.
#If not GetKeyState("LShift", "P")
~LAlt::
    KeyWait, LAlt
return

; Make Alt+Something still work:
~LAlt Up::
    Send, {LAlt Up}
return

; Optional: Make the right alt key minimize the currently visible window.
~RAlt Up::WinMinimize A

1

这在我的系统中可以通过Autohotkey使用:

~LAlt::
KeyWait, LAlt
return

~LAlt Up::
Send, {LAlt Up}
return

它使LAlt纯粹充当修饰键,如果完全按下它,则不会触发任何动作(例如,激活当前活动窗口的菜单栏)。

编辑:

也试试这个


请参阅下面的答案,以获取也可以与Alt + Shift键组合一起使用的解决方案。
anrieff

1

这里发布的基于AHK的解决方案都没有对我有用。但是,经过一番摆弄,我发现如果您在将ALT与其他任何键配对之前将其释放,它将不会突出显示菜单。我没有浪费功能键,而是使用了未分配的扫描代码,该代码从未用于任何其他用途。

LAlt::
sendinput, {LAlt down}
sendinput, {SC0E8 down} ;this is the scan code of an unassigned key. As long as you nor the system never use it for anything else, it can be used in THIS way to cancel the menu acceleration.
;tooltip, Lalt is pressed
KeyWait, LAlt
; That line is important, so that ALT does not continuously fire as you are holding it down.
;tooltip, Lalt was released
return

LAlt up::
sendinput, {LAlt up}
sendinput, {SC0E8 up}
;;;Unlike my 2nd keyboard, this method does not use the scan code as a strict "wrapper."
;;tooltip, 
return


RAlt::
sendinput, {RAlt down}
sendinput, {SC0E8 down}
;;tooltip, Ralt is pressed
KeyWait, RAlt
;;tooltip, Ralt was released
return

RAlt up::
sendinput, {RAlt up}
sendinput, {SC0E8 up}
;;tooltip, 
return

影片说明:https
//www.youtube.com/watch?v = vRld4bVFrpU&lc = UgzMjkQd4rbmvRDqU9h4AaABAg

链接到完整脚本:https :
//github.com/TaranVH/2nd-keyboard/blob/master/Taran's%20Windows%20Mods/Alt_menu_acceleration_DISABLER.ahk


0

只是发布我发现的解决方案。它杀死所有Alt菜单100%

Alt::
KeyWait, Alt
return

LAlt Up::
if (A_PriorKey = "Alt")
    return
return

如果您也喜欢,也可以将此解决方案限制为单个程序:

#IfWinActive ahk_exe sublime_text.exe
    Alt::
    KeyWait, Alt
    return

    LAlt Up::
    if (A_PriorKey = "Alt")
        return
    return
#IfWinActive
  1. https://www.autohotkey.com/boards/viewtopic.php?p=248473#p248473
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.