+2001-01-15 OKUJI Yoshinori <okuji@gnu.org>
+
+ From Thierry Laronde <thierry.laronde@polynum.com>:
+ * docs/user-ref.texi (Command-line and menu commands): Update
+ the description about setkey.
+ * stage2/builtins.c (setkey_func): When checking if TO_KEY and
+ FROM_KEY are specified, see *TO_KEY and *FROM_KEY instead of
+ TO_KEY and FROM_KEY, respectively.
+
2001-01-13 OKUJI Yoshinori <okuji@gnu.org>
From Thierry Laronde <thierry.laronde@polynum.com>:
This command is only available if GRUB is compiled with serial support.
@end deffn
-@deffn Command setkey to_key from_key
+@deffn Command setkey [to_key from_key]
Change the keyboard map. The key @var{from_key} is mapped to the key
-@var{to_key}. Note that this command @emph{does not} exchange the
-keys. If you want to exchange the keys, run this command again with the
-arguments exchanged, like this:
+@var{to_key}. If no argument is specified, reset key mappings. Note that
+this command @emph{does not} exchange the keys. If you want to exchange
+the keys, run this command again with the arguments exchanged, like this:
@example
grub> @kbd{setkey capslock control}
to_key = arg;
from_key = skip_to (0, to_key);
- if (! to_key)
+ if (! *to_key)
{
/* If the user specifies no argument, reset the key mappings. */
grub_memset (bios_key_map, 0, KEY_MAP_SIZE * sizeof (unsigned short));
return 0;
}
- else if (! from_key)
+ else if (! *from_key)
{
/* The user must specify two arguments or zero argument. */
errnum = ERR_BAD_ARGUMENT;