Override HDR Shortcut Alt-Winkey-B?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 12:05

How can I override the Windows 11 shortcut for enabling/disabling HDR -- Alt-Winkey-B?

Back in the day of Win 10, I defined a bunch of personal shortcut keys, using Alt-Winkey. Then Win 11 added a bunch of Game Bar shortcuts which also use Alt-Winkey. I've disabled the Game Bar, which gave me back some of my shortcuts, but the HDR shortcut, Alt-Winkey-B still persists, even when I define:

Code: Select all

#persistent
#InstallKeybdHook
!#b::DoMyCustomThing()
TIA
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 12:22

I would pick a different hotkey, because trying to override Windows may yield inconsistent results.
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 20:22

I was there first, then Windows claimed it. I'm not giving it up. I'll write my own keyboard driver if I must.

That being said, I've noticed that my AHK double-colon definition for alt-winkey-b is getting executed. The problem is that Windows is also doing its HDR mode switch, which involves a superfluous message and a screen flash to black. I just need to find a way to prevent Windows from acting on it.
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 20:53

I imagine that your new keyboard driver will take care of all of that for you.

:)
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 21:03

Oh man! They are really pushy about that particular hotkey. \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\DisabledHotkeys can disable other Windows hotkeys involving Winkey, but not Winkey-B and Alt-Winkey-B.
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 21:15

They are out-and-out over the top with Alt-Winkey-B. Using the Keyboard Manager of PowerToys, one can remap most shortcuts, but not that one.

This looks like a challenge. ;-)
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 21:18

Thank you to the pointers. I have already disabled Game Bar and HDR. Pressing Alt-Winkey-B re-enables it. Shopping for a non-HDR monitor isn't an option because... I'm using a laptop.
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 21:21

You described two things but not the two things at the Web page. The first was uninstalling Game Bar. The second was a PowerShell script. I did not try either of them, but it could be worth a go-- but explore at your own risk!
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Override HDR Shortcut Alt-Winkey-B?

19 Feb 2023, 22:12

Ah. I just looked at the main article. The additional steps you reference are in the dialog below the article.

Code: Select all

Get-AppxPackage -AllUsers -PackageTypeFilter Bundle *xboxgaming* | Remove-AppxPackage -AllUsers
is sufficient to get Windows to stop with the HDR hotkey. Thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Tech Stuff and 386 guests