Get the key code of omen command center button

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
RandomName4645646486

Get the key code of omen command center button

02 Feb 2018, 17:42

Hello everyone,

the only thing I want is to make my "command center" button to a HOME button.

My notebook from OMEN has an END button, but no HOME button,
instead it has a "OMEN-button" which opens the OMEN command center.
However, since I don't use that function, and I'd need a HOME button much more, I was trying to write script to make it to a HOME button.
The only problem is, I don't know the key-code of that stupid OMEN button.

Hope someone can help.

Thanks
Rohwedder
Posts: 7624
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Get the key code of omen command center button

03 Feb 2018, 03:09

Hallo,
use the script of SKAN, first script on:
https://autohotkey.com/board/topic/2110 ... -of-a-key/
If this script runs and you press the "OMEN-button" you should get the corresponding scancode (different from SC000).
RandomName4645646486

Re: Get the key code of omen command center button

03 Feb 2018, 08:42

Hello and thank you for your answer.

I already tried this script before, however it gives me nothing.
All other keys do return a value, however the "omen button" gives me nothing.
As if I haven't pressed any key.
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Get the key code of omen command center button

03 Feb 2018, 15:09

Try the following script. It'll display the name, VK code and SC code for each key pressed.

Code: Select all

CoordMode, ToolTip, Screen

CleanTimer := -3000	; Must be a negative number (the timer will run only once)

Loop, 5000
{
  Hotkey, % "~*" GetKeyName(Format("vk{:x}", a_index - 1)), GetText
  Hotkey, % "~*" GetKeyName(Format("sc{:x}", a_index - 1)), GetText
}
  ; "~" keeps the button original function
  ; "*" fires the hotkey even if extra modifiers are being held down

Gui, New, -MinimizeBox
Gui, Add, Edit, w200 h100,
Gui, Show
Return

GetText:
  SetTimer, CleanText, Off
  Sleep, 50
  Key := RegExReplace(A_ThisHotkey, "^..")    	; "^.." removes the first 2 characters ("~*") from the returned string
  KeyVK := GetKeyVK(Key)
  KeySC := GetKeySC(Key)
  Text .= KeyName
  ToolTip, % "Key Name: " Key "`nKey VK: " KeyVK "`nKey SC: " KeySC "`n`n" Text, 0, 0	; X\Y coordinates
  SetTimer, CleanText, %CleanTimer%
Return

CleanText:
  Text := ""
  ToolTip
Return

GuiClose:
  ExitApp
Return
RandomName4645646486

Re: Get the key code of omen command center button

03 Feb 2018, 16:37

Hi,

just tried the other script, however also with no reaction.

Is it possible that it is simply not possible to access the key code?

(Also the 6 macro keys also do not show any reaction in the script.)
gregster
Posts: 9000
Joined: 30 Sep 2013, 06:48

Re: Get the key code of omen command center button

03 Feb 2018, 17:24

As far as I know, there are sometimes special keys, especially these that are only available on specific brands, that cannot be remapped. I think these buttons just don't use the usual drivers, but operate on some lower level that might not be accessible.
RandomName4645646486

Re: Get the key code of omen command center button

05 Feb 2018, 13:46

So there is defintely no way for me to access the key?
Not even with other software or messing around with the data in the notebook?
gregster
Posts: 9000
Joined: 30 Sep 2013, 06:48

Re: Get the key code of omen command center button

05 Feb 2018, 14:33

Probably not, but I would ask the notebook manufacturer.
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Get the key code of omen command center button

05 Feb 2018, 19:18

Since it's an omen, have you tried a scan code of 666? ;)

Seriously, have you snooped around the registry yet to see if your keyboard driver has added any mappings to the registry?

https://www.experts-exchange.com/articl ... eyond.html
DukeOfBeans
Posts: 1
Joined: 13 Apr 2020, 19:55

Re: Get the key code of omen command center button

13 Apr 2020, 20:01

I realise I am quite late to this but I managed to fix this on my keyboard and wanted to offer my solution. I am still quite new to this so there is every chance this is a band-aid solution at best.

For me the Omen key is 'F24'. Ironically enough, I used the Macro creator Omen Command Center read the key input.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, drani, Rohwedder and 206 guests