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

Possible to use for custom keybindings? #3

Closed
1 task done
max-sixty opened this issue Jul 10, 2021 · 6 comments
Closed
1 task done

Possible to use for custom keybindings? #3

max-sixty opened this issue Jul 10, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@max-sixty
Copy link

Question

  • I have read the comment above and have completed each step

Hi @FredHappyface — thanks a lot for making this, it's exactly what I was looking for as I transition to working from Mac to jointly on Mac & Linux.

My understanding is that this extension contains the default keybindings. Could I ask whether it's possible to convert custom ones, even I do it manually? Is it as simple as find replacing cmd -> super, etc?

Thanks!

@max-sixty
Copy link
Author

A couple of other issues I'm hitting:

  • This promotes the standard VSCode shortcuts above those of other extensions. That sometimes gives odd results — e.g. the Vim extension's C-d doesn't work since there's a VSCode default which this extension now ranks above the Vim extensions.
  • That's also the case for shortcuts that are the same between Linux & Mac; e.g. S-Enter doesn't work in Jupyter Notebooks, because there's a S-Enter that's in the default shortcuts (again, which now ranks above the Jupyter extension).

I think possibly this might be as simple as getting my Mac shortcuts (including extensions), filtering them for Cmd, and then replacing Cmd with Super. Let me know if that sounds deficient in some way.

@FredHappyface
Copy link
Owner

Unfortunately I can't do anything about conflicts with other extensions:

There are some known issues and conflicts with other keybinding extensions. Currently, this is best fixed manually - see

yzhang-gh/vscode-markdown#396
microsoft/vscode#39888
Here is a list of those that I have suffered from. Follow the links and copy the contents of the file into your keybindings json file. Note that I'll add these to the extension at some point:

Markdown All In One

@FredHappyface
Copy link
Owner

It might be helpful in your case to copy the keybindings and edit these manually. I take it vscode on Linux doesn't understand the cmd key and so the keybinding doesn't behave as expected? (I can't remember off the top of my head how vscode behaves cross OS in this regard)

If that is the case then the only solution I can see is creating further extensions (eg. Mac kb on Linux, Mac kb on Windows)

@max-sixty
Copy link
Author

Thanks @FredHappyface .

Do you see my point re shortcuts that are the same in across all systems though? Presumably there's no need to implement S-Enter in this extension, since it'll exist in all default settings. (Though possibly isn't easy to sort which should be implemented?)

@FredHappyface
Copy link
Owner

Oh yeah that's true. Though as you say, there's additional overhead to consider there as I currently have no idea how I'd go about automating that. One option might be to find and replace cmd, win, super and do a diff on each set of keybindings and keep the deltas

I'll take a look at this over the coming weeks

@FredHappyface
Copy link
Owner

I've taken a look at this and have written a script to automate this. One drawback is that some specific keys are still retained so a decision needs to be made either to create further extensions or by supporting a default os. Ie there's not much point in linuxkeybindings to use meta as its more likely to be installed on win/mac

@FredHappyface FredHappyface self-assigned this Aug 20, 2021
@FredHappyface FredHappyface added the enhancement New feature or request label Aug 20, 2021
@FredHappyface FredHappyface added the wontfix This will not be worked on label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants