; Improve documentation of 'modifier-bar-mode'

* doc/emacs/custom.texi (Modifier Keys):
* doc/emacs/frames.texi (Tool Bars):
* lisp/tool-bar.el (modifier-bar-mode): Improve documentation of
'modifier-bar-mode'.
This commit is contained in:
Eli Zaretskii 2025-04-24 12:32:02 +03:00
parent a975232c0f
commit 49ea1f64c7
3 changed files with 22 additions and 14 deletions

View file

@ -2164,6 +2164,10 @@ You can similarly enter the Shift, Control, and Meta modifiers by
using @kbd{C-x @@ S}, @kbd{C-x @@ c}, and @kbd{C-x @@ m}, respectively, using @kbd{C-x @@ S}, @kbd{C-x @@ c}, and @kbd{C-x @@ m}, respectively,
although this is rarely needed. although this is rarely needed.
On graphical terminals, you can enable the Modifier Bar mode, which
allows simulating the missing modifier keys by clicking a tool-bar
button. @xref{Tool Bars}.
@node Function Keys @node Function Keys
@subsection Rebinding Function Keys @subsection Rebinding Function Keys

View file

@ -1343,15 +1343,18 @@ displayed by moving the mouse pointer to the top of the screen.
@cindex displaying modifier keys in the tool bar @cindex displaying modifier keys in the tool bar
@cindex mode, Modifier Bar @cindex mode, Modifier Bar
@cindex Modifier Bar @cindex Modifier Bar
Keyboards often lack one or more of the modifier keys that Emacs Keyboards often lack one or more of the modifier keys (@pxref{Modifier
might want to use, making it difficult or impossible to input key Keys}) that Emacs users might want to use, making it difficult or
sequences that contain them. Emacs can optionally display a list of impossible to input key sequences with these modifiers. For example,
buttons that act as substitutes for modifier keys within the tool bar; many keyboards lack the Hyper and Super modifiers, and smartphones
these buttons are also referred to as the ``modifier bar''. Clicking usually also lack Ctrl and Alt modifiers. Emacs can optionally display
an icon within the modifier bar will cause a modifier key to be a tool bar of buttons that can substitute the modifier keys; this
applied to the next keyboard event that is read. The modifier bar is additional tool bar is known as the @dfn{modifier bar}. Clicking a
displayed when the global minor mode @code{modifier-bar-mode} is button within the modifier bar will cause the modifier key shown on the
enabled; to do so, type @kbd{M-x modifier-bar-mode}. button to be applied to the next keyboard event that Emacs reads. The
modifier bar is displayed when the global minor mode
@code{modifier-bar-mode} is enabled; to do so, type @kbd{M-x
modifier-bar-mode}.
@node Tab Bars @node Tab Bars
@section Tab Bars @section Tab Bars

View file

@ -532,12 +532,13 @@ decoding the current key sequence, nil otherwise."
(not (memq modifier modifier-bar-modifier-list))) (not (memq modifier modifier-bar-modifier-list)))
(define-minor-mode modifier-bar-mode (define-minor-mode modifier-bar-mode
"Toggle display of the modifier bar. "Toggle display of the key-modifier tool bar.
When enabled, a small tool bar will be displayed next to the tool When enabled, a small tool bar will be displayed in addition to the
bar containing items bound to regular tool bar, containing buttons for key modifiers such as
`tool-bar-event-apply-control-modifier' and its related commands, Ctrl, Shift, Alt, etc. This is useful on terminals whose keyboard
which see." has no keys for these modifiers, such as smartphones and other
devices with small keyboards."
:init-value nil :init-value nil
:global t :global t
:group 'tool-bar :group 'tool-bar