mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
21 lines
731 B
TypeScript
21 lines
731 B
TypeScript
import { PluginMetadata } from '@/plugins/plugin'
|
|
import { KeyBindingAction } from 'registry/lib/components/utils/keymap/bindings'
|
|
|
|
export const plugin: PluginMetadata = {
|
|
name: 'keymap.actions.empty',
|
|
displayName: '快捷键扩展 - 无动作',
|
|
description: '在快捷键的动作列表里添加一个 "无动作", 将按键绑定到这个上面就可以阻止原有的快捷键行为.',
|
|
setup: ({ addData }) => {
|
|
addData('keymap.actions', (actions: Record<string, KeyBindingAction>) => {
|
|
actions.empty = {
|
|
displayName: '无动作',
|
|
prevent: true,
|
|
run: none,
|
|
}
|
|
})
|
|
addData('keymap.presets', (presetBase: Record<string, string>) => {
|
|
presetBase.empty = ''
|
|
})
|
|
},
|
|
}
|