dotnet-repl icon indicating copy to clipboard operation
dotnet-repl copied to clipboard

Broken shortcuts (Ctrl+Up), (Ctrl+Doww), (Tab), (Shift+Tab)

Open NikiforovAll opened this issue 11 months ago • 6 comments

Shortcuts don't work for me. Could you please suggest any ideas why sometimes like this may happen? Thank you

Image

NikiforovAll avatar Jan 26 '25 09:01 NikiforovAll

What OS are you on?

jonsequitur avatar Jan 27 '25 15:01 jonsequitur

It is Windows + Windows Terminal + Powershell

NikiforovAll avatar Jan 29 '25 09:01 NikiforovAll

Using the same setup, all of the shortcuts are working for me except Shift+Tab which continues forward through completions rather than going back.

I wonder if they could be conflicting with shortcuts configured in Windows Terminal. Do you have any custom shortcuts defined for these?

jonsequitur avatar Jan 29 '25 15:01 jonsequitur

Same here on macOS (Sequoia 15.2). Tab works, but Shift+Tab keep going forward. The history related shortcuts (i.e. Ctrl+Up, Ctrl+Down) don't work at all. Neither Shift+Enter for multiline code.

ariciputi avatar Jan 29 '25 22:01 ariciputi

i've run into the same problems and found a variety of causes. on a windows 10 machine, it was powershell 5 settings - there's an option for "ctrl key shortcuts" that was intercepting the input and causing the arrow keys to scroll the screen buffer instead of cycle through command history.

the one thing i haven't been able to fix is tab completion - this works for a "vanilla" repl - i.e. if i just launch and, say, use text completion on a variable of a builtin dotnet type. however, all tab completion stops functioning if i initialize the shell with a dib file that contains all the #r statements required to initialize the environment for my project. in this scenario, tab-completion doesn't even work for a string variable. Any pointers on where i might look to find this feature in the codebase? perhaps i can find where it's going awry.

mattefowler avatar Feb 26 '25 22:02 mattefowler

@mattefowler The completions code is here:

  • https://github.com/jonsequitur/dotnet-repl/blob/main/src/dotnet-repl/KernelCompletion.cs
  • https://github.com/jonsequitur/dotnet-repl/blob/main/src/dotnet-repl/LineEditorCommands/CompletionCommand.cs#L22

I believe there were some API changes in RadLine at one point that might make this worth revisiting.

Let me know how I can help if you'd like to dig into this.

jonsequitur avatar Feb 27 '25 18:02 jonsequitur