[comp.windows.x] xterm and function keys

ekberg@asl.dl.nec.COM (Tom Ekberg) (02/23/91)

I'm sure this question has been asked before, but I'll go ahead and ask again.
This question doesn't appear in the FAQ list.

I would like to have the function keys F1-F12 on my NCD X terminal output
strings when I'm in an xterm window.  I looked at the `example' in the xterm
man page for vt100 translations, but I can't get it to work.  For example, it
looks like function key F19 is to generate the string "continue\r".  What I did
was to put the example into my .Xresources file, changing the function key
names to ones that exist on my NCD, and then I ran xrdb -merge ~/.Xresources.
This appears to have had no effect.  I even entered dbx within xterm but still
I could see no effect of these translations.

Does anyone happen to have a snippit of a .Xresources file which will allow one
to map function keys to strings while inside of an xterm window?  Of course, if
more is needed than just new entries in the .Xresources, I'd like to know that
too.

  -- tom, ekberg@aslss02.asl.dl.nec.com (x3503)

mouse@lightning.mcrcim.mcgill.EDU (02/23/91)

> I would like to have the function keys F1-F12 on my NCD X terminal
> output strings when I'm in an xterm window.

So far so good.

> [...example in man page...]  What I did was to put the example into
> my .Xresources file, changing the function key names to ones that
> exist on my NCD, and then I ran xrdb -merge ~/.Xresources.  This
> appears to have had no effect.  I even entered dbx within xterm but
> still I could see no effect of these translations.

The problem is almost certainly that xterm reads the resources once, at
startup, and ignores changes made thereafter.  Try setting the
resources and starting a new xterm and see if it helps any.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

barry@ncd.COM (Barry Davis) (03/01/91)

>I'm sure this question has been asked before, but I'll go ahead and ask again.
>This question doesn't appear in the FAQ list.
>
>I would like to have the function keys F1-F12 on my NCD X terminal output
>strings when I'm in an xterm window.  I looked at the `example' in the xterm
>man page for vt100 translations, but I can't get it to work.  For example, it
>looks like function key F19 is to generate the string "continue\r". 
What I >did
>was to put the example into my .Xresources file, changing the function key
>names to ones that exist on my NCD, and then I ran xrdb -merge ~/.Xresources.
>This appears to have had no effect.  I even entered dbx within xterm but still
>.I could see no effect of these translations.
>
>Does anyone happen to have a snippit of a .Xresources file which
will allow >.one
>to map function keys to strings while inside of an xterm window?  Of
course, >if
>more is needed than just new entries in the .Xresources, I'd like to know that
>too.

  -- tom, ekberg@aslss02.asl.dl.nec.com (x3503)


Here is an example of a string assignment that works....

Put this in the .Xdefaults file


*VT100.Translations: #override Shift<Key>F1: string("shift") \n\
                                    <Key>F1: string("F1")