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-Slash "/" does not work #1047

Open
ingwiz opened this issue Aug 10, 2024 · 2 comments
Open

Ctrl-Slash "/" does not work #1047

ingwiz opened this issue Aug 10, 2024 · 2 comments

Comments

@ingwiz
Copy link

ingwiz commented Aug 10, 2024

Is there a way to make this keyboard shortcut (Ctrl-/) work in WSL? In Bash, this is an undo operation. I have tried Ubuntu 20.04 WSL and Oracle Linux 9.3 WSL. In the Windows Terminal application, this works as it should.

@CryptGodSon
Copy link


Hi! Here's a step-by-step guide to help resolve the issue with the Ctrl-/ shortcut not working in Fluent Terminal with WSL:


1. Check Fluent Terminal Keybindings

  • Open Fluent Terminal settings.
  • Navigate to the Keybindings section.
  • Verify if Ctrl-/ is assigned to any other action. If so, either remove it or reassign it to a different shortcut.
  • Save the settings and test if the issue is resolved.

2. Map Ctrl-/ in Bash

If Fluent Terminal passes Ctrl-/ to WSL but Bash doesn’t recognize it, you can configure it manually:

  1. Open your WSL terminal.
  2. Edit the ~/.inputrc file using a text editor, such as nano:
    nano ~/.inputrc
  3. Add the following line to map Ctrl-/ to the "undo" operation:
    "\C-/": undo
    
  4. Save the file (Ctrl+O > Enter) and close the editor (Ctrl+X).
  5. Restart Bash to apply the changes:
    exec bash

3. Verify Keyboard Handling in Fluent Terminal

Some terminal emulators block or interpret key inputs before they reach the shell. In Fluent Terminal:

  • Open the Settings menu.
  • Look for an option like Pass all keys to terminal or Send raw input to shell (if available) and enable it.
  • Save the settings and test again.

4. Test in Windows Terminal

If Ctrl-/ works in Windows Terminal, the issue might be specific to Fluent Terminal. In that case:

  • Use Windows Terminal as a temporary alternative if this functionality is critical.
  • Report your environment details (Fluent Terminal version, WSL distribution, etc.) here for further investigation.

5. Use an Alternative Shortcut

If fixing Ctrl-/ isn’t possible, you can assign a different shortcut for the "undo" operation in Bash. For example, in ~/.inputrc:

"\C-z": undo

Replace \C-z with any other key combination you prefer.


I hope this helps! Let me know if any of these steps work for you or if additional debugging is needed. 😊


@ingwiz
Copy link
Author

ingwiz commented Jan 12, 2025

@CryptGodSon Thank you for the guide.

  1. There is no Ctrl-/ combination in the Key Bindings section.

  2. Mapping key combination. I tried several combinations, but only \C-_ works, and it works in Windows Terminal and cmd.exe/ssh.exe, but not in Fluent Terminal.

  3. I did not find any options Pass all keys to terminal or Send raw input to shell or something like that in Fluent Terminal Settings.

  4. Windows Terminal. Ctrl-/ works. After command

    echo '"\C-_": undo' > ~/.inputrc ; exec bash

    the Ctrl-_ keys also work in Windows Terminal and cmd.exe/ssh.exe, but not in Fluent Terminal.

  5. The key combination Ctrl-x Ctrl-u works in Fluent Terminal, I found out it here: https://tiswww.case.edu/php/chet/readline/rluserman.html#index-undo-_0028C_002d_005f-or-C_002dx-C_002du_0029

Window version: Windows 11 24H2 (OS Build 26100.2605)

Fluent Terminal version: 0.7.7.0

WSL: Ubuntu 24.04, Oracle Linux 9.4

SSH: Debian 11

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

2 participants