gokcehan/lf

map keybind to ctrl-enter or shift-enter

Closed this issue · 2 comments

Using map <c-enter> something does not work (wheareas map <c-o> something works fine), is there another way to write a keybind for ctrl-enter? Same question for shift-enter (because map <ENTER> something also doesn't work).

I checked in the lf --doc but couldn't find the answer

Due to limitations with tcell I do not think it is possible to map Shift + Enter like it was discussed here: #943. I guess it is the same case for Ctrl + Enter

Like I mentioned in one of the comments, you could try making your terminal emulator to send another sequence whenever you press those keys. Alacritty supports making bindings like this:

[[keyboard.bindings]]
chars = "\u000A"
key = "Return"
mods = "Shift"

[[keyboard.bindings]]
chars = "\u000B"
key = "Return"
mods = "Control"

And then I am able to map <c-j> and <c-k> inside all other programs

This is a general issue with terminals, not an issue with lf. I have added a section in the Troubleshooting page of the wiki about this.