Open imvkmark opened 2 years ago
我来催更了..
@imvkmark 正好需要,node_modules\hexo-theme-icarus\source\js\main.js 加入下面的
document.onkeydown = function(e) {
// https://javascript.info/keyboard-events
if (e.ctrlKey && e.code == "KeyK") {
document.querySelector("a.navbar-item.search").click();
e.preventDefault();
}
};
目前快捷键是 Ctrl + K,可以参考注释中的链接来改 e.code 那个判断
你的功能建议与某个使用问题相关么?请详述。
搜索的时候能能够支持快捷键, 比如 cmd+/ 作为很多文档的搜索快捷键
描述你想要的解决方案
是否可以支持常用的快捷键, 或者部分快捷组合
描述你考虑过的替代办法
暂无
额外上下文
附上与功能请求有关的其他上下文信息或者截图。