Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,475
    • Issues 1,475
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 246
    • Merge requests 246
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gtkgtk
  • Merge requests
  • !4770

[GTK3] gtkkeyhash: Fix some Ctrl + Alt accelerators not working on Win32

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Isopod requested to merge Isopod/gtk:polish-shortcut-fix-attempt-2 into gtk-3-24 May 28, 2022
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 2

On the Inkscape bug tracker, a bug was reported regarding some shortcuts involving Ctrl + Alt on Win32. This MR is a fix attempt for that bug.

From the commit message:

On Win32, "Ctrl + Alt" (= AltGr) can change the keyval for a key. Because _gtk_key_hash_lookup compares keyvals rather than keycodes, this meant that some accelerators involving the Ctrl + Alt modifiers were not detected. For example, on the Polish Programmers Layout, Ctrl + Alt + C produces ć. This made it impossible to trigger the accelerator Ctrl + Alt + C on that layout [0]. Since both Ctrl + Alt + C and ć are potentially valid accelerators, we have to check for and accept both variants. We do this by performing the key translation twice if Ctrl+Alt is present: Once with Ctrl+Alt modifiers, and once without. Then we accept either keyval.

[0] https://gitlab.com/inkscape/inkscape/-/issues/3572

I also removed the code from gdkkeys-win32.c that set MOD2 in the presence of AltGr because that doesn’t actually make a lot of sense with the way we do things now.

Edited May 28, 2022 by Isopod
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: polish-shortcut-fix-attempt-2