Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • I had this issue OSX iTerm connected to tmux on Linux server. Solved it printf '\e[?1000l' solved it like a magic. Commented Jul 12, 2018 at 20:19
  • 2
    You can set an alias for this with alias resetmouse='printf '"'"'\e[?1000l'"'"
    – jtpereyda
    Commented Jul 16, 2018 at 18:31
  • 8
    Is there a way to do this automatically when detaching from tmux?
    – Ehsan Kia
    Commented Dec 2, 2019 at 16:54
  • 1
    I just tested print '\e[?1000l' and that worked for me. However, a simpler command to type that works just as well is vim +q (this command opens vim and immediately closes it, allowing vim to properly reset mouse interactions). Of course, you need vim installed for it to work, but it's very likely that you already have it on your system.
    – J-L
    Commented Dec 7, 2023 at 16:28
  • To automate this process, I'm using the following bash function which starts an SSH session and executes tmux. After tmux is terminated (either abruptly or normally) mouse reporting is disabled: ``` function ssht() { ssh -t "$@" 'tmux' printf '\e[?1000l' } ```
    – matanb
    Commented May 21 at 15:19