Next: Modes, Previous: Keys, Up: Customization [Contents][Index]
When using Braille display output, speechd-el can bind actions to the Braille display keys. The Braille key bindings are defined in the following variables:
speechd-braille-key-functions
Alist of Braille display key codes and corresponding Emacs functions.
If the given key is pressed, the corresponding function is called with
a speechd-brltty-driver
instance as its single argument (read
the source code for information about speechd-el output drivers).
The key codes are either integers (for BRLTTY 3.7 and older) or lists containing three integers (for BRLTTY 3.8 and newer). See the default variable value for examples of possible key codes.
The assigned functions needn’t be interactive. Actually as the functions may be invoked by asynchronous events any time at any place, they shouldn’t modify current environment in any inappropriate way. For this reason it is recommended not to assign user commands to the keys here.
speechd-brltty.el contains some predefined functions that can be assigned to the Braille display keys here:
speechd-brltty-scroll-left
Scroll towards the beginning of the currently displayed message.
speechd-brltty-scroll-right
Scroll towards the end of the currently displayed message.
speechd-brltty-scroll-to-bol
Scroll to the beginning of the currently displayed message.
speechd-brltty-scroll-to-eol
Scroll to the end of the currently displayed message.
speechd-brltty-scroll-to-cursor
Scroll to the cursor position (if any) in the displayed message.
speechd-brltty-finish-message
Stop displaying the current message and display the next one.
speechd-brltty-cancel
Stop displaying the current message and discard all messages waiting in the queue.
speechd-brltty-previous-message
Display the previous message from the history.
speechd-brltty-next-message
Display the next message from the history.
speechd-brltty-first-message
Display the first message in the history.
speechd-brltty-last-message
Display the last message in the history.
Additionally, the following macro is provided:
speechd-brltty-command-key-function key
Insert function for handling key as a general input key. This is useful for handling Braille keys acting as general character input keys.
The speechd-braille-key-functions
variable contains some
default bindings initially, but as the keys and their codes differ a
lot for various Braille displays, you probably need to adjust it for
your particular device. You can figure out the display key codes by
setting the speechd-braille-show-unknown-keys
variable to
t
and pressing the display keys.
speechd-braille-show-unknown-keys
If non-nil
, show codes of the pressed Braille keys that have no
function assigned in speechd-braille-key-functions
. This is
useful to figure out the Braille key codes.
With BrlTTY 3.8 and higher BrlTTY can handle many braille keys itself
in X environment. So speechd-el doesn’t try to handle most keys
itself by default. Instead it handles only keys assigned in
speechd-braille-key-functions
. If this is a problem, typically
when looking for braille key codes, the following command can be
useful:
Toggle handling braille keys by speechd-el. If BrlTTY handles the
keys (this is the default behavior), speechd-el receives only keys
which are assigned to commands in
speechd-braille-key-functions
. If speechd-el handles the keys,
then BrlTTY sends all the pressed keys to speechd-el without
processing them itself.
Next: Modes, Previous: Keys, Up: Customization [Contents][Index]