()
| 268 | useHotkeys(definitions) |
| 269 | |
| 270 | const addShortcut = () => { |
| 271 | const trimmed = newHotkey.trim() |
| 272 | if (!trimmed || !newLabel.trim()) return |
| 273 | setShortcuts((prev) => [ |
| 274 | ...prev, |
| 275 | { |
| 276 | id: nextId++, |
| 277 | hotkey: trimmed, |
| 278 | label: newLabel.trim(), |
| 279 | description: newDescription.trim(), |
| 280 | count: 0, |
| 281 | }, |
| 282 | ]) |
| 283 | setNewHotkey('') |
| 284 | setNewLabel('') |
| 285 | setNewDescription('') |
| 286 | } |
| 287 | |
| 288 | const removeShortcut = (id: number) => { |
| 289 | setShortcuts((prev) => prev.filter((s) => s.id !== id)) |
no outgoing calls
no test coverage detected
searching dependent graphs…