wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.32k stars 136 forks source link

Alt keybindings not working on Mac OS #331

Open ryanpagel opened 5 months ago

ryanpagel commented 5 months ago

Check list

Environment info

Problem / Steps to reproduce

First of all, thank you this tool, I love using it!

The keybindings that use Alt do not work for me. Technically on Mac there is not Alt key there is only option. I've tried with multiple keyboards including the built-in Apple MacBook keyboard as well as an external Logitech keyboard. Here is an example of pressing option+e on a file, it just produces a tick character.

image

Any guidance would be much appreciated or if this is a new feature request it would also be appreciated. I would especially like to make use of the Alt - e and Alt - J and Alt - K options. Thank you.

cjappl commented 5 months ago

Hi! Thanks for the bug report.

This is working for me, using option as the modifier key (tested option+e option+J and option+k, all work as intended on my machine). Can you tell me what terminal emulator you use? I think I remember some configuration-foo you have to do on iTerm, I'll see if I can find it for you.

cjappl commented 5 months ago

Here's my note from my "provision a new machine" script:

echo "Allow left option to scroll in forgit: Iterm Preferences->Profile->Keys->Below the window->Left Option Key = Esc+"
ryanpagel commented 5 months ago

I'm using the default Mac Terminal and the VSCode integrated terminal.

cjappl commented 5 months ago

Does something like this work for Terminal?

https://osxdaily.com/2013/02/01/use-option-as-meta-key-in-mac-os-x-terminal/

For vscode I'm seeing suggestions to enable the option

'terminal.integrated.macOptionIsMeta'

cjappl commented 5 months ago

@ryanpagel can you confirm if either of these solutions work for you?

MingChen91 commented 2 months ago

Hey @ryanpagel, came across this thread as I having the same problem using iterm2. I found putting option as Esc+ seemed to have fixed it for me. Hope you have found the fix!

image