Programming the Function Keys

Programming the Function Keys

Post by Kevin Gourla » Thu, 21 Dec 2000 05:39:32



Hello there all unix type people

Does anyone know how I could programme the function keys so that they could
enter some text into a GUI rather than write the same thing 20 times a day.

Thanks for any help

Kev G

 
 
 

Programming the Function Keys

Post by Chuck Dillo » Sat, 23 Dec 2000 06:12:56



> Hello there all unix type people

> Does anyone know how I could programme the function keys so that they could
> enter some text into a GUI rather than write the same thing 20 times a day.

With GUIs one normally uses copy/paste for this kind of thing.  Even in the
pre-GUI days this kind of thing was provided by the terminal.  Dumb terminals
were usually smart enough to let you program their function keys.  The UNIX
system only saw the results.

Although this sounds like a simple thing it is in fact very complicated
in the GUI world.  Particularly in the X GUI world which is where I assume
you are.  There is no general means of doing this that will work for any
GUI attached to any keyboard device.

Check to see if the GUI app supports this.  For example, you can program
the function keys for an xterm (or derivatives thereof) by setting translations
in a resource file (e.g. .Xdefaults).  Perhaps the app you are using will
support this.  IF this GUI happens to be Motif based and the widget you are
typing into happens to be an XmText widget then you can set translations
by putting something like the following in your .Xdefaults file:

guiname*XmText.translations: #override\n\
<Key>F5: insert-string("hello")\n\
<Key>F6: insert-string("goodbye")\n

Otherwise, perhaps you can actually program the keyboard you are typing on.
Look to the documentation of the keyboard (or the system it is part of) to
see if this can be done.

HTH,

-- ced

--
Chuck Dillon
Senior Software Engineer
Genetics Computer Group, a subsidiary of Pharmacopeia, Inc.

 
 
 

Programming the Function Keys

Post by Thomas Dicke » Sun, 24 Dec 2000 01:57:34




>> Does anyone know how I could programme the function keys so that they could
>> enter some text into a GUI rather than write the same thing 20 times a day.
> With GUIs one normally uses copy/paste for this kind of thing.  Even in the
> pre-GUI days this kind of thing was provided by the terminal.  Dumb terminals
> were usually smart enough to let you program their function keys.  The UNIX
> system only saw the results.

I used to use the functions-keys on a wyse50 to store passwords (15 years ago).
Not recommended if your site isn't secured...

Quote:> Check to see if the GUI app supports this.  For example, you can program
> the function keys for an xterm (or derivatives thereof) by setting translations

XFree86 xterm and dtterm recognize the vt220 DECUDK which lets one program
the shifted function-keys (dynamically).

--

http://dickey.his.com
ftp://dickey.his.com