function actions(action, value) {
	const { editor } = editorManager;
	const { $input, $replaceInput } = quickTools;

	if (Object.keys(state).includes(action)) {
		setInput();
		value = !state[action];
		state[action] = value;
		events[action].forEach((cb) => cb(value));
		if (Object.values(state).includes(true)) {
			$input.focus();
		} else if (input) {
			input.focus();
		} else {
			$input.blur();
		}

		return value;
	}

	switch (action) {
		case "insert":
			editor.insert(value);
			return true;

		case "command":
			editor.execCommand(value);
			return true;

		case "key": {
			value = Number.parseInt(value, 10);
			const event = KeyboardEvent("keydown", getKeys({ keyCode: value }));
			if (value > 40 && value < 37) {
				resetKeys();
			}
			setInput();
			input.dispatchEvent(event);
			return true;
		}

		case "search":
			toggleSearch();
			return actionStack.has("search-bar");

		case "toggle":
			toggle();
			return true;

		case "set-height":
			if (typeof value === "object") {
				setHeight(value.height, value.save);
			} else {
				setHeight(value);
			}
			return true;

		case "search-prev":
			find(1, true);
			return true;

		case "search-next":
			find(1, false);
			return true;

		case "search-settings":
			searchSettings().show();
			return true;

		case "search-replace":
			editor.replace($replaceInput.value || "");
			return true;

		case "search-replace-all":
			editor.replaceAll($replaceInput.value || "");
			return true;

		default:
			return false;
	}
}
Performs quick actions
@param {string} action Action to perform
@param {string} value Value for the action
@returns {boolean} Whether the action was performed