for example when you press alt+space it opens up the system menu
alt+F opens the file menus
alt+E opens the edit menu
Alt+[a random key] gives back a default beep
and so on
i tried Alt::Return but it doesn't seem to affect alt from accessing the system menu in combination with other keys.
How to prevent Alt Key from accessing Window menus?
-
- Posts: 6
- Joined: 30 Nov 2021, 00:15
Re: How to prevent Alt Key from accessing Window menus?
You want only the combinations associated with menus to do nothing? Or Alt itself to do nothing in any combination?
If it's the latter, use LAlt::return and/or RAlt::return. Alt:: triggers for either left or right but blocks neither, by design.
If it's the latter, use LAlt::return and/or RAlt::return. Alt:: triggers for either left or right but blocks neither, by design.
-
- Posts: 6
- Joined: 30 Nov 2021, 00:15
Re: How to prevent Alt Key from accessing Window menus?
I want the system to still detect that I am pressing down alt, just dont want alt to combine with any other button when I'm pressing it
-
- Posts: 6
- Joined: 30 Nov 2021, 00:15
Re: How to prevent Alt Key from accessing Window menus?
like if there was a way i could do something along the lines of
LAlt & [Any Key]::Return or something
LAlt & [Any Key]::Return or something
Re: How to prevent Alt Key from accessing Window menus?
You can use the Hotkey command in a loop to register many hotkeys.
Alternatively, you can selectively block keys by using InputHook.
Keys can be excluded by calling hook.KeyOpt(..., "-S") after the first KeyOpt call.
If you press an Alt+something combination, it will act like just Alt. More work is needed if you want to prevent the menu from being focused.
Alternatively, you can selectively block keys by using InputHook.
Code: Select all
block_alt_hotkeys(activate) {
static hook := InputHook("L0")
if activate {
hook.KeyOpt("{All}", "S")
hook.Start()
} else {
hook.Stop()
}
}
~*Alt::block_alt_hotkeys(true)
~*Alt up::block_alt_hotkeys(false)
If you press an Alt+something combination, it will act like just Alt. More work is needed if you want to prevent the menu from being focused.
Who is online
Users browsing this forum: CrowexBR and 270 guests