From owner-freebsd-hackers Mon Jul 12 12:30:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from thelab.hub.org (nat206.255.mpoweredpc.net [142.177.206.255]) by hub.freebsd.org (Postfix) with ESMTP id 959CF1514D for ; Mon, 12 Jul 1999 12:30:43 -0700 (PDT) (envelope-from scrappy@hub.org) Received: from localhost (scrappy@localhost) by thelab.hub.org (8.9.3/8.9.1) with ESMTP id QAA17523; Mon, 12 Jul 1999 16:29:52 -0300 (ADT) (envelope-from scrappy@hub.org) X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs Date: Mon, 12 Jul 1999 16:29:52 -0300 (ADT) From: The Hermit Hacker To: Warner Losh Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: keymapping continued ... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Okay, slowly getting somewhere, I think... We setup the .Xdefaults file, as follows, on the remote server and are starting an xterm to the client machine, which is "acceptable", but I must be missing something: XTerm*vt100*translations: #override \n\ Shift F1:string(0x1B) string(0x5B) string(0x33) string(0x33) string(0x7E)\n\ F1:string(0x1B) string(0x4F) string(0x50)\n\ Shift F5:string(0x1B) string(0x5B) string(0x33) string(0x35) string(0x7E)\n\ F5:string(0x1B) string(0x5B) string(0x31) string(0x36) string(0x7E)\n Now, when I press 'Shift F5', I get [35~ showing up on the app, but its as if the ESC didn't go through... Is there a better way I should be writing this? I'm going by the example it showed for sending "multiple characters", but there might be another function I should be using for this? The neat thing is that the F5 one worked fine, its only the 'Shift F5' one so far that isn't... Thanks... On Mon, 12 Jul 1999, The Hermit Hacker wrote: > > Perfect, slowly putting it together. One thing that I didn't find in the > man page, and am wondering if its just somethign I did wrong, but does > ordering matter? > > I put in, first time through: > > F1: ... > Shift F1: ... > > And it Shift-F1 and F1 both gave the same answers... > > But, if I reverse it, it works as expected/hoped... > > Mistake on my part, or normal? > > thanks... > > On Mon, 12 Jul 1999, Warner Losh wrote: > > > In message > > The Hermit Hacker writes: > > : I need to build a keyboard map such that: > > : > > : F1 == ESC OP > > : F2 == ESC OQ > > : Shift-F1 == ESC [31~ > > : Shift-F2 == ESC [32~ > > > > Why not do this with Xterm translations? Generally speaking xmodmap > > and friends are poor choices to even think about doing this with since > > they don't translate function keys to escape sequences. The > > applications do that, if they want. The only time you're likely to > > need them is in a terminal emulation situation, which makes xterm the > > logical place to do this. > > > > : Hopefully this makes a bit more sense? > > > > Yes. It does. You should use the translations resource for XTerm to > > accomplish this. From my .Xdefaults file: > > > > XTerm*vt100*translations: #override \n\ > > Alt y: insert-selection( PRIMARY, CUT_BUFFER0 ) \n\ > > Meta y: insert-selection( PRIMARY, CUT_BUFFER0 ) \n\ > > BackSpace: string( 0x7f )\n > > > > is one example. It allows me to "map" the BackSpace key into a DEL > > character (which in my religion is the right thing to do, your > > religion might vary), as well as giving me an easy way to paste, at > > least into xterms when I don't have a middle mouse button. > > > > This could easily be expanded to include all the vt220 keys that your > > boss/coworker needs in xterm. > > > > Check out the xterm man page for a more complete example, including > > ways of mapping different keymaps at the touch of a key. > > > > Warner > > > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy > Systems Administrator @ hub.org > primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message