Help with setting Function key values in console

Matt Alexander plug-discuss@lists.plug.phoenix.az.us
Thu, 18 Apr 2002 18:03:34 -0700 (PDT)


I figured it out.  In my us.kmap file, I have to create the ^[ as one
character.  So in vi, I go:
Ctrl-v
Ctrl-[


On Thu, 18 Apr 2002, Matt Alexander wrote:

> On Thu, 18 Apr 2002 mondoshawan@tank.dyndns.org wrote:
>
> > On Thu, Apr 18, 2002 at 04:25:55PM -0700, Matt Alexander wrote:
> > >
> > > I used loadkeys to set this up:
> > >
> > > # loadkeys
> > > keycode 63 = F55
> > > string F55 = "^[[6~"
> > >
> > > If I press the F5 key while on the console, it prints this string.
> > > However, the app on the server behaves as if I'm actually typing in each
> > > of those characters individually, and that's not what I want.  The box I'm
> > > testing this on is Mandrake 8.2.
> > >
> > > If anyone has any suggestions on how to make this work or where I might
> > > find more information on how to configure this, I'd appreciate it.
> > > Thanks,
> > > ~M
> >
> > You'll notice that when you press F5 on your console, that the ^[ is treated
> > as two separate characters. The reason this happens, is because the ^[ is
> > not being interpreted by loadkeys as an escape code. What you have to do is
> > get that escape code into that string. An easy way to do this is use echo
> > -e. Eg:
> >
> >     echo -e '\033[6~'
> >
> > Using a bit of shell magic, you should be able to replace that above ^[ with
> > the real escape character.
>
> OK...  If I use loadkeys on the command line, then it works to do this:
>
> # loadkeys
> keycode 63 = F55
> string F55 = "\033[6~"
>
> However, when I put these same lines in my us.kmap file, it doesn't work.
> It generates 6~ as the output.  Any suggestions on how to get the escape
> sequence to work properly from within the keymap file?
> Thanks again,
> ~M
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>