[comp.unix.wizards] Remapping a keyboard

ucscd.public@ucbvax.Berkeley.EDU (01/31/87)

One thing that I can think of that will get a keyboard remapped
in BSD 4.[23] and still get around the problem of a program
getting input from /dev/tty is to have the filter work as through
a pty -
	disassociate filter process from tty
	set tty to RAW, ~ECHO
	get a pty
	set pty to same as tty was initially
	fork,
		one side
			read 0, filter write to pty slave
			read pty slave, write 1
		other side
			dup pty over 0, 1
			exec a [login] shell

----------------------------
		Nathaniel Ingersoll
			...!ucbvax!ucscc!public

whb@vax135.UUCP (02/10/87)

In article <4145@brl-adm.ARPA> ucscd.public@ucbvax.Berkeley.EDU writes:
>One thing that I can think of that will get a keyboard remapped
>in BSD 4.[23] and still get around the problem of a program
>getting input from /dev/tty is to have the filter work as through
>a pty -

Assuming that you have accesss to the source code for your BSD utilities,
it's fairly easy to modify script(1) to do this - just cut out all the
code pertaining to the 'typescript' file, which you're no longer interested
in, and add a filter to the routine which is reading File Descriptor 0.
I know it's easy, because I just did it last week!

Apologies to those who can't get the source.
Lesser apologies to those not on BSD Systems :-)
-- 
Wilson H. Bent, Jr.		... ihnp4!vax135!hoh-2!whb
AT&T - Bell Laboratories	(201) 949-1277
Disclaimer: My company has not authorized me to issue a disclaimer.