diff --git a/win/modules/mode-caps.ahk b/win/modules/mode-caps.ahk index 0abab74..4215721 100644 --- a/win/modules/mode-caps.ahk +++ b/win/modules/mode-caps.ahk @@ -54,19 +54,26 @@ mode_caps := useMode("CapsLock", keyMap.onlyCaps) *t:: { Send(keyMap.ctrl . "t") } - +; 恢复上一个关闭的标签页 +*b:: { + Send(keyMap.ctrl . keyMap.shift . "t") +} +; 刷新标签页 *v:: { if (isBrowser()) { Send("{F5}") } } + +; 前进 *z:: { - if (isBrowser()) { + if (isBrowser() || isVscode()) { Send(keyMap.alt . keyMap.onlyRight) } } +; 后退 *x:: { - if (isBrowser()) { + if (isBrowser() || isVscode()) { Send(keyMap.alt . keyMap.onlyLeft) } } diff --git a/win/utils/assert.ahk b/win/utils/assert.ahk index 76da01f..db1546d 100644 --- a/win/utils/assert.ahk +++ b/win/utils/assert.ahk @@ -2,8 +2,13 @@ isBrowser() { browserList := ["Mozilla Firefox", "Google Chrome", "Microsoft​ Edge", "Opera"] for (browser in browserList) { + OutputDebug(WinActive(browser)) if (WinActive(browser)) { return true } } +} + +isVscode() { + return WinActive("Visual Studio Code") } \ No newline at end of file