Skip to content

[201_104] Fix : Shift+Tab results in empty popup window on >#2726#3256

Open
Dylan-end wants to merge 7 commits intoMoganLab:mainfrom
Dylan-end:main
Open

[201_104] Fix : Shift+Tab results in empty popup window on >#2726#3256
Dylan-end wants to merge 7 commits intoMoganLab:mainfrom
Dylan-end:main

Conversation

@Dylan-end
Copy link
Copy Markdown

@Dylan-end Dylan-end commented Apr 29, 2026

Fixes #2726
Shift+Tab results in empty popup window on >

Summary

When typing > in math mode and pressing Shift+Tab to cycle backwards through variants, the Tab cycling popup window appears empty instead of showing the expected symbol variants.
Developer Document: devel/201_104.md

The backwards cycling (Shift+Tab) for the > key fails to display any variant in the popup.

Root Cause

The keyboard event handling for Shift+Tab in math mode does not correctly trigger the variant cycling mechanism for the > symbol. Specifically:

1.Shift+Tab is treated as an independent key combination and is not correctly mapped to the "previous variant" operation in the math editing context.
2.When '>' is the first symbol in the variant menu and the user presses Shift+Tab, the system's handling method is to convert it into multiple 'Tab' presses and iterate through < + n 'Tab's to check for existence, until it reaches the last symbol in the variant menu.
3.In the initial definition of < + 6 Tab presses, the last entry consists of two characters and requires special handling. However, such handling is currently only implemented for math-bracket-open. Therefore, < + 6 Tab presses should be changed to math-bracket-open.

As a result, the popup window is empty, and the user cannot see any selectable options.

Changes

In ~/mogan/TeXmacs/progs/math/math-kbd.scm, simply change the definition of < + 6 Tab presses to use math-bracket-open.

How to test

  1. Open Mogan Editor.
  2. Enter math mode by pressing $.
  3. Type > (greater-than sign).
  4. Expected behavior before fix: Pressing Shift+Tab shows an empty popup window (or no popup at all).
  5. Press Shift+Tab repeatedly to cycle backwards through variants.
  6. Verify: The popup window displays the correct variants in order.

Before (Problem)

image
  • When pressing Shift+Tab on >, the popup window is completely empty.

After (Fix)

image
  • Shift+Tab now shows the variant list correctly.

Additional Notes

  • "Only one file actually needs to be changed; the other changes were added while I was debugging."

@Dylan-end
Copy link
Copy Markdown
Author

Dylan-end commented May 1, 2026

Update: The uploaded files have already been formatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tab cycling >对应的shift tab是空的

1 participant