Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Re: Modifier mapping suddenly broken?

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Re: Modifier mapping suddenly broken?


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: Lionel Elie Mamane <address@hidden>
  • Cc: Joris van der Hoeven <address@hidden>, Norbert Nemec <address@hidden>, <address@hidden>
  • Subject: Re: [TeXmacs] Re: Modifier mapping suddenly broken?
  • Date: Tue, 30 Nov 2004 15:15:33 +0100 (CET)


> How does it determine which numbered modifier is which named modifier,
> then? Can you please give me a headstart and point me to the right
> file? Thanks.

The current keyboard handling is done in

src/Window/X/x_init.cpp
src/Window/X/x_loop.cpp

and especially in the following routine:

string
x_display_rep::look_up_key (XKeyEvent* ev) {
KeySym key= 0;
XLookupString (ev, NULL, 0, &key, NULL);
string s= ((ev->state&3)? upper_key [key]: lower_key [key]);
if ((N(s)>=2) && (s[0]=='K') && (s[1]=='-')) s= s (2, N(s));

/* other keyboard modifiers */
if (N(s)==0) return s;
if (ev->state&4) s= "C-" * s;
if (ev->state&8) s= "Mod1-" * s;
if (ev->state&16) s= "Mod2-" * s;
if (ev->state&32) s= "Mod3-" * s;
if (ev->state&64) s= "Mod4-" * s;
if (ev->state&128) s= "Mod5-" * s;
// cout << "key press: " << s << LF;
return s;
}

Apparently, when you press the Windows key, then the state becomes 72,
with the bugged version of X.




Archive powered by MHonArc 2.6.19.

Top of Page