Add macro key support (P1-P6) for HP Omen laptops#3
Open
kabanendenis wants to merge 1 commit into
Open
Conversation
- Add HPWMI_MACRO_PROFILE_SET and HPWMI_MACRO_MODE_SET commands - Add macro_profile_bytes array mapping P1-P6 to KP1-KP6 - Add macro_key_setup() and macro_key_remove() functions - Integrate macro key initialization in hp_wmi_bios_setup/remove This enables the P1-P6 programmable macro keys on HP Omen laptops. Keys are mapped to numpad 1-6 by default. Based on xddxdd/hp-omen-linux-module macro key implementation. Tested on HP OMEN 17-ck0xxx with kernel 6.14.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for the P1-P6 programmable macro keys found on HP Omen gaming laptops.
Changes
HPWMI_MACRO_PROFILE_SET(0x0F) andHPWMI_MACRO_MODE_SET(0x17) WMI commandsmacro_profile_bytesarray that maps P1-P6 keys to numpad 1-6 (KP1-KP6)macro_key_setup()andmacro_key_remove()functionshp_wmi_bios_setup()andhp_wmi_bios_remove()Key Mapping
Users can remap these keys using
keyd,xbindkeys, or DE shortcuts.Testing
All 6 macro keys work correctly.
Credits
Based on xddxdd/hp-omen-linux-module macro key implementation, ported to kernel 6.14+ API.