Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mapping from key to VSCode command in Cursorless keyboard mode #2026

Conversation

pokey
Copy link
Member

@pokey pokey commented Nov 13, 2023

Checklist

  • I have added tests
  • I have updated the docs and cheatsheet
  • [-] I have not broken the cheatsheet

@pokey pokey force-pushed the pokey/support-mapping-from-key-to-vscode-command-in-cursorless-keyboard-mode branch 3 times, most recently from ebb881a to 1ad106d Compare November 13, 2023 15:24
@pokey pokey marked this pull request as ready for review November 13, 2023 15:25
@pokey
Copy link
Member Author

pokey commented Nov 13, 2023

ok @Kn0rk it has begun 😊

@pokey pokey force-pushed the pokey/support-mapping-from-key-to-vscode-command-in-cursorless-keyboard-mode branch from 1ad106d to dc4f6d3 Compare November 13, 2023 15:27
@pokey pokey force-pushed the pokey/support-mapping-from-key-to-vscode-command-in-cursorless-keyboard-mode branch 2 times, most recently from 5558e8a to 76c2bf0 Compare November 14, 2023 14:04
Comment on lines +100 to +117
"cursorless.experimental.keyboard.modal.keybindings.vscodeCommands": {
// For simple commands, just use the command name
// "aa": "workbench.action.editor.changeLanguageMode",

// For commands with args, use the following format
// "am": {
// "commandId": "some.command.id",
// "args": ["foo", 0]
// }

// If you'd like to run the command on the active target, use the following format
"am": {
"commandId": "editor.action.joinLines",
"executeAtTarget": true,
// "keepChangedSelection": true,
// "exitCursorlessMode": true,
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josharian @Kn0rk does this make sense?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't taken it for a spin but reading it it makes sense

@pokey pokey force-pushed the pokey/support-mapping-from-key-to-vscode-command-in-cursorless-keyboard-mode branch from 76c2bf0 to 71798a1 Compare November 14, 2023 14:07
@pokey
Copy link
Member Author

pokey commented Nov 14, 2023

ok @AndreasArvidsson this one is ready for review. If you're happy, with it, let's give @Kn0rk and @josharian a chance for a quick look, as they've expressed interest in keyboard stuff (and supporting arbitrary VSCode commands was actually @Kn0rk's idea 😊)

@Kn0rk
Copy link

Kn0rk commented Nov 14, 2023

Looks good on a first glance. I will try to set it up on the weekend and give it a test drive.

@pokey
Copy link
Member Author

pokey commented Nov 15, 2023

Looks good on a first glance. I will try to set it up on the weekend and give it a test drive.

Sounds good; I'll keep stacking PRs off of this one and give you a branch to play with this weekend that has all my changes

@pokey pokey force-pushed the pokey/support-mapping-from-key-to-vscode-command-in-cursorless-keyboard-mode branch from 71798a1 to c356f74 Compare November 15, 2023 14:58
@pokey pokey added this pull request to the merge queue Nov 24, 2023
Merged via the queue into main with commit 08cd7a1 Nov 24, 2023
13 checks passed
@pokey pokey deleted the pokey/support-mapping-from-key-to-vscode-command-in-cursorless-keyboard-mode branch November 24, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support mapping from key to VSCode command in Cursorless keyboard mode
4 participants