In Windows 7 how can I disable the function that activates the menu bar when Alt is pressed?
Are there some registry values to modify this behaviour?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityThe answer is no. How could they do that? If they did that, and someone disabled it, they would cut people off from very necessary menu items. It would be a nightmare.
The only thing you can do is live with that, or activate the menu permanently by clicking Organize>Layout>Menu bar.
alt
firing menu bar randomly is so annoying and disturbing.
I've been using AutoHotkey already, so I added this line to my script and it fixed this annoying behavior in almost all applications:
~LAlt Up:: return
It doesn't work in IE but I don't use IE anyway. :)
BTW, I also killed the annoying start menu popup via:
~LWin Up:: return
~RWin Up:: return
This autohotkey does work for me on Windows 10:
Alt::Return ;Disables the key alt when it's pressed alone
(Zengabor's answer did not work for me).
All the glory to Rohwedder
None of the AHK-based solutions posted here have worked for me. However, with some fiddling, I figured out that if you pair ALT with any other key before it is released, it won't act to highlight the menus. Rather than waste a function key, I used an unassigned scan code that is never used for any other purpose.
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
Video explanation:
https://www.youtube.com/watch?v=vRld4bVFrpU&lc=UgzMjkQd4rbmvRDqU9h4AaABAg
Link to full script:
https://github.com/TaranVH/2nd-keyboard/blob/master/Taran's_Windows_Mods/Alt_menu_acceleration_DISABLER.ahk
I found this question because I have a new keyboard and sometimes accidentally hit the ALT key when typing emails in Gmail. The focus is lost and any following keystrokes are passed to my browser (which can have very annoying results sometimes).
The best solution I found, which is an improvement but not perfect, is with a keymapper program called KeyTweak, which as far as I understand, changes the registry.
In the program, you map Left Alt to Right Alt, and Right Alt to Left Alt. This allows the Alt functions to still work somewhat (Ctrl-Alt-Delete). However, Alt-Tab is partially broken (at least on my Windows-7). It allows you partially to move to the other applications, but when you release the Alt key, the "selection" of the next application isn't made (you can make it with a mouse-click, however).
It's too bad Windows doesn't have something to prevent loss of focus from errant Alt presses. The Shift and Ctrl keys don't have that effect, for example.
This one is interesting. I don't know of any programs besides Autokey. Or just end up writing a program. But no registry setting. That would break TONS of programs.
I was searching for a solution to the same problem: fixing how Windows reacts to "Alt+Shift" (change input language), but you mistype and press Alt, followed by Shift, with no overlap. In that case Windows would interpret the lone Alt as "select menu", the lone Shift does nothing, and any characters you press afterwards select and enter random menus you didn't intend to open.
When using a chat app like Skype and you are a foreign language speaker, switching with Alt+Shift is quite often, and you can do a lot of stupid things in the hurry.
@user3419297 pointed me to his solution here, which I modified to allow Alt+Shift to happen in all cases. It is only one #If more, but a very important one! The relevant excerpt:
; 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
My full script also enables two Linuxish features: Alt+F2 opens up a "quick launch command", and pressing the right Alt minimizes the currently active window:
;==============================================================================
; 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
This works in AHK v1.1.28+:
~LAlt::Send {Blind}{vkE8}
as found somewhere @MS
HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Preference
On
and set its value to 1Just posting a solution I found around. It kills any Alt
menu 100%
Alt::
KeyWait, Alt
return
LAlt Up::
if (A_PriorKey = "Alt")
return
return
If you prefer too, you can also restrict this solution to a single program:
#IfWinActive ahk_exe sublime_text.exe
Alt::
KeyWait, Alt
return
LAlt Up::
if (A_PriorKey = "Alt")
return
return
#IfWinActive