Make ST-style buttons keyboard selectable

- Make ST-style buttons keyboard selectable
- Allow custom classes/selectors to be set as buttons too, with the same functionality (CSS selector-based)
- Observer to automatically add functionality to any button added to the DOM
- Allow buttons to not be selectable via 'disabled' or 'not_focusable'
This commit is contained in:
Wolfsblvt
2024-06-03 02:52:54 +02:00
parent 9318f94f08
commit 5cc4242c6f
4 changed files with 172 additions and 2 deletions

View File

@ -236,6 +236,7 @@ import { ARGUMENT_TYPE, SlashCommandArgument } from './scripts/slash-commands/Sl
import { SlashCommandBrowser } from './scripts/slash-commands/SlashCommandBrowser.js';
import { initCustomSelectedSamplers, validateDisabledSamplers } from './scripts/samplerSelect.js';
import { DragAndDropHandler } from './scripts/dragdrop.js';
import { initKeyboard } from './scripts/keyboard.js';
//exporting functions and vars for mods
export {
@ -887,6 +888,7 @@ async function firstLoadInit() {
await getSystemMessages();
sendSystemMessage(system_message_types.WELCOME);
await getSettings();
initKeyboard();
initTags();
await getUserAvatars(true, user_avatar);
await getCharacters();