After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 531599 - Make it possible to use accel modifier (Alt) in input
Make it possible to use accel modifier (Alt) in input
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-05-05 18:26 UTC by Richard Hult
Modified: 2011-09-17 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow Alt for text input with quartz backend (3.02 KB, patch)
2008-05-05 18:28 UTC, Richard Hult
none Details | Review
Compile fix (3.02 KB, patch)
2008-05-05 18:44 UTC, Richard Hult
none Details | Review

Description Richard Hult 2008-05-05 18:26:13 UTC
In order to have Mac-like behavior in the quartz backend, we need to be able to have Alt act both as an accel modifier and for text input. The reason is that Alt is used both for accels and to produce  characters like "ß∂ƒ@£$|[]" etc. Currently places like the simple imcontext implementation filters out all events that match the default mod mask.

The idea is to instead of hardcoding Shift as a modifier that can be used for both things, have a function that returns the mask and set it differently per backend. Will attach a patch that does this.

I'm not sure how much this breaks assumptions in GTK+...
Comment 1 Richard Hult 2008-05-05 18:28:00 UTC
Created attachment 110419 [details] [review]
Allow Alt for text input with quartz backend
Comment 2 Johan (not receiving bugmail) Dahlin 2008-05-05 18:31:29 UTC
Comment on attachment 110419 [details] [review]
Allow Alt for text input with quartz backend

>Index: gtk/gtkaccelgroup.c

>+#ifndef GDK_WINDOWING_QUARTZ
>+  return GDK_SHIFT_MASK;
>+#else
>+  return GDK_SHIFT_MASK | GDK_MOD1_MASK);
>+#endif
>+}

The else part doesn't quite look like it's compilable.
Comment 3 Richard Hult 2008-05-05 18:44:59 UTC
Created attachment 110421 [details] [review]
Compile fix

Thanks, updated.
Comment 4 Richard Hult 2008-05-25 07:27:27 UTC
Adding for the record: Tim suggested moving the added function into the backends instead, or  to just hard code shift+mod1 instead.
Comment 5 Michael Natterer 2011-09-17 14:22:34 UTC
All bugs about modifier problems have been obsoleted by the commits
I pushed to gtk-2-24 in the last few days. Once the stuff is more complete,
I'll port it to master.