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

ctrl+enter and shift+enter do not work on linux #111

Closed
webczat opened this issue Mar 27, 2022 · 5 comments
Closed

ctrl+enter and shift+enter do not work on linux #111

webczat opened this issue Mar 27, 2022 · 5 comments

Comments

@webczat
Copy link

webczat commented Mar 27, 2022

Hi,
ctrl+enter and shift+enter keys don't work on linux and an alternative would be kinda useful.
Note from what I know, this is not a dotnet bug, as linux generally sends enter, ctrl+enter and shift+enter the same way. at least this is the case on my terminal emulator.

@kindermannhubert
Copy link
Collaborator

Hi, I'm not Linux user, so I don't have experience with it, but when i try simplest repro:
var key = Console.ReadKey();
and press Control+Enter
on Windows I get:
image

and on Linux (Ubuntu) the key modifiers are empty:
image

so we just don't see the Control modifier.

From this, it looks to me like a bug in .NET.

In the new release of CSharpRepl, you will be able to set up custom keybindings for this (#67, #73).

@waf
Copy link
Owner

waf commented Mar 28, 2022

Also see dotnet/runtime#802, scheduled for .NET 7.

@webczat
Copy link
Author

webczat commented Mar 28, 2022

pretty sure it is unfixable on dotnet side, as in, it's the way how terminals on linux work. on windows you can actually read keys, on linux you cannot, you just read special character sequences, and from what I know ctrl+enter or shift+enter don't generate anything different than just enter, so dotnet might have nothing to fix.

@kindermannhubert
Copy link
Collaborator

In any case, we can't do anything about it - it will be solved or not in .NET 7. Not the solution is to use different key bindings.
Configurable key bindings are done but not released yet.
I'm closing this issue with it.

@webczat
Copy link
Author

webczat commented Mar 28, 2022

either configurable key bindings or an alternative/unix only key binding would be okay. so yeah that should work.

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