Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 1999 16:29:52 -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.9907121626370.66634-100000@thelab.hub.org>
In-Reply-To: <Pine.BSF.4.05.9907121601370.66634-100000@thelab.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <KeyPress> F1:string(0x1B) string(0x5B) string(0x33) string(0x33) string(0x7E)\n\
        <KeyPress> F1:string(0x1B) string(0x4F) string(0x50)\n\
        Shift <KeyPress> F5:string(0x1B) string(0x5B) string(0x33) string(0x35) string(0x7E)\n\
        <KeyPress> 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:
> 
> 	<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
> 

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.9907121626370.66634-100000>