key Shift+Prior not working for scroll-up in xterm but in urxvt
Matthias Apitz
guru at unixarea.de
Mon Feb 9 13:59:13 UTC 2015
El día Monday, February 09, 2015 a las 04:54:05AM -0500, Thomas Dickey escribió:
> not immediately: my keyboard does not have a mode_switch key
> (unless I tinker with xmodmap...).
>
> But here's a guess:
>
> Xt's translations don't know about mode_switch as such, so a fix is
> likely to be in xmodmap. While xmodmap's manpage is vague about the
> recognized modifiers, mentioning them by name only once:
>
> clear MODIFIERNAME
> This removes all entries in the modifier map for the given mod‐
> ifier, where valid name are: Shift, Lock, Control, Mod1, Mod2,
> Mod3, Mod4, and Mod5 (case does not matter in modifier names,
> although it does matter for all other names). For example,
> ``clear Lock'' will remove all any keys that were bound to the
> shift lock modifier.
>
> The source code for the xmodmap program does not have a table of these names.
> That is in the library. The library defines this table:
>
> static ModifierRec modifiers[] = {
> {"Shift", 0, ParseModImmed,ShiftMask},
> {"Lock", 0, ParseModImmed,LockMask},
> {"Ctrl", 0, ParseModImmed,ControlMask},
> {"Mod1", 0, ParseModImmed,Mod1Mask},
> {"Mod2", 0, ParseModImmed,Mod2Mask},
> {"Mod3", 0, ParseModImmed,Mod3Mask},
> {"Mod4", 0, ParseModImmed,Mod4Mask},
> {"Mod5", 0, ParseModImmed,Mod5Mask},
> {"Meta", 0, ParseModSym, XK_Meta_L},
> {"m", 0, ParseModSym, XK_Meta_L},
> {"h", 0, ParseModSym, XK_Hyper_L},
> {"su", 0, ParseModSym, XK_Super_L},
> {"a", 0, ParseModSym, XK_Alt_L},
> {"Hyper", 0, ParseModSym, XK_Hyper_L},
> {"Super", 0, ParseModSym, XK_Super_L},
> {"Alt", 0, ParseModSym, XK_Alt_L},
> {"Button1", 0, ParseModImmed,Button1Mask},
> {"Button2", 0, ParseModImmed,Button2Mask},
> {"Button3", 0, ParseModImmed,Button3Mask},
> {"Button4", 0, ParseModImmed,Button4Mask},
> {"Button5", 0, ParseModImmed,Button5Mask},
> {"c", 0, ParseModImmed,ControlMask},
> {"s", 0, ParseModImmed,ShiftMask},
> {"l", 0, ParseModImmed,LockMask},
> };
>
> and also in the library it treats the mode-switch specially (without naming
> it):
>
> InitialI.h:307: Modifiers mode_switch; /* keyboard group modifiers */
> TMkey.c:451: pd->mode_switch = 0;
> TMkey.c:464: if ((keysym == XK_Mode_switch) && (i > 2))
> TMkey.c:465: pd->mode_switch |= 1 << i;
> TMkey.c:531: *modifiers_return = (ShiftMask|LockMask) | pd->mode_switch | pd->num_lock;
> TMkey.c:541: if ((per > 2) && (modifiers & pd->mode_switch)) {
>
> So... I think that you could make this work by using xmodmap to assign
> one of the mod1-mod5 modifier names to the mode-switch key, and using
> that modifier in a translations resource binding for xterm.
I tried your hint:
$ xmodmap -pk | fgrep Mode_switch
8 0xff7e (Mode_switch) 0x0000 (NoSymbol) 0xff7e (Mode_switch)
64 0xff7e (Mode_switch) 0x0000 (NoSymbol) 0xff7e (Mode_switch)
$ xmodmap -e 'add Mod3 = Mode_switch'
X Error of failed request: BadValue (integer parameter out of range for
operation)
Major opcode of failed request: 118 (X_SetModifierMapping)
Value in failed request: 0x17
Serial number of failed request: 11
Current serial number in output stream: 11
Perhaps, I understand you wrong?
matthias
--
Matthias Apitz, guru at unixarea.de, http://www.unixarea.de/ +49-170-4527211
La referencia de la Duma a la anexión de la RDA, en este caso al contrario con la Crimlía sin
referéndum, no solamente tiene gracia sino da en el blanco.-
Marinos Yannikos @MarinosYannikos en un blog de RTdeutsch.
More information about the freebsd-questions
mailing list