Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.39k stars 226 forks source link

Character inputs that require the Alt key are not working #818

Open mp-t opened 6 months ago

mp-t commented 6 months ago

When trying to input text to search for that requires usage of the Alt key, e.g. the backslash \ on the German keyboard layout, broot just eats the input and does not register a character.

Tested on Windows Terminal and Windows conhost. Broot version 1.26.1

Canop commented 6 months ago

Many shortcuts involving the alt keys aren't usable in ANSI terminals.

You can use print_keys to check what's available, and how it's received by the TUI application: https://github.com/Canop/print_key

mp-t commented 6 months ago

Not sure if I follow completely but you can use those key combinations in both terminals directly as well as other applications running inside those terminals.

Canop commented 6 months ago

I don't have the same keyboard than you so it's a little hard to be sure. Can you tell me what print_key says when you type the intended combination, and whether it looks right to you ?

mp-t commented 6 months ago

The right Alt key is interpreted as Ctrl+Alt. This is reflected in the print_key output:

You typed Ctrl-Alt-\

This looks correct to me.

FrancescElies commented 2 weeks ago

I could maybe help with this one, i will give it a try the coming week

FrancescElies commented 2 weeks ago

@Canop I could reproduce the issue. this personally does not affect me but since I happen to have german keyboard, for this experiment I switched from US to DE input.

Bottom right you see keys as I press them, where you see ctr+alt+[ imagine altgr+\, don't ask me why the keyboard logger shows that instead of altgr+\.

image

Below a screen recording of the thing.

https://github.com/user-attachments/assets/867b5064-3128-4477-b4a1-50e05435bc9b

@Canop shouldn't print-key see \ instead of Ctrl-Alt-\?

Canop commented 2 weeks ago

Is the problem specifically related to ctrl-alt-\ or to any combination involving alt-\ ?

FrancescElies commented 2 weeks ago

any combination with altgr, same issue for the } and ] which are on the left side of the \

image

FrancescElies commented 1 week ago

@Canop I believe this is the issue we are seeing here https://github.com/crossterm-rs/crossterm/issues/820