From 315617a13b2f15b925c7d3e52da2e335ecb75e3e Mon Sep 17 00:00:00 2001 From: tshino Date: Sat, 17 Dec 2022 15:11:23 +0900 Subject: [PATCH 1/2] Fix code action keys --- CHANGELOG.md | 2 ++ generator/config.json | 10 ++++-- package.json | 82 ++++++++++++------------------------------- 3 files changed, 33 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05cc9322..ff5a10ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to the Keyboard Macro Bata extension will be documented in t ### [Unreleased] - Update - Updated default keybindings wrappers based on vscode 1.74.1. [#172](https://github.com/tshino/vscode-kb-macro/pull/172) +- Fix + - Fixed: Some keybindings related to Code Action, which cannot be played back, were being recorded. ### [0.12.9] - 2022-12-10 - Update diff --git a/generator/config.json b/generator/config.json index 6d3e5b4d..a8361a75 100644 --- a/generator/config.json +++ b/generator/config.json @@ -20,7 +20,13 @@ "workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup", "workbench.action.quickOpenLeastRecentlyUsedEditorInGroup", "workbench.action.quickOpenNavigateNextInEditorPicker", - "workbench.action.quickOpenNavigatePreviousInEditorPicker" + "workbench.action.quickOpenNavigatePreviousInEditorPicker", + "editor.action.quickFix", + "acceptSelectedCodeAction", + "hideCodeActionWidget", + "previewSelectedCodeAction", + "selectNextCodeAction", + "selectPrevCodeAction" ], "awaitOptions": [ [ "editor.action.clipboardCopyAction", "clipboard" ], @@ -70,7 +76,7 @@ "text": "\n" } }, - "when": "kb-macro.recording && editorTextFocus && !editorReadonly && !suggestWidgetVisible && !renameInputVisible" + "when": "kb-macro.recording && editorTextFocus && !editorReadonly && !suggestWidgetVisible && !renameInputVisible && !codeActionMenuVisible" } ], "footer": [ diff --git a/package.json b/package.json index 64ba31c4..7b701f62 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "text": "\n" } }, - "when": "kb-macro.recording && editorTextFocus && !editorReadonly && !suggestWidgetVisible && !renameInputVisible" + "when": "kb-macro.recording && editorTextFocus && !editorReadonly && !suggestWidgetVisible && !renameInputVisible && !codeActionMenuVisible" }, { "key": "escape escape", @@ -281,10 +281,7 @@ }, { "key": "shift+escape", - "command": "kb-macro.wrap", - "args": { - "command": "hideCodeActionWidget" - }, + "command": "hideCodeActionWidget", "when": "kb-macro.recording && codeActionMenuVisible" }, { @@ -700,10 +697,7 @@ }, { "key": "escape", - "command": "kb-macro.wrap", - "args": { - "command": "hideCodeActionWidget" - }, + "command": "hideCodeActionWidget", "when": "kb-macro.recording && codeActionMenuVisible" }, { @@ -919,10 +913,7 @@ }, { "key": "down", - "command": "kb-macro.wrap", - "args": { - "command": "selectNextCodeAction" - }, + "command": "selectNextCodeAction", "when": "kb-macro.recording && codeActionMenuVisible" }, { @@ -1605,10 +1596,7 @@ }, { "key": "up", - "command": "kb-macro.wrap", - "args": { - "command": "selectPrevCodeAction" - }, + "command": "selectPrevCodeAction", "when": "kb-macro.recording && codeActionMenuVisible" }, { @@ -2030,12 +2018,9 @@ }, { "key": "ctrl+down", - "mac": "cmd+down", - "command": "kb-macro.wrap", - "args": { - "command": "selectNextCodeAction" - }, - "when": "kb-macro.recording && codeActionMenuVisible" + "command": "selectNextCodeAction", + "when": "kb-macro.recording && codeActionMenuVisible", + "mac": "cmd+down" }, { "key": "ctrl+up", @@ -2109,12 +2094,9 @@ }, { "key": "ctrl+up", - "mac": "cmd+up", - "command": "kb-macro.wrap", - "args": { - "command": "selectPrevCodeAction" - }, - "when": "kb-macro.recording && codeActionMenuVisible" + "command": "selectPrevCodeAction", + "when": "kb-macro.recording && codeActionMenuVisible", + "mac": "cmd+up" }, { "key": "alt+pagedown", @@ -2833,10 +2815,7 @@ }, { "key": "enter", - "command": "kb-macro.wrap", - "args": { - "command": "acceptSelectedCodeAction" - }, + "command": "acceptSelectedCodeAction", "when": "kb-macro.recording && codeActionMenuVisible" }, { @@ -3632,12 +3611,9 @@ }, { "key": "ctrl+enter", - "mac": "cmd+enter", - "command": "kb-macro.wrap", - "args": { - "command": "previewSelectedCodeAction" - }, - "when": "kb-macro.recording && codeActionMenuVisible" + "command": "previewSelectedCodeAction", + "when": "kb-macro.recording && codeActionMenuVisible", + "mac": "cmd+enter" }, { "key": "ctrl+shift+enter", @@ -3986,12 +3962,9 @@ }, { "key": "ctrl+.", - "mac": "cmd+.", - "command": "kb-macro.wrap", - "args": { - "command": "editor.action.quickFix" - }, - "when": "kb-macro.recording && editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" + "command": "editor.action.quickFix", + "when": "kb-macro.recording && editorHasCodeActionsProvider && editorTextFocus && !editorReadonly", + "mac": "cmd+." }, { "key": "ctrl+.", @@ -4013,12 +3986,9 @@ }, { "key": "ctrl+.", - "mac": "cmd+.", - "command": "kb-macro.wrap", - "args": { - "command": "acceptSelectedCodeAction" - }, - "when": "kb-macro.recording && codeActionMenuVisible" + "command": "acceptSelectedCodeAction", + "when": "kb-macro.recording && codeActionMenuVisible", + "mac": "cmd+." }, { "key": "ctrl+shift+r", @@ -7232,10 +7202,7 @@ }, { "key": "ctrl+n", - "command": "kb-macro.wrap", - "args": { - "command": "selectNextCodeAction" - }, + "command": "selectNextCodeAction", "when": "kb-macro.recording && isMac && codeActionMenuVisible" }, { @@ -7382,10 +7349,7 @@ }, { "key": "ctrl+p", - "command": "kb-macro.wrap", - "args": { - "command": "selectPrevCodeAction" - }, + "command": "selectPrevCodeAction", "when": "kb-macro.recording && isMac && codeActionMenuVisible" }, { From 925cd0ef8c416140464733f5bdd788d2002efa0a Mon Sep 17 00:00:00 2001 From: tshino Date: Sat, 17 Dec 2022 15:19:24 +0900 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5a10ad..c1fe4aed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to the Keyboard Macro Bata extension will be documented in t - Update - Updated default keybindings wrappers based on vscode 1.74.1. [#172](https://github.com/tshino/vscode-kb-macro/pull/172) - Fix - - Fixed: Some keybindings related to Code Action, which cannot be played back, were being recorded. + - Fixed: Some keybindings related to Code Action, which cannot be played back, were being recorded. [#173](https://github.com/tshino/vscode-kb-macro/pull/173) ### [0.12.9] - 2022-12-10 - Update