Comfy-Org / Comfy-Org/ComfyUI_frontend

Keyboard handling bypasses centralized keybindingService

Open
#11,058 0 comments 0 reactions 0 assignees View on GitHub
area:hotkeys audit:conflicting code-audit
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Recommendation

### 🔀 CONSOLIDATE: Route all keyboard handling through keybindingService

Two modules bypass the centralized keybinding system, making shortcuts undiscoverable and prone to conflicts.

## What Was Found

| System | Location | Scope |
|---|---|---|
| **keybindingService** (centralized ✅) | `src/platform/keybindings/` | Global app shortcuts |
| **Mask Editor useKeyboard** | `src/composables/maskeditor/useKeyboard.ts` | Independent key state tracking |
| **editAttention extension** | `src/extensions/core/editAttention.ts` | Direct `window.addEventListener('keydown')` |

## Context

The mask editor and editAttention extension register keyboard handlers independently. Registering through keybindingService would enable discoverability (settings UI) and conflict detection.

---

**Category:** Conflicting Systems | **Confidence:** MEDIUM | **Tools:** Semantic analysis
_Filed by audit-code skill_

Part of #11022

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11058-Keyboard-handling-bypasses-centralized-keybindingService-33e6d73d36508169bd47f6d6ec7f2997) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.