Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides adding, changing, and registering keyboard shortcuts in the Project Graph app via shortcutKeysRegister.tsx.
32% 95%+64 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 7 of 22 without it.
3 of 3 safety checks passed
Not used yet
本技能指导如何在 Project Graph 项目中创建新的快捷键。
创建新快捷键需要完成以下 4 个步骤:
在 app/src/core/service/controlService/shortcutKeysEngine/shortcutKeysRegister.tsx 文件的 allKeyBinds 数组中添加新的快捷键定义。
快捷键定义结构:
{
id: "uniqueKeybindId", // 唯一标识符,使用驼峰命名
defaultKey: "A-S-m", // 默认快捷键组合
onPress: (project?: Project) => void, // 按下时的回调函数
onRelease?: (project?: Project) => void, // 松开时的回调函数(可选)
isGlobal?: boolean, // 是否为全局快捷键(可选,默认 false)
defaultEnabled?: boolean, // 默认是否启用(可选,默认 true)
}
快捷键键位格式:
C- = Ctrl (Windows/Linux) 或 Command (macOS)A- = Alt (Windows/Linux) 或 Option (macOS)S- = ShiftM- = Meta (macOS 上等同于 Command)F11, F12 等 = 功能键arrowup, arrowdown, arrowleft, arrowright = 方向键home, end, pageup, pagedown = 导航键space, enter, escape = 特殊键m, t, k 等"t t t" 表示连续按三次 t注意: Mac 系统会自动将 C- 和 M- 互换,所以不需要手动处理平台差异。
Next to this one in the catalogue, plus more from the same author.