X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-quickconfig;h=aef071a60689382d118cf1e0762d47bdbadf1d43;hb=4b2b3142ab74d280149780a3e466db0038291054;hp=2896c69046f37c81174ea1740b2c32665453ae1f;hpb=576384ece0819ffd0a1833833065cec654e45e02;p=grml-scripts.git diff --git a/usr_sbin/grml-quickconfig b/usr_sbin/grml-quickconfig index 2896c69..aef071a 100755 --- a/usr_sbin/grml-quickconfig +++ b/usr_sbin/grml-quickconfig @@ -10,6 +10,7 @@ # menu with quick config options use Term::ReadKey; +use Time::HiRes; # enable alternate charset support (needed for screen) print "\e(B\e)0"; @@ -101,13 +102,14 @@ EOF ReadMode 4; # Turn off controls keys while (not defined ($x = ReadKey(-1))) { # No key yet + Time::HiRes::sleep(0.5); } ReadMode 0; # Reset tty mode before exiting print $N.$/.$/; if (defined($menu_commands{$x})) { $command = $menu_commands{$x}; - } elsif ($x eq "\n") { + } elsif ($x eq "\n" || $x eq ' ') { $command= 'exit'; } elsif ($x eq "x") { print <<"EOF"; @@ -126,6 +128,7 @@ EOF ReadMode 4; # Turn off controls keys while (not defined ($x = ReadKey(-1))) { # No key yet + Time::HiRes::sleep(0.5); } ReadMode 0; # Reset tty mode before exiting @@ -133,7 +136,8 @@ EOF if (defined($windowmanagers{$x})) { $command = "su - grml -c 'grml-x ".$windowmanagers{$x}."'"; } else { - print "Unknown key. Returning to main menu.\n"; + print "Unknown key, not bound to a windowmanager.\n"; + print "Returning to main menu.\n"; } } else { print "Unknown key.\n";