Skip to content

oshoturiya/Asus-Keyboard-Backlight-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

⌨️ Asus Keyboard Backlight Controller (Bloat-Free Edition)

An ultra-lightweight, high-performance, and completely bloat-free keyboard backlight controller for ASUS laptops (Vivobook, ZenBook, ROG, TUF, and Zenbook). It replaces heavy OEM background services (like Armoury Crate, MyASUS, or G-Helper lighting layers) with a clean, native AutoHotkey v2 script that interfaces directly with the system's motherboard WMI namespace.

Designed to utilize less than 2MB of RAM and 0% background CPU, this utility runs completely silently, bypasses UAC prompts automatically on boot, and provides a global hotkey to cycle keyboard brightness.


🌟 Key Features

  • Instant 4-Stage Brightness Cycling: Seamlessly cycles keyboard brightness: High (131) ➔ Med (130) ➔ Low (129) ➔ OFF (128).
  • Global Hotkey Mappings:
    • Right Alt (RAlt): Cycles brightness globally.
    • Ctrl + Shift + Right Alt (^+RAlt): Triggers a deep, clean Windows shutdown (flushes system cache, closes running apps, and resets the CPU uptime counter).
  • Asynchronous Tooltip UI: Renders a temporary, non-blocking visual tooltip near the cursor showing the current backlight level, which cleanly fades after precisely 1 second.
  • Auto-Elevation: The script automatically checks for and requests Administrator privileges at startup, which is required to write to system hardware WMI endpoints.

⚙️ How It Works (Low-Level Hardware Mechanics)

Asus laptops expose hardware controls (like keyboard backlights, fan modes, and battery charge thresholds) to the Windows operating system via the ACPI WMI (Windows Management Instrumentation) layer.

  • Namespace: root/wmi
  • WMI Class: AsusAtkWmi_WMNB
  • Method: DEVS (Device Control)
  • Backlight Device ID: 0x00050021

Instead of running hundreds of megabytes of background OEM services, this script executes a lightweight, hidden PowerShell call using CIM methods under the hood:

Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB | Invoke-CimMethod -MethodName DEVS -Arguments @{Device_ID=0x00050021; Control_status=[int]CurrentCode}

⚠️ Note on the Power Key LED (Vivobook Models)

Many Asus Vivobook users complain that the power button LED remains lit when they turn off the keyboard backlight, making it annoying in dark rooms.

  • The Constraint: Through WMI scanning, we scanned and tested all WMI endpoints and values. The status LED WMI endpoint 0x000600C2 is unsupported on Vivobook motherboards.
  • The Root Cause: The Power Key LED is physically hardwired directly to the motherboard's main 3.3V power rail. It is not governed by ACPI or software control, meaning it is physically impossible for any software to turn it off while the computer is turned on. The only functional workaround is a physical tape or sticker.

🚀 Setup & Silent Startup (UAC Bypass Guide)

Because writing to the motherboard's WMI interface requires Administrator privileges, standard startup registration (like putting a shortcut in the shell:startup folder) will trigger a Windows User Account Control (UAC) warning popup at every boot.

Follow this simple guide to register a silent, UAC-bypassing startup task that starts AutoHotkey with elevated privileges automatically at Windows logon:

1. Install Prerequisites

2. Configure Startup Task

  1. Open PowerShell as Administrator.
  2. Copy, paste, and run the following command in PowerShell:
    schtasks /create /tn "AsusKeyboardBacklightController" /tr "powershell -WindowStyle Hidden -Command Start-Process -FilePath 'C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe' -ArgumentList 'C:\Users\saksh\OneDrive\Documents\AsusKeyboardBacklightController\AsusKeyboardBacklightController.ahk'" /sc onlogon /rl highest /f
    (Note: If you extracted the repository folder to a different directory, simply update the file path 'C:\Users\saksh\OneDrive\Documents\AsusKeyboardBacklightController\AsusKeyboardBacklightController.ahk' in the command to match your location).

3. Run the Script

Double-click AsusKeyboardBacklightController.ahk to start it immediately! Press Right Alt to verify that your keyboard cycles through its brightness levels with a clean tooltip visual.


📝 Compatibility

Tested and fully supported on Windows 10 and Windows 11 for all ASUS x64 laptops:

  • ASUS VivoBook Series (Vivobook Pro, S-Series, Vivobook 14/15)
  • ASUS ZenBook Series (Zenbook Flip, Duo, Pro)
  • ASUS TUF Gaming (A15, A17, F15, F17)
  • ASUS ROG Gaming (Strix, Zephyrus, Flow)

⚖️ License

This utility is fully open source under the MIT License. Feel free to fork, customize, and share it with the Asus hardware community!

About

An ultra-lightweight, high-performance, and completely bloat-free keyboard backlight controller for ASUS laptops (Vivobook, ZenBook, ROG, TUF).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors