mouse input only work in the left of window #13595

Closed
opened 2026-01-31 03:46:56 +00:00 by claunia · 1 comment
Owner

Originally created by @ch2925 on GitHub (Apr 23, 2021).

Description of the new feature/enhancement

when I am using tools like vim and htop,the mouse input only work in the left of the window,about 90 columns in the left.on the right mouse click is not working.
My 2 devices both met this problem.
issue

Proposed technical implementation details (optional)

image

Originally created by @ch2925 on GitHub (Apr 23, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement when I am using tools like vim and htop,the mouse input only work in the left of the window,about 90 columns in the left.on the right mouse click is not working. My 2 devices both met this problem. ![issue](https://user-images.githubusercontent.com/46040749/115826459-8b2eea00-a43d-11eb-9dc0-4d1e90e7b3d0.gif) <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) ![image](https://user-images.githubusercontent.com/46040749/115827698-3d1ae600-a43f-11eb-91d4-b6c788ebcf62.png) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureResolution-By-DesignNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 03:46:56 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 23, 2021):

These applications are using the legacy mouse encoding, which we must support for compatibility reasons. This is a snippet from the Vim help:

xterm	xterm-like mouse handling.  The mouse generates
     	"<Esc>[Mscr", where "scr" is three bytes:      
     		"s"  = button state                    
     		"c"  = column plus 33                  
     		"r"  = row plus 33                     
     	This only works up to 223 columns!  See "dec", 
     	"urxvt", and "sgr" for solutions.              

It says 223, but encoding issues practically limit it to ~93.

For vim, use :set ttymouse=sgr to choose the newest/best encoding that has support for inifinite coordinates. For htop, it would be good to report a bug to the htop issue tracker that it is requesting xterm mouse mode instead of SGR mouse mode.

@DHowett commented on GitHub (Apr 23, 2021): These applications are using the legacy mouse encoding, which we must support for compatibility reasons. This is a snippet from the Vim help: ``` xterm xterm-like mouse handling. The mouse generates "<Esc>[Mscr", where "scr" is three bytes: "s" = button state "c" = column plus 33 "r" = row plus 33 This only works up to 223 columns! See "dec", "urxvt", and "sgr" for solutions. ``` It says 223, but encoding issues practically limit it to ~93. For `vim`, use `:set ttymouse=sgr` to choose the newest/best encoding that has support for inifinite coordinates. For htop, it would be good to report a bug to the htop issue tracker that it is requesting xterm mouse mode instead of SGR mouse mode.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13595