Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libXt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • lib
  • libXt
  • Merge requests
  • !45

Open
Created Oct 09, 2020 by Jann Horn@jannh
  • Report abuse
Report abuse

don't ignore missing non-standard modifiers in _XtMatchUsingDontCareMods

  • Overview 1
  • Commits 1
  • Changes 1

In xterm-360, VTInitTranslations() configures some bindings for keys in a way that requires only the explicitly listed modifiers to be present, but places no constraints on any other modifiers - e.g. insert-selection is bound to Shift <KeyPress> Insert, so if the user e.g. presses Ctrl+Shift+Insert, the action will still fire.

https://www.x.org/releases/X11R7.5/doc/Xt/Xt.html Appendix B, which specifies the Translation Table syntax, says that not only additional modifiers are ignored, but missing modifiers that make up the key are also ignored. As the spec says:

‘‘A’’ and ‘‘a’’ are equivalent

In that example, A is normally composed as Shift+A, but the Shift modifier can be omitted.

On most keyboard layouts, keys such as Insert, Return and KP_Add don't contain modifiers, so everything works fine. However, in the german neo2 layout:

  • Mod5+Ä forms Insert
  • Mod5+Q forms KP_Add

This means that when VTInitTranslations() says that we want to bind to Shift+KP_Add and don't care about any other modifiers (other than Ctrl) being added or removed, the result is that when the user presses Shift+Q (for capital Q), or Shift+Mod3+Q (for ϕ), the terminal's font size will be changed instead.

While libXt is kind of working as documented here, the behavior doesn't really make much sense. Let's tweak _XtMatchUsingDontCareMods such that missing non-standard modifiers are never ignored.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: neofix1