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

Keyboard sequence ctrl+alt+e interfere with € sign on Windows #323

Closed
cfehse opened this issue Sep 16, 2019 · 24 comments
Closed

Keyboard sequence ctrl+alt+e interfere with € sign on Windows #323

cfehse opened this issue Sep 16, 2019 · 24 comments

Comments

@cfehse
Copy link
Contributor

cfehse commented Sep 16, 2019

VS code interprets ctrl+alt+e in all editors and input fields as the character and as part of a keyboard shortcut simply as the e character on Windows. The extension defines a shortcut ctrl+alt+c ctrl+alt+e which is therefore executed as the chord ctrl+alt+c e.

So the command "Send current form to REPL window" always executed "Evaluate current form inline" when invoked through the keyboard shortcut even though the same command invoked using the command prompt (ctrl+shift+p) triggers the expected command.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 16, 2019

A possible solution for this problem would be to change the default binding:

  • Evaluate current form/selection inline and print to output to ctrl+alt+c v
  • Send current form to REPL window and evaluate it to ctrl+alt+c ctrl+alt+v

to keep the symmetry. I tested this keyboard shortcuts under Windows und Linux and it works as expected.

@PEZ
Copy link
Collaborator

PEZ commented Sep 17, 2019

The default binding was changed to ctrl+alt+e because that with some kombination of languages and operating system the previous shortcut produced some other glyph. It's entirely possible that ctrl+alt+v produces a glyph for someone.

It is a bit insane that VS Code does this. There should be an issue filed about it.

Until then, it is probably better to update the README with the gotcha and have a wiki page that can provide some tips and collect suggestions on how to customize the shortcut.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 17, 2019

You can do this, but with the current default binding for one of the most important commands you can be sure that all windows user with:

  • Belgian
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Estonian
  • Faroese
  • Finnish
  • French
  • German
  • Icelandic
  • Italian
  • Latvian
  • Lithuanian
  • Macedonian
  • Norwegian
  • Portuguese
  • Serbian
  • Slovak
  • Slovenian
  • Spanish
  • Swedish
  • Swiss
  • Turkish

keyboard layouts will have this problem. It cost me over an hour to figure it out (I will open a bug for VScode as well). I am currently looking how to attract people to clojure and having an understandable IDE with an at least good REPL development workflow seems essential. Cursive is in many ways better but here the workflow is much how the lispian way should be at least I think. So I will go through the different keyboard layouts and try out what happends. I tried the major locales (include Swedish) and ctrl+alt+v works and and ctrl+alt+e does not.

PEZ added a commit that referenced this issue Sep 21, 2019
@PEZ
Copy link
Collaborator

PEZ commented Sep 21, 2019

Thanks for insisting. Not good with defaults that fail for such a large category of users.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 21, 2019

I opened an issue for vscode for this behavior. Let's see what happens on there side. I will test the remaining layouts und report, if they all work.

@kstehn
Copy link
Contributor

kstehn commented Sep 21, 2019

I dont understand this issue.
When i test it on windows with German Layout (also with Neo2) i dont get any problems.

When i press ctrl+alt+c ctrl+alt+e it sends the form to the nrepl window without any problems.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 21, 2019

@kstehn Please open die "Keyboard Shortcuts" and try to change/add a shortcut containing ctrl+alt+e. Does the editor work as extected?
I tested it on 3 different machines and on all systems the sequence was translated to e.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 21, 2019

@kstehn Which locale is configured on your Windows system?

@cfehse
Copy link
Contributor Author

cfehse commented Sep 21, 2019

@kstehn What character produces ctrl+alt+e in an source editor windows? On my system it produces die € character.

@kstehn
Copy link
Contributor

kstehn commented Sep 21, 2019

@cfehse
the local is deDE
and when i change keybind to ctrl+alt+e it sends the form to the window.
Without the keybind change i also do get €

@cfehse
Copy link
Contributor Author

cfehse commented Sep 21, 2019

@kstehn I can reproduce the behavior on Windows 7 and 10 with English and German Locale and German(Germany) keyboard layout. I will take a deeper look into this. Thanks.

@PEZ
Copy link
Collaborator

PEZ commented Sep 21, 2019

Let me get this straight... So on deDe locale, both alt+e and ctrl+alt+e (unbound by Calva) produces ?

@kstehn
Copy link
Contributor

kstehn commented Sep 21, 2019

yeah i didnt know this either

@PEZ
Copy link
Collaborator

PEZ commented Sep 21, 2019

Is this only in VS Code or generally?

@PEZ
Copy link
Collaborator

PEZ commented Sep 21, 2019

VS Code interpreting the second chord of a keyboard shortcut that way is a separate and insane matter...

@kstehn
Copy link
Contributor

kstehn commented Sep 21, 2019

no its also in my browser so

@cfehse
Copy link
Contributor Author

cfehse commented Sep 21, 2019

@kstehn @PEZ I will look a some stock Windows system tomorrow - installations I have never touched. So I will see if I can reproduce the issue there.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 22, 2019

So I tried on a new system:

  • Stock installation Windows 10 Home (Version 1903)
  • Region German, Regional Formats German(Germany), keyboard layout German(Germany)

Ctrl-Alt-e-vscode-windows-10

@kstehn
Copy link
Contributor

kstehn commented Sep 22, 2019

That looks wierd.
Same System and it looks like this:

keybinding

@cfehse
Copy link
Contributor Author

cfehse commented Sep 22, 2019

@kstehn Is your system native or hosted in a virtual machine?

@kstehn
Copy link
Contributor

kstehn commented Sep 22, 2019

@cfehse its native

@cfehse
Copy link
Contributor Author

cfehse commented Sep 22, 2019

@kstehn okay let's have the vscode guys take a look at this. Even in Notepad++ I can define a shortcut for ctrl+alt+e and it works like a charm.

@PEZ
Copy link
Collaborator

PEZ commented Sep 25, 2019

Did v2.0.40 fix this? If so, close the issue.

@cfehse
Copy link
Contributor Author

cfehse commented Sep 26, 2019

@PEZ Yes you changed this on Windows.

Nevertheless I leave a reference to the corresponding vscode issue: Windows Ctrl+Alt+E get translated in keyboard shortcut as E

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

No branches or pull requests

3 participants