==========================================================================
                    How send-key to Linux applications
               the most strange solutions eared on the Net
==========================================================================

--------------------------------------------------------------------------
1) Hardware suggestion

...Talk directly with the Keyboard Controller to simulate a key pression.
Unfortunately this solution seem to work only on IBM PS2 keyboard controller 
that have this features !
--------------------------------------------------------------------------
3) DOS like suggestion

Some DOS application used BIOS IRQ 16 to insert scan-code into keyboard 
buffer, but Linux not seem to talk with BIOS !
--------------------------------------------------------------------------
4) "Screen manager" like suggestion

Write a "screen like application" that execute a fork and redirect the 
"stdin" to a high level shell. But this is a restricted solution that
not work on X11 application !
--------------------------------------------------------------------------
5) "gpm mouse manager" like suggestion

Write a "gpm like application" that put in memory the character then use 
ioctl to paste it to the current application or shell..
--------------------------------------------------------------------------
6) Other suggestion catch from the USENET world

	The body of message:

	Re: Linux with a second keyboard?

	From           Bob Smith <bsmith@wci.com>
	Organization   Wireless Connect, Inc.
	Date           Mon, 12 Aug 1996 23:17:27 -0700
	Newsgroups     comp.os.linux.development.apps
	Message-ID     <32101DF7.1E2252D2@wci.com>
	References     1

	Bob Smith wrote:
	>
	> Is there a way to add a second keyboard to Linux?
	> I would like to accept keystrokes from either the
	> real keyboard or from an IR controller.  I can build
	> the IR receiver and convert its input to scancodes,
	> but have no idea where to go from there.
	>
	> Any help would be greatly appreciated
	>
	> bsmith@wci.com

	Wow, was that easy!

	Added the following line to /usr/include/linux/kd.h ....
	#define KDSETCHAR   0x4B4F  /* force a char from the keyboard */

	Added the following to vt.c in the .../drivers/char directory ...
	   case KDSETCHAR:
		/*
		 * Force a char into the keyboard input stream.
		 */
		if (!perm)
		    return -EPERM;

		if (tty) {
		    tty_insert_flip_char(tty, (char)arg, 0);
		    tty_schedule_flip(tty);
		}
		return 0;

	These two changes allow me to force a character from the keyboard
	using an ioctl.  To work properly I need to test the mode of
	the keyboard to know whether to send an ASCII character or a
	scancode.

	The following code sends the character 'A' from the keyboard....
	(if the keyboard is in ASCII mode)

	if (ioctl(fd, KDSETCHAR, (long)0x41)) {
	     perror("kbd_put: error forcing char from keyboard \n");
	     exit(1);
	}

	My application for this is to use Netscape in place of PowerPoint
	and to use an IR receiver/transmitter to send PGUP and PGDN
	keystrokes to advance to the next 'slide'.

	Bob
	=====================================================
	This message has no warranties, expressed or implied.

--------------------------------------------------------------------------
