-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Gaming
- Gaming Notebooks
- [Help request] Remap omen button

Create an account on the HP Community to personalize your profile and ask a question
01-31-2020 03:57 AM
Hi Carlos
Thanks for posting the photo, I have found that after F12 is [Insert] [Delete] [Omen] [Print sc/End] , [Pg Up] [Pg Dn]
Can you please go to this website, press the Omen Button and share the result?
01-31-2020 05:05 AM - edited 01-31-2020 05:08 AM
Hi Carlos
Still no scancode huh?
How do you want to proceed from here?
- Option: You could download Scancode Map installation files - to get the scancode
- Option: You could download Scancode Map source code, inspect it, build and run it in visual studio. - to get the scancode
- Option: In ScancodeKey.cs file, Init() function - this captures the scancode, I could try to convert this to powershell script, would you run that?
- Option: Or we could guess the scan code, by creating a registry file which maps about 30 different keys to home, if that works, we could remove 15, The answer would be in the first 15 or the second 15, then keep halving the num of mappings until we find the right one. If it's not in the 30, then we find some more scancodes to map to home.
Num 1 would be the easiest option.
Personally I tried num 2 just now, and that was fine, I already had visual studio installed.
Did you try the HighFunctionKeysToHome.reg - It maps 12 different keys F13 through to F24 to home.
There are plenty more scancodes to try.
With the powershell option, you might have to change the execution policy, if you haven't already, it's not a big deal, you can change it back after.
Or have you got another option/preference?
01-31-2020 01:23 PM
@PeterTheWizard wrote:3. Option: In ScancodeKey.cs file, Init() function - this captures the scancode, I could try to convert this to powershell script, would you run that?
I've tried to set breakpoint at LowLevelKeyboardHook [002].cs:L69. I am able to trigger this breakpoint with any key but 'Omen key'.
01-31-2020 01:34 PM - edited 01-31-2020 01:53 PM
$ sudo showkey
at Linux shows nothing too.
$ sudo evtest /dev/input/event3
the same result - nothing.
There is something only with dmesg:
$ dmesg
[ 1299.827641] hp_wmi: bad event status 0x5
01-31-2020 01:58 PM
The code that I have in front of me doesn't have that line, maybe I have the windows version, and you have the linux version.
private static void Init() {
if (Keys == null) {
ScancodeKey.Keys = new List<ScancodeKey>();
ScancodeKey.ScancodeKeyMapping = new Dictionary<int, ScancodeKey>();
var assembly = Assembly.GetEntryAssembly();
using (var sr = new StreamReader(assembly.GetManifestResourceStream(assembly.GetName().Name + ".Resources.Mapping.txt"))) {
while (!sr.EndOfStream) {
var line = sr.ReadLine();
if (!string.IsNullOrWhiteSpace(line) && !(line.StartsWith("#", StringComparison.InvariantCulture))) {
var parts = line.Split(new char[] { ' ' }, 2);
var scancode = int.Parse(parts[0], NumberStyles.HexNumber, CultureInfo.InvariantCulture);
var text = parts[1].Trim();
var key = new ScancodeKey(scancode, text);
Keys.Add(key);
ScancodeKeyMapping.Add(scancode, key);
}
}
}
}
}
Notice that it refers to "Mapping.txt" file. In your version does it also refer to Mapping.txt file?
If you're not getting a scancode, maybe that means it's not in the Mapping.txt file.
01-31-2020 02:00 PM - edited 01-31-2020 02:01 PM
I've cloned 'master' branch of the git repo:
And run it with Windows, only only the following tests were with Linux.
01-31-2020 04:01 PM
I have a mapped key on my keyboard, and have noticed that when the breakpoint gets hit, it shows the mapped scancode, not the original scancode. So that means I should be able to create some key mappings to find out a set of scancodes that do not hit the breakpoint.
I will map my F1 to F12 keys to some unusual scancodes, to see whether any of them do not hit the breakpoint. That way I can try 12 scancodes at a time, before I need to reboot and try the next 12.
If I can come up with a set of scancodes that do not hit the breakpoint, I can map each one of them to home.
02-02-2020 03:45 AM
Would someone like to try this registry mapping? OtherKeysToHome.reg
It maps 32 different keys to Home.
For set 1 single-byte scan codes the range is 0x01 to 0x79.
Avoid the following scancodes: 0x00, 0x60, 0x61, and scancodes greater than 0x79.
I have mapped the single byte scancode keys that I haven't got on my keyboard that are within the range, while avoiding the scancodes that should be avoided.