mailing-list for TeXmacs Users

Text archives Help


Re: Modifier mapping suddenly broken?


Chronological Thread 
  • From: Lionel Elie Mamane <address@hidden>
  • To: Norbert Nemec <address@hidden>
  • Cc: address@hidden
  • Subject: Re: Modifier mapping suddenly broken?
  • Date: Mon, 29 Nov 2004 21:33:33 +0100

On Mon, Nov 29, 2004 at 09:16:47PM +0100, Norbert Nemec wrote:

> I didn't use TeXmacs over several weeks, no I opened it again and
> found to my surprise, that the Alt-Key is suddenly mapped to the
> M-modifier. (under Linux/Debian)

The way X does modifiers has changed. This broke at least Emacs,
TeXmacs and sawfish (I think also the KDE wm); the X guys say that
these programs are broken. A "fix" for Emacs is now in the Debian
package.

See:
http://bugs.debian.org/271542
http://bugs.debian.org/255286
http://bugs.debian.org/263073
http://bugs.debian.org/256706

The emacs fix:

--- emacs-21.3+1.orig/src/xterm 2004-09-14 19:06:11.000000000 +0200
+++ emacs-21.3+1/src/xterm.c 2004-09-16 22:23:24.000000000 +0200
@@ -6380,8 +6380,11 @@
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
@@ -6403,33 +6406,44 @@
{
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:
- dpyinfo->hyper_mod_mask |= (1 << row);
+ 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:
- dpyinfo->super_mod_mask |= (1 << row);
+ 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 ((1 << row) == LockMask)
+ 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. */


--
Lionel



Archive powered by MHonArc 2.6.19.

Top of page