• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
HP Recommended

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?

https://keycode.info/

HP Recommended

Av Page / Pg Down is 34

Pg Up 33

End / Fin - 35

Fn + Omen = Home = 36

Omen -> Nothing (Omen Command Center opens)

Supr 46

Ins 45

F12 - 123

F11- 122

HP Recommended

Hi Carlos

 

Still no scancode huh?

How do you want to proceed from here?

  1. Option: You could download Scancode Map installation files - to get the scancode
  2. Option: You could download Scancode Map source code, inspect it, build and run it in visual studio. - to get the scancode
  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?
  4. 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?

HP Recommended

@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'.

HP Recommended

$ 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

 

HP Recommended

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.

HP Recommended

I've cloned 'master' branch of the git repo:

https://github.com/medo64/ScancodeMap/blob/master/Source/ScancodeView/(Medo)/LowLevelKeyboardHook%20...

 

And run it with Windows, only only the following tests were with Linux.

HP Recommended

No way 😞

HP Recommended

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. 

HP Recommended

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.

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.