[comp.windows.x] more on kbd_mode use

david@eng.sun.com (journey through the Universe of Slack) (03/22/90)

A couple of weeks ago there was some discussion of the finer points of
resetting the keyboard mode after the (MIT) server exits abnormally.
Here's a fragment from the script I'm using now, in case anyone else finds
it useful...

	# save keyboard mode, run server, restore keyboard mode
	kmode=`(exec kbd_mode 2>&1) |
		sed -n 's/Current mode is \(.\).*/\1/p'`

	xinit -- $SERVER -debug ...

	kbd_mode -$kmode 2> /dev/null

-- 
David DiGiacomo, Sun Microsystems, Mt. View, CA  sun!david david@eng.sun.com