Incorrect Shift / Meta / Control bits set in xterm mouse mode #11438

Open
opened 2026-01-31 02:47:41 +00:00 by claunia · 0 comments
Owner

Originally created by @chaosemer on GitHub (Nov 16, 2020).

Originally assigned to: @DHowett on GitHub.

Environment

  • Windows build number: Microsoft Windows [Version 10.0.19042.630]
  • Windows Terminal version (if applicable): 1.4.3141.0
    • (This also applies to the legacy Windows Command Prompt app.)
  • Debian version (cat /etc/debian_version): 10.6

Steps to reproduce

  1. Run debian.
  2. Enable xterm mouse tracking mode:
    $ echo -e '\e[?1000h'
    
  3. Click on the upper right-most character with the left mouse button. Try doing this with a mix of Ctrl, Alt, and/or Shift held down.

Expected behavior

Per https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking, we should get back six characters on a mouse button down event followed by an additional six characters on a mouse button up event. The first three characters (ESC [ M) will not be displayed, only the last three characters per event get displayed - this is not a bug, it is just important to understand.

  • A mouse button 1 down event with no modifiers held should display the following three characters: Space ! !
  • A mouse button 1 down event with control held should display the following three characters: 0 ! !
  • A mouse button 1 down event with alt held should be treated as meta and display the following three characters: ( ! !
  • A mouse button 1 down event with shift held should display the following three characters: $ ! !
  • A mouse button 1 down event with control and alt held should display the following three characters: 8 ! !

Actual behavior

  • With control held, you get ( ! ! as if meta is held.
  • With alt held, you get Space ! !, as if nothing is held.
  • With shift held, you select characters (This is likely not a bug, just an override that I did not disable.)
  • With control and alt held, you get ( ! !, as if only meta is held.
Originally created by @chaosemer on GitHub (Nov 16, 2020). Originally assigned to: @DHowett on GitHub. # Environment * **Windows build number:** Microsoft Windows [Version 10.0.19042.630] * **Windows Terminal version (if applicable):** 1.4.3141.0 * (This also applies to the legacy Windows Command Prompt app.) * **Debian version (cat /etc/debian_version):** 10.6 # Steps to reproduce 1. Run debian. 2. Enable xterm mouse tracking mode: ```bash $ echo -e '\e[?1000h' ```` 3. Click on the upper right-most character with the left mouse button. Try doing this with a mix of Ctrl, Alt, and/or Shift held down. # Expected behavior Per https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking, we should get back six characters on a mouse button down event followed by an additional six characters on a mouse button up event. The first three characters (`ESC` `[` `M`) will not be displayed, only the last three characters per event get displayed - this is not a bug, it is just important to understand. * A mouse button 1 down event with no modifiers held should display the following three characters: `Space` `!` `!` * A mouse button 1 down event with control held should display the following three characters: `0` `!` `!` * A mouse button 1 down event with alt held should be treated as meta and display the following three characters: `(` `!` `!` * A mouse button 1 down event with shift held should display the following three characters: `$` `!` `!` * A mouse button 1 down event with control and alt held should display the following three characters: `8` `!` `!` # Actual behavior * With control held, you get `(` `!` `!` as if meta is held. * With alt held, you get `Space` `!` `!`, as if nothing is held. * With shift held, you select characters (This is likely not a bug, just an override that I did not disable.) * With control and alt held, you get `(` `!` `!`, as if only meta is held.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11438