From owner-freebsd-questions@FreeBSD.ORG Mon Feb 9 13:59:13 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DC94E82 for ; Mon, 9 Feb 2015 13:59:13 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C89660D for ; Mon, 9 Feb 2015 13:59:12 +0000 (UTC) Received: from [89.15.238.230] (helo=c720-r276659) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1YKorj-0006UV-7T; Mon, 09 Feb 2015 14:59:07 +0100 Date: Mon, 9 Feb 2015 14:59:03 +0100 From: Matthias Apitz To: Thomas Dickey Subject: Re: key Shift+Prior not working for scroll-up in xterm but in urxvt Message-ID: <20150209135903.GA4168@c720-r276659> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , Thomas Dickey , freebsd-questions@freebsd.org References: <20150206081525.GA1828@c720-r276659> <20150206092525.GA3070@aerie.jexium-island.net> <20150206130348.GA2764@c720-r276659> <20150209095405.GA32691@aerie.jexium-island.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150209095405.GA32691@aerie.jexium-island.net> X-Operating-System: FreeBSD 11.0-CURRENT r269739 (i386) User-Agent: Mutt/1.5.23 (2014-03-12) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.15.238.230 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 13:59:13 -0000 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@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.