Add human-readable name to overwolf.settings.hotkeys.get()

As discussed here.

ISSUE DESCRIPTION
The old overwolf.settings.getHotKey() returned a human-readable name for the hotkey, like:

{ 
    "status": "success",
    "hotkey ": "Ctrl+F3"
}

The new overwolf.settings.hotkeys.get() which replaces this function, no longer has that:

{
    "name":"shots_fired_toggle_visibility",
    "title":"Show In-Game",
    "virtualKeycode":114,
    "modifierKeys":2,
    "extension-uid":"jdecmlblpoddjcmpdbhnefehffjfcjeijpkebedd",
    "isPassthrough":false,
    "hold":false,
    "IsUnassigned":false
}

It’s missing the "Ctrl+F3" requiring us to do our own translation from the modifierKeys and virtualKeycode.

FEATURE REQUEST
Add an additional property to the result of overwolf.settings.hotkeys.get() with the human-readable hotkey key-combination, like such:

{
    "name":"shots_fired_toggle_visibility",
    "title":"Show In-Game",
    "virtualKeycode":114,
    "modifierKeys":2,
    "hotkey":"Ctrl+F3", // <=== ADD THIS ONE!
    "extension-uid":"jdecmlblpoddjcmpdbhnefehffjfcjeijpkebedd",
    "isPassthrough":false,
    "hold":false,
    "IsUnassigned":false
}

PRIORITY:
[mid]
This will greatly ease the changeover from the old deprecated hotkey functions to the new.
I think this needs to be implemented before removing the deprecated functions altogether.

@Bl0n Thanks!, I will let you know.

I am seeing an undocumented property “binding“ on the hotkey objects which is exactly this.

Is this unreliable?

1 Like

Can confirm, this is exactly what I need.

Either they just added that, or I missed it somehow.

@Colorfulstan You are right! That is precisely what we need here. When I tested it this morning, I checked it with an app that returned the value “unassigned” for this field - so it prevents me from seeing that this is the field that we are looking for.

Anyway, it’s a new field that, as you mentioned, was missed from the docs and the changelog. I will check how and why it happened. Anyway - consider it as the fastest feature request that implemented :slight_smile:

I will add it to the docs.

@Bl0n FYI

2 Likes