Date: Mon, 12 Jul 1999 16:02:44 -0300 (ADT) From: The Hermit Hacker <scrappy@hub.org> To: Warner Losh <imp@village.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: keymapping continued ... Message-ID: <Pine.BSF.4.05.9907121601370.66634-100000@thelab.hub.org> In-Reply-To: <199907121824.MAA43366@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <KeyPress> F1: ... Shift <KeyPress> 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 <Pine.BSF.4.05.9907121449570.66634-100000@thelab.hub.org> > 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 <KeyPress> y: insert-selection( PRIMARY, CUT_BUFFER0 ) \n\ > Meta <KeyPress> y: insert-selection( PRIMARY, CUT_BUFFER0 ) \n\ > <KeyPress> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9907121601370.66634-100000>