emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android c81bd0f60b5 2/2: Update Android port


From: Po Lu
Subject: feature/android c81bd0f60b5 2/2: Update Android port
Date: Fri, 21 Jul 2023 22:49:31 -0400 (EDT)

branch: feature/android
commit c81bd0f60b5b2989d23da5a8ee5d17f40985c083
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Update Android port
    
    * doc/lispref/commands.texi (Key Sequence Input): Describe which
    events receive imaginary prefix keys.
    * lisp/touch-screen.el (touch-screen-translate-touch): Consider
    `vertical-line' a virtual function key.
    (function-key-map): Translate events on vertical window borders.
---
 doc/lispref/commands.texi | 29 +++++++++++++++--------------
 lisp/touch-screen.el      |  6 ++++++
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index df86e7e7a62..217c8cae1f5 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -3275,20 +3275,21 @@ with any other events.
 @cindex @code{bottom-divider}, prefix key
 @cindex mouse events, in special parts of window or frame
 @cindex touch screen events, in special parts of window or frame
-When mouse or @code{touch-screen-begin} events occur in special parts
-of a window or frame, such as a mode line or a scroll bar, the event
-type shows nothing special---it is the same symbol that would normally
-represent that combination of mouse button and modifier keys.  The
-information about the window part is kept elsewhere in the event---in
-the coordinates.  But @code{read-key-sequence} translates this
-information into imaginary prefix keys, all of which are symbols:
-@code{tab-line}, @code{header-line}, @code{horizontal-scroll-bar},
-@code{menu-bar}, @code{tab-bar}, @code{mode-line},
-@code{vertical-line}, @code{vertical-scroll-bar}, @code{left-margin},
-@code{right-margin}, @code{left-fringe}, @code{right-fringe},
-@code{right-divider}, and @code{bottom-divider}.  You can define
-meanings for mouse clicks in special window parts by defining key
-sequences using these imaginary prefix keys.
+When mouse or @code{touchscreen-begin} and @code{touchscreen-end}
+events occur in special parts of a window or frame, such as a mode
+line or a scroll bar, the event type shows nothing special---it is the
+same symbol that would normally represent that combination of mouse
+button and modifier keys.  The information about the window part is
+kept elsewhere in the event---in the coordinates.  But
+@code{read-key-sequence} translates this information into imaginary
+prefix keys, all of which are symbols: @code{tab-line},
+@code{header-line}, @code{horizontal-scroll-bar}, @code{menu-bar},
+@code{tab-bar}, @code{mode-line}, @code{vertical-line},
+@code{vertical-scroll-bar}, @code{left-margin}, @code{right-margin},
+@code{left-fringe}, @code{right-fringe}, @code{right-divider}, and
+@code{bottom-divider}.  You can define meanings for mouse clicks in
+special window parts by defining key sequences using these imaginary
+prefix keys.
 
 For example, if you call @code{read-key-sequence} and then click the
 mouse on the window's mode line, you get two events, like this:
diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el
index 5bd920ccc89..a4337d2f009 100644
--- a/lisp/touch-screen.el
+++ b/lisp/touch-screen.el
@@ -1287,6 +1287,7 @@ if POSN is on a link or a button, or `mouse-1' otherwise."
                           ;; If event1 is a virtual function key, make
                           ;; it the new prefix.
                           (if (memq event1 '(mode-line tab-line nil
+                                             vertical-line
                                              header-line tool-bar tab-bar
                                              left-fringe right-fringe
                                              left-margin right-margin
@@ -1397,6 +1398,11 @@ if POSN is on a link or a button, or `mouse-1' 
otherwise."
 (define-key function-key-map [tab-line touchscreen-end]
             #'touch-screen-translate-touch)
 
+(define-key function-key-map [vertical-line touchscreen-begin]
+            #'touch-screen-translate-touch)
+(define-key function-key-map [vertical-line touchscreen-end]
+            #'touch-screen-translate-touch)
+
 (define-key function-key-map [nil touchscreen-begin]
             #'touch-screen-translate-touch)
 (define-key function-key-map [nil touchscreen-end]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]