diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index d0f178d..b20b821 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -4,7 +4,7 @@ This document provides a high-level overview of the Anomalous Model Browser plug Workspace lifecycle note: reopening an already initialized Workspace must restore the visible notebook body and reset the hidden recipe body before refreshing data. Hiding the overlay alone is not enough because the next open reuses the existing DOM tree. -The browser has three entry modes backed by one shared `openBrowser()` path: the customizable floating trigger, a ComfyUI action-bar button, or the command under `Extensions -> Anomalous Model Browser` alone. One native combo setting makes these presentations strictly exclusive; temporary host redraws must never override the saved mode or reveal a second entry. Floating size is bounded to small/standard/large and appearance to icon/pill; their setting rows are conditionally hidden outside floating mode because they have no effect there. The colocated language preference uses `auto` by default to resolve `Comfy.Locale`, with explicit `zh`/`en` plugin-only overrides. The in-browser language shortcut writes through the same native setting instead of maintaining an independent preference. The action-bar button uses the host's extension-level `actionBarButtons` contract instead of locating or rewriting another component's DOM. Opening the main browser hides only the floating trigger, while closing restores it only in floating mode. The Extensions command remains registered in every mode as a recovery path, and all modes reuse the same browser instance. +The browser has three entry modes backed by one shared `openBrowser()` command: the customizable floating trigger, a ComfyUI action-bar button, or the command under `Extensions -> Anomalous Model Browser` alone. The command also owns the native `Ctrl + Shift + M` default keybinding, allowing ComfyUI to expose user remapping, duplicate detection, reserved-key guidance, and modal guards without a plugin-level keyboard listener. One native combo setting makes the visual presentations strictly exclusive; temporary host redraws must never override the saved mode or reveal a second entry. Floating size is bounded to small/standard/large and appearance to icon/pill; their setting rows are conditionally hidden outside floating mode because they have no effect there. The colocated language preference uses `auto` by default to resolve `Comfy.Locale`, with explicit `zh`/`en` plugin-only overrides. The in-browser language shortcut writes through the same native setting instead of maintaining an independent preference. The action-bar button uses the host's extension-level `actionBarButtons` contract instead of locating or rewriting another component's DOM. Opening the main browser hides only the floating trigger, while closing restores it only in floating mode. The Extensions command remains registered in every mode as a recovery path, and all modes reuse the same browser instance. Hidden plugin dialogs must not advertise an active modal state. The model-card settings dialog remains mounted for reuse, but its `aria-modal` value follows the overlay lifecycle: `false` while hidden and `true` only while visibly open. This preserves accessibility semantics without tripping ComfyUI Frontend's global modal guard, which otherwise suppresses command-backed shortcuts such as Queue Prompt, Interrupt, and Escape-to-exit-subgraph. The plugin does not install replacement global keyboard handlers or mutate ComfyUI command bindings. diff --git a/CHANGELOG.md b/CHANGELOG.md index 38464ec..d33be84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # 📈 Anomalous Model Browser Changelog +## Unreleased + +### ✨ Interface & Access +- **Native Configurable Shortcut (原生可配置快捷键)**: Added `Ctrl + Shift + M` as the default shortcut for opening the browser. It is registered against the existing shared open command, so ComfyUI handles conflict detection, user remapping, removal, reserved-key guidance, and modal guards without a separate global keyboard listener. + ## v1.56.1 Beta (Interface Preferences & Scan Reliability) — 2026-08-26 ### ✨ Interface & Access diff --git a/README.md b/README.md index 6f6c2c4..019ced8 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ ``` 2. Restart ComfyUI. *(Alternatively, install via **ComfyUI Manager** by searching for `Anomalous Model Browser`)* -Open it with the floating **📦** button or from **Extensions → Anomalous Model Browser** in ComfyUI's top menu. In **ComfyUI Settings → Anomalous Model Browser → Interface**, the plugin language follows ComfyUI by default and can be overridden to Chinese or English. Choose exactly one entry mode: the floating button, a native action-bar button beside the run controls, or Extensions menu only. Floating size and style controls appear only in floating mode. The selected mode remains authoritative during action-bar redraws, while the Extensions command stays registered as the recovery path. +Open it with **Ctrl + Shift + M**, the floating **📦** button, or **Extensions → Anomalous Model Browser** in ComfyUI's top menu. The shortcut uses ComfyUI's native keybinding system, so conflicts are detected there and the combination can be changed or removed under **ComfyUI Settings → Keybinding**. In **ComfyUI Settings → Anomalous Model Browser → Interface**, the plugin language follows ComfyUI by default and can be overridden to Chinese or English. Choose exactly one entry mode: the floating button, a native action-bar button beside the run controls, or Extensions menu only. Floating size and style controls appear only in floating mode. The selected mode remains authoritative during action-bar redraws, while the Extensions command stays registered as the recovery path.
@@ -118,7 +118,7 @@ Open it with the floating **📦** button or from **Extensions → Anomalous Mod ``` 2. 重启 ComfyUI 即可使用。(*也可以直接在 **ComfyUI Manager** 搜索 `Anomalous Model Browser` 点击安装*) -可以点击画布上的悬浮 **📦**,或从 ComfyUI 顶部菜单 **扩展 → Anomalous Model Browser** 打开。在 **ComfyUI 设置 → Anomalous Model Browser → 界面** 中,插件语言默认跟随 ComfyUI,也可以单独固定为中文或 English;入口模式严格三选一:悬浮入口、运行按钮旁的原生顶部入口,或仅使用扩展菜单。只有选择悬浮入口时才显示大小和样式选项。顶部栏重绘不会擅自改变所选模式,扩展菜单命令则始终保留,便于恢复设置。 +可以按 **Ctrl + Shift + M**、点击画布上的悬浮 **📦**,或从 ComfyUI 顶部菜单 **扩展 → Anomalous Model Browser** 打开。快捷键使用 ComfyUI 原生系统,冲突会由原生界面检查,也可以在 **ComfyUI 设置 → 快捷键** 中改键或清除。在 **ComfyUI 设置 → Anomalous Model Browser → 界面** 中,插件语言默认跟随 ComfyUI,也可以单独固定为中文或 English;入口模式严格三选一:悬浮入口、运行按钮旁的原生顶部入口,或仅使用扩展菜单。只有选择悬浮入口时才显示大小和样式选项。顶部栏重绘不会擅自改变所选模式,扩展菜单命令则始终保留,便于恢复设置。
diff --git a/web/main.js b/web/main.js index 107f974..40ad78b 100644 --- a/web/main.js +++ b/web/main.js @@ -708,6 +708,12 @@ app.registerExtension({ function: resetFloatingTriggerPosition } ], + keybindings: [ + { + combo: { key: 'm', ctrl: true, shift: true }, + commandId: OPEN_BROWSER_COMMAND_ID + } + ], menuCommands: [ { path: ['Extensions', 'Anomalous Model Browser'],