#!/bin/sh # Copyright 1993, 1999, 2002 Patrick Volkerding, Moorhead, MN. # Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA # Use and redistribution covered by the same terms as the "setup" script. # Modified for Slint by Didier Spaier didieratslintdotfr export TEXTDOMAIN=SeTkeymap LANG=$( $TMP/SeTkeymap if [ ! $? = 0 ]; then rm -f $TMP/SeTkeymap exit fi MAPNAME="`cat $TMP/SeTkeymap`" MAPNAME="`basename $MAPNAME`" echo $MAPNAME > $TMP/SeTkeymap BMAP="`basename $MAPNAME .map`.bmap" tar xzOf /etc/keymaps.tar.gz $BMAP > /dev/null && tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap while [ 0 ]; do # Match the dialog colors a little while doing the keyboard test: setterm -background cyan -foreground black -blank 0 clear gettext " OK, the new map is now installed. You may now test it by typing anything you want. To quit testing the keyboard, enter 1 on a line by itself to accept the map and go on, or 2 on a line by itself to reject the current keyboard map and select a new one." echo echo echo -n " " read REPLY if [ "$REPLY" = "1" -o "$REPLY" = "2" ]; then break; fi done setterm -background black -foreground white -blank 0 if [ "$REPLY" = "1" ]; then # Make a persistent (P) copy so starting setup won't erase it: cp $TMP/SeTkeymap $TMP/Pkeymap break; else rm -f $TMP/SeTkeymap # Previous line was "rm -f $TMP/SeTkeymap $TMP/Pkeymap", # but we will keep the previous permanent keymap # Clear bad selection: # We will do that now reverting to the previous keymap - Didier Spaier MAPNAME="`cat $TMP/Pkeymap`" MAPNAME="`basename $MAPNAME`" BMAP="`basename $MAPNAME .map`.bmap" tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap continue; fi done