Skip to content

Commit

Permalink
Sun Oct 15 14:11:38 CEST 2006 pdm@brailcom.org
Browse files Browse the repository at this point in the history
  * Use 3 24-bit instead of 2 32-bit integer codes for Braille keys
  • Loading branch information
pdm committed Oct 15, 2006
1 parent e55b1ac commit 8640724
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
6 changes: 4 additions & 2 deletions brltty.el
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ available, from the environment variable CONTROLVT."
(* 256 (aref string 2)) (aref string 3)))

(defun brltty--read-integer64 (string)
(list (brltty--read-integer (substring string 0 4))
(brltty--read-integer (substring string 4 8))))
(list
(+ (* 256 (aref string 0)) (aref string 1))
(+ (* 256 256 (aref string 2)) (* 256 (aref string 3)) (aref string 4))
(+ (* 256 256 (aref string 5)) (* 256 (aref string 6)) (aref string 7))))

(defun brltty--read-packet (connection)
(condition-case err
Expand Down
22 changes: 11 additions & 11 deletions speechd-brltty.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@

(defcustom speechd-braille-key-functions
'((1 . speechd-brltty-previous-message)
((0 536870913) . speechd-brltty-previous-message)
((0 32 1) . speechd-brltty-previous-message)
(2 . speechd-brltty-next-message)
((0 536870914) . speechd-brltty-next-message)
((0 32 2) . speechd-brltty-next-message)
(11 . speechd-brltty-last-message)
((0 536870937) . speechd-brltty-last-message)
((0 32 25) . speechd-brltty-last-message)
(12 . speechd-brltty-first-message)
((0 536870938) . speechd-brltty-first-message)
((0 32 26) . speechd-brltty-first-message)
(23 . speechd-brltty-scroll-left)
((0 536870935) . speechd-brltty-scroll-left)
((0 32 23) . speechd-brltty-scroll-left)
(24 . speechd-brltty-scroll-right)
((0 536870936) . speechd-brltty-scroll-right)
((0 32 24) . speechd-brltty-scroll-right)
(25 . speechd-brltty-scroll-to-bol)
((0 536870939) . speechd-brltty-scroll-to-bol)
((0 32 27) . speechd-brltty-scroll-to-bol)
(26 . speechd-brltty-scroll-to-eol)
((0 536870940) . speechd-brltty-scroll-to-bol)
((0 32 28) . speechd-brltty-scroll-to-bol)
(29 . speechd-brltty-scroll-to-cursor)
((0 536870941) . speechd-brltty-scroll-to-cursor)
((0 32 29) . speechd-brltty-scroll-to-cursor)
(8204 . speechd-brltty-finish-message)
((0 536870984) . speechd-brltty-finish-message)
((0 32 72) . speechd-brltty-finish-message)
(8205 . speechd-brltty-cancel)
((0 536870983) . speechd-brltty-cancel))
((0 32 71) . speechd-brltty-cancel))
"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.
Expand Down
2 changes: 1 addition & 1 deletion speechd-el.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ a @code{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 two integers (for BrlTTY 3.8 and newer). See the default
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
Expand Down

0 comments on commit 8640724

Please sign in to comment.