vscode-ocaml-platform icon indicating copy to clipboard operation
vscode-ocaml-platform copied to clipboard

default shortcut for interface interferes with international keyboard layouts

Open frejsoya opened this issue 4 years ago • 4 comments

The default shortcut (ALT+o) for switching between .mli<->.ml conflicts with international language keyboard character input

In my case: Mac osx. Danish speaker, US-English keyboard. To type Danish character 'ø', the modifier key used is 'ALT' is used combined with o.

In general I believe shift and ALT modifier + characters are, on Mac at least, used used for character selection, there are other cases as well. And it likely depends on the language. (Alt+S is the german ß, The Icelandic ∂ Is ALT+D)

Only noticed this when writing a quick script for myself and writing a danish comment, containing ø. Current workaround is keep using english in comments ;)

frejsoya avatar Nov 07 '21 20:11 frejsoya

You can override the shortcut by going to Preferences -> Keyboard Shortcuts and searching for ocaml. You will be able to see all of the keyboard shortcuts from the extension and change them as you wish.

mlantas avatar Nov 07 '21 21:11 mlantas

Thats what I did. No problem there. The default shortcut can be accidently triggered. And it creates an empty interface file, saved to disk here, which can break compulation without you really understanding why.

frejsoya avatar Nov 11 '21 13:11 frejsoya

Alright, we could probably add a key to prevent interference with macOS shortcuts.

Would Ctrl+Alt+O or Cmd+Alt+O work fine on macOS?

saved to disk here

That shouldn't happen. It should open an unsaved file with an automatically generated interface and let you save if you want.

Maybe you have some sort of non-standard auto-saving? I can't reproduce it with any of the VSCode auto-save settings.

mlantas avatar Nov 11 '21 20:11 mlantas

It seems like using alt+<key> keybindings is a bad idea because it keeps clashing. But at the same time, I wonder whether providing keybindings is a good idea at all since it will keep clashing.

I think we should document well how to add keybindings in vscode and remove default bindings completely.

On Thu, 11 Nov 2021 at 21:13, Max Lantas @.***> wrote:

Alright, we could probably add a key to prevent interference with macOS shortcuts.

Would Ctrl+ALT+O or Cmd+ALT+O work fine on macOS?

saved to disk here

That shouldn't happen. It should open an unsaved file with an automatically generated interface and let you save if you want.

Maybe you have some sort of non-standard auto-saving? I can't reproduce it with any of the VSCode auto-save settings.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ocamllabs/vscode-ocaml-platform/issues/766#issuecomment-966593538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4YR65RRKWZEIJGTEQ7W4DULQPVXANCNFSM5HRHFZ4A .

ulugbekna avatar Nov 12 '21 10:11 ulugbekna