fzf icon indicating copy to clipboard operation
fzf copied to clipboard

Disable-click but allow scroll

Open edi9999 opened this issue 6 months ago • 4 comments

Checklist

  • [x] I have read through the manual page (man fzf)
  • [x] I have searched through the existing issues
  • [x] For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.64.0 (0076ec2e)

OS

  • [x] Linux
  • [ ] macOS
  • [ ] Windows
  • [ ] Etc.

Shell

  • [x] bash
  • [ ] zsh
  • [ ] fish

Problem / Steps to reproduce

I want to disable mouse clicks in fzf to enable text selection in alacritty. I discovered that using the --no-mouse option works well, but it prevents me from scrolling through entries with the mouse. Is there a way to allow scrolling without enabling clicking? I use the alacritty terminal.

edi9999 avatar Jul 16 '25 14:07 edi9999

(I also would like to allow scroll inside the preview window)

edi9999 avatar Jul 16 '25 14:07 edi9999

Technically, I think this would be here :

func (r *LightRenderer) disableMouse() {
	if r.mouse {
		r.csi("?1000l")  // this is for click events
		r.csi("?1002l") // // this is for click events
		r.csi("?1006l") // // this is for scroll events
	}
}

edi9999 avatar Jul 16 '25 14:07 edi9999

// this is for scroll events

I don't think that's accurate. https://github.com/junegunn/fzf/commit/70529878e20cf0367ca25b0aa9dbf1f51062f5e0

That said, in Kitty, I can still select text using the mouse by holding down the shift key, even when --mouse is enabled. Maybe Alacritty has a similar workaround or configurable behavior.

junegunn avatar Jul 19 '25 07:07 junegunn

Thanks for your response, I can indeed hit shift at the same time, it works on my term as well (xfce4-terminal), I wanted to achieve this without having to use "both hands", and just with the mouse.

edi9999 avatar Jul 30 '25 22:07 edi9999