Date: Mon, 12 Jul 1999 12:24:54 -0600 From: Warner Losh <imp@village.org> To: The Hermit Hacker <scrappy@hub.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: keymapping continued ... Message-ID: <199907121824.MAA43366@harmony.village.org> In-Reply-To: Your message of "Mon, 12 Jul 1999 15:04:43 -0300." <Pine.BSF.4.05.9907121449570.66634-100000@thelab.hub.org> References: <Pine.BSF.4.05.9907121449570.66634-100000@thelab.hub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 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?199907121824.MAA43366>