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

OS specific keyboard bindings #3518

Open
MarkZ3 opened this issue Nov 16, 2018 · 10 comments
Open

OS specific keyboard bindings #3518

MarkZ3 opened this issue Nov 16, 2018 · 10 comments
Labels
enhancement issues that are enhancements to current functionality - nice to haves keybindings issues related to keybindings

Comments

@MarkZ3
Copy link
Contributor

MarkZ3 commented Nov 16, 2018

Some keybindings need to be adjusted depending on the OS. It can depend on reserved keys, etc. In Eclipse we would often have a keybinding for Windows/Linux and a separate different one for macOS. I don't believe this is possible in Theia right now.

@MarkZ3 MarkZ3 added the keybindings issues related to keybindings label Nov 16, 2018
@akosyakov akosyakov added the enhancement issues that are enhancements to current functionality - nice to haves label Nov 16, 2018
@kittaakos
Copy link
Contributor

kittaakos commented Nov 16, 2018

@kittaakos
Copy link
Contributor

I would go even further; we could have simplified keybindings for electron. No need to press an extra Alt or Shift just because simpler bindings are odd in the browser.

@paul-marechal
Copy link
Member

paul-marechal commented Nov 16, 2018

I think it should be explicit and that we shouldn't automatically alter the bindings like this. It should also be correctly handled in the keymaps.json file too, where we cannot rely on TS/JS constructs (isOSX ? 'a' : 'b').

I also think that keybindings overall would need some more love. I'm trying to wrap my head around what would need to be done, because the current issue could be addressed in different ways.

For instance, should we allow VSCode keymap files and inspire ourselves from their design?

@paul-marechal
Copy link
Member

paul-marechal commented Nov 16, 2018

Looking at it, we could have multiple entries with different contexts, for each OS:

[
    {
        "keybinding": "shift+ctrl+p", "command": "outline.toggle",
    },
    {
        "keybinding": "shift+ctrlcmd+p", "command": "outline.toggle",
        "context": "isMac"
    },
]

Just food for thoughts (also it seems like this is kind of what vscode already does).

@svenefftinge
Copy link
Contributor

Not sure what this ticket is about, as the initial request is already support?

@paul-marechal
Copy link
Member

@svenefftinge how does one define OS dependent bindings?

Is it only at the extension contribution level (like @kittaakos was mentioning)?

@svenefftinge
Copy link
Contributor

Yes, that is the only hook we have for keybindings atm. I haven't looked closely at the plug-in system, but I guess there we need to support the same format that vs code has.

@paul-marechal
Copy link
Member

There is a ~/.theia/keymap.json that is supposed to be user configurable, but the OS specific bindings aren't possible at this place, that's part of my concern.

@MarkZ3
Copy link
Contributor Author

MarkZ3 commented Nov 21, 2018

There is a ~/.theia/keymap.json that is supposed to be user configurable, but the OS specific bindings aren't possible at this place, that's part of my concern.

Maybe the title of the issue should be updated to reflect this concern? The original issue I had is not really a problem for now.

@paul-marechal
Copy link
Member

paul-marechal commented Nov 21, 2018

Thinking about it, in the case of user-defined keybindings, unless they use a remote Theia and switch back/forth between two workstations, one Windows and one OSX for example, it shouldn't be a big issue.

If you often use a Mac, you will write your custom keybindings for that platform. It might not work if you change to Windows later, and you won't be able to share a keymap set this way, but it should still be usable.

Currently things are very personalized let's say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves keybindings issues related to keybindings
Projects
None yet
Development

No branches or pull requests

5 participants