Latest version | 0.0.4 |
---|---|
Minimum Core | 11 |
Compatible Core | 12 |
Last updated | 9 months ago |
Created | 11 months ago |
Authors |
|
Languages |
|
Systems | All systems |
Project source | Project URL |
With this module, you can press and hold the hotkey to switch to the corresponding UI view, e.g. lighting, sounds, notes, drawings etc. Releasing the key lets you switch back to the view you came from.
Especially useful to quickly toggle lights.
Tapping quickly three times the same key pins the corresponding view.
You can customize the keys in "Configure Controls"
You can set the delay for the 3-tap pinning in the setting. Default is 500.
You can register your module with quick-keys. Quick keys uses the data-control
attribute. To add a quick key for your module, use the following
game.modules.get("quick-keys").api.registerKey("data-control", "Name that gets displayed in Configure Controls", "The Key");
Here's we use sequencer as an example. The data-control attribute within the DOM is "sequencer" and we register the "H" key. It is important, that the call has to be made in the 'init' phase.
We awkwardly leverage a timer, in case quick-keys has not yet been initialized. If anyone knows of a better way, please let me know!
Hooks.once('init', () => {
if (game.modules.has('quick-keys')) {
// **** Change these ****
let dataControl = "sequencer";
let name = "Sequencer";
let key = "KeyH";
// **********************
let count = 0;
let checkApiInterval = setInterval(() => {
let api = game.modules.get('quick-keys').api;
if (api) {
api.registerKey(dataControl, name, key);
console.info(`${name} (${dataControl}) registered key '${key}' successfully with quick-keys`);
clearInterval(checkApiInterval);
} else if (count >= 500) {
console.error("Cancel waiting for quick-keys initialization");
clearInterval(checkApiInterval);
} else {
count++;
}
}, 1);
}
});
If you like to support my work find me on Patreon.
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: quick-keys or copy its manifest URL:
And paste it to the input box at the bottom of your window.
You can install this package directly to your Forge account.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.