Skip to content

Instantly share code, notes, and snippets.

@dxramax
Created September 17, 2026 17:15
Show Gist options
  • Select an option

  • Save dxramax/1e1d6a83644c7d5fac188dfeeac64c76 to your computer and use it in GitHub Desktop.

Select an option

Save dxramax/1e1d6a83644c7d5fac188dfeeac64c76 to your computer and use it in GitHub Desktop.
Windows 11 keyboard-only taskbar auto-hide

Windows 11 taskbar: keyboard-only auto-hide

This setup keeps the Windows 11 taskbar hidden when the mouse touches the bottom edge. Press the Windows key to reveal it. If the taskbar is already visible, the Windows key opens Start.

Install

Open PowerShell and run:

Set-ExecutionPolicy -Scope Process Bypass
& .\setup-taskbar-keyboard-only.ps1

The script installs Windhawk, downloads the official Taskbar auto-hide fine tuning mod, configures it, and restarts Windhawk.

The script must be allowed to elevate through the normal Windows UAC prompt. It uses the official Windhawk mod server: https://mods.windhawk.net/mods/taskbar-auto-hide-keyboard-only/

Settings applied

  • Native Windows taskbar auto-hide: enabled
  • Windhawk mode: keyboardOnlyFullyHide
  • Windows-key action: showTaskbarOpenStartIfShown
  • Temporary show hotkey: Alt+Escape
  • Toggle permanent visibility: `Alt+``

Verify

Run:

Get-ItemProperty 'HKLM:\SOFTWARE\Windhawk\Engine\Mods\taskbar-auto-hide-keyboard-only\Settings'

The Explorer process should contain the mod DLL after the script restarts Windhawk.

Publish as a GitHub Gist

Install GitHub CLI, sign in, then run from this folder:

gh auth login
gh gist create --desc "Windows 11 keyboard-only taskbar auto-hide" --public README.md setup-taskbar-keyboard-only.ps1
#requires -Version 5.1
$ErrorActionPreference = 'Stop'
# This script needs administrator access because Windhawk's system-wide engine
# and its HKLM mod configuration are used.
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal($identity)
if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$args = '-NoProfile -ExecutionPolicy Bypass -File "' + $PSCommandPath + '"'
$p = Start-Process powershell.exe -Verb RunAs -ArgumentList $args -Wait -PassThru
exit $p.ExitCode
}
$modId = 'taskbar-auto-hide-keyboard-only'
$modBase = "https://mods.windhawk.net/mods/$modId/"
$windhawkRoot = 'C:\Program Files\Windhawk'
$appData = 'C:\ProgramData\Windhawk'
if (-not (Get-Command winget.exe -ErrorAction SilentlyContinue)) {
throw 'winget is not available. Install App Installer from Microsoft Store first.'
}
winget install --id RamenSoftware.Windhawk --exact --silent --accept-package-agreements --accept-source-agreements
$versions = @(Invoke-RestMethod ($modBase + 'versions.json'))
$version = ($versions | Sort-Object timestamp | Select-Object -Last 1).version
if ([string]::IsNullOrWhiteSpace($version)) { throw 'Could not determine the latest mod version.' }
$tempRoot = Join-Path $env:TEMP $modId
New-Item -ItemType Directory -Force -Path $tempRoot | Out-Null
$tempDll = Join-Path $tempRoot "$modId`_$version`_64.dll"
$tempSource = Join-Path $tempRoot "$modId`_$version.wh.cpp"
Invoke-WebRequest ($modBase + "$version`_64.dll") -OutFile $tempDll -UseBasicParsing
Invoke-WebRequest ($modBase + "$version.wh.cpp") -OutFile $tempSource -UseBasicParsing
$engineMods64 = Join-Path $appData 'Engine\Mods\64'
$modsSource = Join-Path $appData 'ModsSource'
$statusDir = Join-Path $appData 'Engine\ModsWritable\mod-status'
New-Item -ItemType Directory -Force -Path $engineMods64,$modsSource,$statusDir | Out-Null
$dllName = "$modId`_$version`_123456.dll"
Copy-Item $tempDll (Join-Path $engineMods64 $dllName) -Force
Copy-Item $tempSource (Join-Path $modsSource "$modId.wh.cpp") -Force
$modKey = "HKLM:\SOFTWARE\Windhawk\Engine\Mods\$modId"
New-Item -Path $modKey -Force | Out-Null
$config = @{
LibraryFileName = $dllName
Disabled = 0
LoggingEnabled = 0
DebugLoggingEnabled = 0
Include = 'explorer.exe'
Exclude = ''
Architecture = 'x86-64'
Version = [string]$version
SettingsChangeTime = [int](([DateTimeOffset]::UtcNow.ToUnixTimeSeconds()) -band 0x7fffffff)
}
foreach ($item in $config.GetEnumerator()) {
$type = if ($item.Value -is [int]) { 'DWord' } else { 'String' }
New-ItemProperty -Path $modKey -Name $item.Key -Value $item.Value -PropertyType $type -Force | Out-Null
}
$settingsKey = Join-Path $modKey 'Settings'
New-Item -Path $settingsKey -Force | Out-Null
$settings = @{
mode = 'keyboardOnlyFullyHide'
showTemporarilyHotkey = 'Alt+Escape'
toggleAlwaysShowHotkey = 'Alt+`'
toggleAlwaysShowMouseEvent = 'disabled'
showTemporarilyDurationMs = '1000'
winKeyAction = 'showTaskbarOpenStartIfShown'
oldTaskbarOnWin11 = '0'
}
foreach ($item in $settings.GetEnumerator()) {
New-ItemProperty -Path $settingsKey -Name $item.Key -Value $item.Value -PropertyType String -Force | Out-Null
}
# Enable the native auto-hide prerequisite.
$stuckRects = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'
$taskbar = (Get-ItemProperty $stuckRects).Settings
$taskbar[8] = 3
Set-ItemProperty -Path $stuckRects -Name Settings -Value $taskbar
& (Join-Path $windhawkRoot 'windhawk.exe') -restart
Start-Sleep -Seconds 4
$loaded = Get-Process explorer -ErrorAction SilentlyContinue | ForEach-Object {
$_.Modules | Where-Object { $_.ModuleName -eq $dllName }
}
if (-not $loaded) { Write-Warning 'The mod file was installed, but Explorer has not reported the DLL yet. Sign out and back in once.' }
else { Write-Output "Done: $modId $version is loaded in Explorer." }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment