unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Modifier handling in pgtk
@ 2021-12-11 23:25 Brennan Vincent
  2021-12-12  1:15 ` Po Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Brennan Vincent @ 2021-12-11 23:25 UTC (permalink / raw)
  To: emacs-devel

Hello,

It seems like pgtkterm.c is simply always assuming that mod4 corresponds
to the super key, mod3 to hyper, and so on. For example, in this code
from x_find_modifier_meanings :

   state = GDK_HYPER_MASK;
   r = gdk_keymap_map_virtual_modifiers (keymap, &state);
   if (r)
     {
       /* Hyper key exists. */
       if (state == GDK_HYPER_MASK)
	{
	  dpyinfo->hyper_mod_mask = GDK_MOD3_MASK;	/* maybe this is hyper. */
	}
       else
	{
	  dpyinfo->hyper_mod_mask = state & ~GDK_HYPER_MASK;
	}
     }
   else
     {
       dpyinfo->hyper_mod_mask = GDK_MOD3_MASK;
     }

Later when we receive key events, we will check them against this
`hyper_mod_mask` and therefore think that any with mod3 set have the
hyper key set. The result is that things won't work right for people who
have used xmodmap to change which modifier flags hyper, super, etc. are
mapped to.

I'm confused about what's going on here -- why do we need to set up this
state in dpyinfo at all; why can't we just compare against
GDK_HYPER_MASK, GDK_SUPER_MASK, etc. directly in



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-23 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11 23:25 Modifier handling in pgtk Brennan Vincent
2021-12-12  1:15 ` Po Lu
2021-12-12 13:15   ` Yuuki Harano
2021-12-23  9:35     ` Jindřich Makovička
2021-12-23  9:40       ` Po Lu
2021-12-23 14:42       ` Yuuki Harano

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).