Set global hotkeys

Hello

I’m trying to set my app’s hotkeys as global, whether it’s from the manifest or via API, I have not been able to find something in the docs to guide me. I’d like to do this so they show in the globals property of the object returned by:

overwolf.settings.hotkeys.get

I’ve been searching in the docs and:

Here, it reads:

For apps that work in more than one game or global apps there is an option to set hotkeys as global hotkeys. This option is available from the OW client UI or using the API.

API redirects here, and I couldn’t find anything in that function that makes a hotkey global.

Then, here, it reads:

Currently you can’t assign a global hotkey through the API, only through the manifest. We will fix that very soon.

Then again, nothing in the manifest docs that helps me out to make my hotkeys global.

The only way I could make a hotkey global so far (and have it appear in the globals property) is via the OW settings UI.

Question is: is there indeed a way to set a hotkey as global, whether it is from the API or the manifest?

Thanks

Hi, and thanks for the feedback.

We will check the issue and we will update you here.

Thanks.

Hi @scaramouch3,

I think that regarding the docs, you are right, and it’s we can enhance the documentation about globals. I will do that as needed.

So let’s clear it up:

  • You can set a global key though the API using overwolf.settings.hotkeys.assign().
    The thing is that currently, there is a bug, and you can’t assign a hotkey as global through the API… It’s in our backlog, and we will fix it soon.
  • If your app is targeted for all the installed and supported games, which means your game_targeting manifest flag is set for all - automatically, the hotkeys will “try” to make themselves as “global.”
    If the hotkey is already taken, it will not override it and leave it unsigned. Then only the user can assign it through the settings.

I will make sure to make the docs more clearer about it.

Thanks.

Updated the docs:

1 Like