Warzone hotkeys

Adds more hotkeys to the game, like going to specific pages or doing things in-game.

Author
Dan WL (DanWL)
Daily installs
0
Total installs
2
Ratings
0 0 0
Version
1.5
Created
2024-04-02
Updated
2024-05-20
License
MIT
Applies to

Game official hotkeys: https://www.warzone.com/wiki/Hotkeys
Hotkeys are intentionally not triggered if CTRL, ALT or Windows Key pressed

Default hotkeys

These hotkeys get applied every time you reset or don't have any settings.

Default "go to url hotkeys"

KeyAction
mhttps://www.warzone.com/MultiPlayer?Quickmatch=1
dhttps://www.warzone.com/MultiPlayer/
fhttps://www.warzone.com/forum/forum

Default "in-game hotkeys"

KeyActionNotes
jjoin game
kdecline game
Deletedelete attack/transfer orderRequires attack/transfer dialog between the 'to' and 'from' territories to be open
/analyze attackCan be triggered with or without the attack/transfer dialog open.
=zoom in
-zoom out
'history - show all
#close popups/history
nnext game

Interface

There is currently two ways to view and change the settings of this script: clicking the menu button or using the browser console.
A hotkey key is KeyboardEvent key. Each one must be unique.
A hotkey action is a url (starting with http:// or https://) or an in-game action name. Each one must be unique.

Using menu

On any Warzone page that has the navigation menu the main site uses, a Hotkeys button will appear. See screenshots for details.

Browser console

This method is only available if the menu is unable to be created.
To open browser console, press the F12 key then click on Console. The interface is accessible under window.wzhotkeys.

Function callWhat it does
window.wzhotkeys.reset()Sets all hotkeys to their defaults
window.wzhotkeys.export()Returns the hotkeys as a JSON string
window.wzhotkeys.import(toImport)Sets hotkeys to the JSON string toImport, correcting errors along the way
window.wzhotkeys.goToUrlHotkeys.addItem(key, action)Attempts to add a new hotkey. key is a hotkey key. action is a url that begins with http:// or https://
window.wzhotkeys.goToUrlHotkeys.getItem(i)Gets hotkey item number i for this subset of hotkey. Returns undefined or hotkey item
window.wzhotkeys.inGameHotkeys.getItem(i)Gets hotkey item number i for this subset of hotkey. Returns undefined or hotkey item

hotkey item

.getInfo(): returns {action: hotkey action, key: hotkey key}

.setAction(action): attempts to set this hotkey's action to the hotkey action action. Returns hotkey action

.setKey(key): attempts to set this hotkey's key to the hotkey key key. Returns hotkey key

.remove(): removes or deactivates this hotkey. Removes it if its a "go to url hotkey". Deactivates if its a "in-game hotkey". Returns undefined