emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xterm.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c
Date: Tue, 05 Oct 2004 07:13:27 -0400

Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.843 emacs/src/xterm.c:1.844
*** emacs/src/xterm.c:1.843     Mon Oct  4 14:07:06 2004
--- emacs/src/xterm.c   Tue Oct  5 10:52:53 2004
***************
*** 3383,3394 ****
       Alt keysyms are on.  */
    {
      int row, col;     /* The row and column in the modifier table.  */
  
      for (row = 3; row < 8; row++)
        for (col = 0; col < mods->max_keypermod; col++)
        {
!         KeyCode code
!           = mods->modifiermap[(row * mods->max_keypermod) + col];
  
          /* Zeroes are used for filler.  Skip them.  */
          if (code == 0)
--- 3383,3396 ----
       Alt keysyms are on.  */
    {
      int row, col;     /* The row and column in the modifier table.  */
+     int found_alt_or_meta;
  
      for (row = 3; row < 8; row++)
+     {
+       found_alt_or_meta = 0;
        for (col = 0; col < mods->max_keypermod; col++)
        {
!         KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col];
  
          /* Zeroes are used for filler.  Skip them.  */
          if (code == 0)
***************
*** 3406,3438 ****
                  {
                  case XK_Meta_L:
                  case XK_Meta_R:
                    dpyinfo->meta_mod_mask |= (1 << row);
                    break;
  
                  case XK_Alt_L:
                  case XK_Alt_R:
                    dpyinfo->alt_mod_mask |= (1 << row);
                    break;
  
                  case XK_Hyper_L:
                  case XK_Hyper_R:
!                   dpyinfo->hyper_mod_mask |= (1 << row);
                    break;
  
                  case XK_Super_L:
                  case XK_Super_R:
!                   dpyinfo->super_mod_mask |= (1 << row);
                    break;
  
                  case XK_Shift_Lock:
                    /* Ignore this if it's not on the lock modifier.  */
!                   if ((1 << row) == LockMask)
                      dpyinfo->shift_lock_mask = LockMask;
                    break;
                  }
              }
          }
        }
    }
  
    /* If we couldn't find any meta keys, accept any alt keys as meta keys.  */
--- 3408,3451 ----
                  {
                  case XK_Meta_L:
                  case XK_Meta_R:
+                   found_alt_or_meta = 1;
                    dpyinfo->meta_mod_mask |= (1 << row);
                    break;
  
                  case XK_Alt_L:
                  case XK_Alt_R:
+                   found_alt_or_meta = 1;
                    dpyinfo->alt_mod_mask |= (1 << row);
                    break;
  
                  case XK_Hyper_L:
                  case XK_Hyper_R:
!                   if (!found_alt_or_meta)
!                     dpyinfo->hyper_mod_mask |= (1 << row);
!                   code_col = syms_per_code;
!                   col = mods->max_keypermod;
                    break;
  
                  case XK_Super_L:
                  case XK_Super_R:
!                   if (!found_alt_or_meta)
!                     dpyinfo->super_mod_mask |= (1 << row);
!                   code_col = syms_per_code;
!                   col = mods->max_keypermod;
                    break;
  
                  case XK_Shift_Lock:
                    /* Ignore this if it's not on the lock modifier.  */
!                   if (!found_alt_or_meta && ((1 << row) == LockMask))
                      dpyinfo->shift_lock_mask = LockMask;
+                   code_col = syms_per_code;
+                   col = mods->max_keypermod;
                    break;
                  }
              }
          }
        }
+     }
    }
  
    /* If we couldn't find any meta keys, accept any alt keys as meta keys.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]