Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZDzVt-0007fP-VX for mharc-grub-devel@gnu.org; Sat, 11 Jul 2015 14:28:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDzVr-0007cG-2g for grub-devel@gnu.org; Sat, 11 Jul 2015 14:28:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDzVo-0008Dx-BQ for grub-devel@gnu.org; Sat, 11 Jul 2015 14:28:35 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:33896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDzVo-0008Dk-0E for grub-devel@gnu.org; Sat, 11 Jul 2015 14:28:32 -0400 Received: by wifm2 with SMTP id m2so70376689wif.1 for ; Sat, 11 Jul 2015 11:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=qt8f/Q/dvsggSBu6UJJvHx4yDuKkG+8HUUZnjkE0vuQ=; b=vp3I0fGVyhwaAXTkBIyOnWn+9OsWnJkkNv1jfTAyQbLplNt5LIifhkG/qCGQPqx+x4 VnhQlCO2eUY97uRVUtey+f/dAXM3nSP78XDV00pTlmwcilvrk/f39OCgKb6f0jpgak+v NuVTDJsq1BEFEy29ZhaYuhUPKmsRccgLnbWIXLN56w581ul9f8vRKhLcwtiyoxrOQXFu iDQRQ+HpiwivadL4ciMtgPMwNYSW2OhuQhmbT3MzMjQpGWaeoUdXe3EYMfjmUDYsRQIi WyOK3GUcTHNZAN2gBdOt3h6b65tqJpaavdv/qQvDuRVcgsT6znyVnXZy2IynPZjpywA3 8Drw== X-Received: by 10.181.29.100 with SMTP id jv4mr8469096wid.4.1436639311416; Sat, 11 Jul 2015 11:28:31 -0700 (PDT) Received: from w970suw1.lan ([91.176.149.207]) by smtp.gmail.com with ESMTPSA id lq9sm19152863wjb.35.2015.07.11.11.28.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Jul 2015 11:28:30 -0700 (PDT) From: Luc Van Rompaey To: The development of GNU GRUB Subject: [PATCH 4/4] add documentation for keymap, setkey, and setnumpad commands Date: Sat, 11 Jul 2015 20:28:24 +0200 Message-Id: <1436639304-5365-5-git-send-email-luc.vanrompaey@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436639304-5365-1-git-send-email-luc.vanrompaey@gmail.com> References: <1436639304-5365-1-git-send-email-luc.vanrompaey@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 18:28:36 -0000 Update the GNU GRUB manual with entries that document the keymap, setkey, and setnumpad commands, under the list of general commands. --- docs/grub.texi | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index b9f41a7..8bd5efe 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -3660,13 +3660,57 @@ All options are the same as in the @command{menuentry} command Commands usable anywhere in the menu and in the command-line. @menu +* keymap:: Load a keyboard layout * serial:: Set up a serial device +* setkey:: Change the keyboard map +* setnumpad:: Change the numeric keypad behavior * terminal_input:: Manage input terminals * terminal_output:: Manage output terminals * terminfo:: Define terminal type @end menu +@node keymap +@subsection keymap + +@deffn Command keymap LAYOUT +Load a keyboard layout. + +If @var{LAYOUT} is just the identifier of a keyboard layout, then GRUB will +look for file @file{$prefix/layouts/@var{LAYOUT}.gkb}. +Alternatively, @var{LAYOUT} may be the full path to a GRUB keyboard layout file. + +This command will have no effect unless and until you use the +@command{terminal_input} command to activate either the @samp{at_keyboard} +input terminal: + +@example +terminal_input at_keyboard +@end example + +or the @samp{usb_keyboard} input terminal: + +@example +terminal_input usb_keyboard +@end example + +@table @asis +@item Creating a GRUB keyboard layout file: + +To generate a GRUB keyboard layout file, you can use the @command{grub-mklayout} +command-line utility, which takes a Linux console keyboard layout description +as input, and converts it to a format that GRUB can understand. + +For instance, if you use the @samp{dvorak} keyboard layout, then the following +command will create the @file{dvorak.gkb} file for use with GRUB: + +@example +ckbcomp dvorak | grub-mklayout -o dvorak.gkb +@end example +@end table +@end deffn + + @node serial @subsection serial @@ -3689,6 +3733,112 @@ See also @ref{Serial terminal}. @end deffn +@node setkey +@subsection setkey + +@deffn Command setkey [[TO_KEY] FROM_KEY] +Change the keyboard map. + +With no arguments, reset the keyboard map to its default U.S. layout. + +When only the @var{FROM_KEY} argument is given, or when @var{TO_KEY} is equal to +@var{FROM_KEY}, the mapping entry for the specified key will be cleared. +Keep in mind that @var{FROM_KEY} identifies the position of the key under the default +U.S. layout. + +With two unequal arguments, the key @var{FROM_KEY} will be mapped to @var{TO_KEY}. +In effect, the @var{FROM_KEY} argument identifies the position of the key under the +default U.S. layout, and @var{TO_KEY} specifies how the key should behave under your +local keyboard layout. + +A key must be: +@itemize @bullet +@item +a lowercase letter; +@item +an uppercase letter; +@item +a decimal digit; +@item +a function key---i.e., @kbd{F1} through @kbd{F12}; +@end itemize + +or one of the following: + +@verbatim + ampersand barx delete less question + asterisk braceleft dollar minus quote + at braceright doublequote numbersign semicolon + backslash bracketleft enter parenleft slash + backslashx bracketright equal parenright space + backquote caret escape percent tab + backspace colon exclam period tilde + bar comma greater plus underscore +@end verbatim + +This command is only available on PC BIOS systems. It will have no effect unless +and until you use the @command{terminal_input} command to activate the @samp{nuconsole} +input terminal: + +@example +terminal_input nuconsole +@end example + +Differences with the @command{setkey} command under GRUB Legacy: + +@itemize @bullet +@item +This @command{setkey} command does not support the modifier keys---i.e., @kbd{shift}, +@kbd{control}, @kbd{alt}, @kbd{capslock}. + +@item +This @command{setkey} command supports all twelve function keys. + +@item +Depending on your keyboard layout, there may be an extra key between the @key{Left Shift} +key and the row of letter keys to its right. This extra key will output a backslash (i.e., +@kbd{\}) or, when shifted, a vertical bar (i.e., @kbd{|}), by default. + +This @command{setkey} command will not affect this extra key when you remap the +@kbd{backslash} or @kbd{bar} keys. You can instead remap the key separately, using the +@kbd{backslashx} or @kbd{barx} values for the @var{FROM_KEY} argument. + +For instance, under the Belgian keyboard layout, this key will output a @kbd{<} or, when +shifted, a @kbd{>} character. The following GRUB commands will, then, appropriately remap +the key: + +@example +setkey less backslashx +setkey greater barx +@end example +@end itemize +@end deffn + + +@node setnumpad +@subsection setnumpad + +@deffn Command setnumpad [@option{--force}|@option{--noforce}] +Change the behavior of the numeric keypad. + +With @option{--force}, make the keys on the numeric keypad emit the numeric +characters on their keycaps, irrespective of the @key{NumLock} and @key{Shift} +key states. + +With @option{--noforce}, or if no option is given, restore default behavior +of the keys on the numeric keypad, which depends on the @key{NumLock} and +@key{Shift} states. + +This command is only available on PC BIOS systems. It will have no effect unless +and until you use the @command{terminal_input} command to activate the @samp{nuconsole} +input terminal: + +@example +terminal_input nuconsole +@end example +@end deffn + + @node terminal_input @subsection terminal_input -- 2.1.4