aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-02-02 13:17:51 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-02-16 02:20:39 +0300
commitb87c56799ab6f6d651e1dc6c712a625545a4ad5f (patch)
tree726a36ede8cf7a9d310c4299f5fadef6398dcda0 /doc
parent6c500d60eb7df65b0c71e9b0e0955ff581fc3f5a (diff)
downloadsciteco-b87c56799ab6f6d651e1dc6c712a625545a4ad5f.tar.gz
implemented mouse support via special ^KMOUSE and <EJ> with negative keys
* You need to set 0,64ED to enable mouse processing in Curses. It is always enabled in Gtk as it should never make the experience worse. sample.teco_ini enables mouse support, since this should be the new default. `sciteco --no-profile` won't have it enabled, though. * On curses, it requires the ncurses mouse protocol version 2, which will also be supported by PDCurses. * Similar to the Curses API, a special key macro ^KMOUSE is inserted if any of the supported mouse events has been detected. * You can then use -EJ to get the type of mouse event, which can be used with a computed goto in the command-line editing macro. Alternatively, this could have been solved with separate ^KMOUSE:PRESSED, ^KMOUSE:RELEASED etc. pseudo-key macros. * The default ^KMOUSE implementation in fnkeys.tes supports the following: * Left click: Edit command line to jump to position. * Ctrl+left click: Jump to beginning of line. * Right click: Insert position or position range (when dragging). * Double right click: insert range for word under cursor * Ctrl+right click: Insert beginning of line * Scroll wheel: scrolls (faster with shift) * Ctrl+scroll wheel: zoom (GTK-only) * Currently, there is no visual feedback when "selecting" ranges via right-click+drag. This would be tricky to do and most terminal emulators do not appear to support continuous mouse updates.
Diffstat (limited to 'doc')
-rw-r--r--doc/sciteco.7.template9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template
index 6ca81ab..97e1fd7 100644
--- a/doc/sciteco.7.template
+++ b/doc/sciteco.7.template
@@ -300,6 +300,15 @@ The default action is \fBnot\fP performed when
\(lq^KCLOSE\(rq has merely been masked out in the
current parser state (see below).
.TP
+.SCITECO_TOPIC ^KMOUSE
+.B ^KMOUSE
+Mouse event occurred.
+This may not be delivered unless bit 7 (64) is set in the
+\fBED\fP flags.
+You can use \fBEJ\fP with negative keys to retrieve
+the event type, mouse coordinates and other information
+about the last mouse event.
+.TP
.BI ^K x
Any other key with printable representation and all control codes
are looked up with a \(lq^K\(rq prefix.