GNOME Bugzilla – Bug 531599
Make it possible to use accel modifier (Alt) in input
Last modified: 2011-09-17 14:22:34 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+...
Created attachment 110419 [details] [review] Allow Alt for text input with quartz backend
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.
Created attachment 110421 [details] [review] Compile fix Thanks, updated.
Adding for the record: Tim suggested moving the added function into the backends instead, or to just hard code shift+mod1 instead.
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.