broot: MacOs: alt-enter doesn't work for everybody (define another combination?)
alt-enter on mac seems to do the same than enter.
If some people are able to test on Mac, please tell me and watch this issue so that I can let you test before official release.
Please people also check the version of broot you have is at least 0.11.3. I suspect some obsolete brew formula is still around.
Please note that you always can remap yourself to another key combination:
[[verbs]]
key = "ctrl-o"
execution = ":open_leave"
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 37 (11 by maintainers)
Commits related to this issue
- feat(lf): use broot to jump to directories Mapping "gt" (mnemonic, "go to"). Alt-Enter cds to the selected item; needs tweak in iTerm as noted here: https://github.com/Canop/broot/issues/86#issu... — committed to wincent/wincent by wincent 4 years ago
- fix(iterm): make Option-Enter work in Broot As described here: https://github.com/Canop/broot/issues/86#issuecomment-635963436 We don't want to treat Option as Escape across the board (because it b... — committed to wincent/wincent by wincent 4 years ago
option+enteron MacOS Terminal and iTerm need to be set up by users to work properly. Setting it to outputEsc+Enterworked for me on iTerm2.In the default Terminal.app, enabling the “Use Option as Meta Key” works (for me).
@NickyWeber A
cdmust be done on the parent shell, that’s why there’s thebrfunction. Assuming you use br, you could use this parameterization:On Windows (e.g. CMD using the WSL Ubuntu) the key combination <kbd>Alt</kbd>+<kbd>Enter</kbd> is used for entering Fullscreen…
Setting iTerm as follow does not require any change of configuration under broot:
@Etheryte I think the Homebrew version is
0.10.3, it seems that there have been versions released that fix thealt-enterYou can map another combination. The verb is
:open_leave(the counterpart is:open_stay):This is a good workaround, but only as long as you don’t need to use the option key to type “special” characters such as
é,ñ,ü, or€etc. I’m afraid that makes it a bit of a deal-breaker for me; I’m going to look into using Karabiner-Elements to remap justoption+enterand nothing else, and only in the terminal, but that is a pretty invasive/complex workaround — ideally, it would be possible to map another combination for doing whatalt+enterdoes.Update:
I didn’t need to go as far as using Karabiner-Elements. I was able to keep the ability to type
éetc with this config:It is difficult to support all key codes all systems and all terminals. This isn’t quite universal. And there are a lot of edge cases. An ANSI code parsing layer is in the making. The plan is that Crossterm will use this library for parsing input events. Please have a look over at https://github.com/crossterm-rs/crossterm/pull/330. You might even want to test with this branch for broot.
Looks like the key events are coming from the crossterm lib.
We might need to hook into and log e.g., the
could_not_parse_event_errors being raised in https://github.com/crossterm-rs/crossterm/blob/71029c4a8719ce08a2fa487d9403610ec48acf42/src/event/sys/unix/parse.rs to capture the exact bytes that e.g., iTerm2 is sending.That lib might also end up needing some code specifically for OSX and/or iTerm. Right now it doesn’t look any OSX terminals are part of their test suite.
In the mean time, we can work around by setting ESC+ per https://github.com/Canop/broot/issues/86#issuecomment-572641935
@okomarov @Canop I’m using Alacritty there it works (
cds into the directory and exits), I can confirm it doesn’t work in iTerm (does the same as plain enter)