AIO 編輯器

KeydownHandler

鍵盤事件 hook。

把編輯器內全部 keydown 事件透傳給 consumer 的 hook,自製 extension——常用於攔截自訂快捷鍵或整合外部行為。不影響既有快捷鍵。

  • config key:AioEditorCoreExtension.KeydownHandler
  • 來源:自製

載入途徑:Basic 恆載(可經 exclude 關閉)。按鈕未宣告但要保留能力 → include: [AioEditorCoreExtension.KeydownHandler]。

排除影響(exclude: [KeydownHandler]): 無按鈕與依賴者受影響; 以 extraExtensions 補上同名 extension(keydownHandler)即為替換。

選項

欄位型別預設值說明
eventHandler(event: KeyboardEvent) => void() => {}每次 keydown 觸發

覆寫範例

const config: AioEditorConfig = {  extensionsConfig: {    KeydownHandler: { eventHandler: (event) => console.log(event.key) }  }}