summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorbryan <bryan@veltar.systems>2026-08-27 13:33:41 +0200
committerbryan <bryan@veltar.systems>2026-08-27 13:33:41 +0200
commitf92c62127cdbe6fb0831e911c5c6dc2b5db7a7c4 (patch)
treefb5659b274bb5117a93c4f021e2a654858c7d371 /README
downloadselc-f92c62127cdbe6fb0831e911c5c6dc2b5db7a7c4.tar.gz
selc-f92c62127cdbe6fb0831e911c5c6dc2b5db7a7c4.zip
Initial import
Diffstat (limited to 'README')
-rw-r--r--README60
1 files changed, 60 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..e9a2379
--- /dev/null
+++ b/README
@@ -0,0 +1,60 @@
+selc - select-copy
+
+ selc [-i] [-k] [-u] [-v]
+
+Windows X11-PRIMARY analogue: selecting text copies it. A drag,
+double-click, shift+click, or shift+arrow selection is copied to
+the clipboard. No tray, no window, one process, a mouse hook that
+only snapshots points.
+
+ selc run (no-op if already running)
+ selc -i write HKCU Run (start at logon) and run
+ selc -u remove HKCU Run and stop
+ selc -k stop the running instance
+ selc -v run with a console; print copy method
+
+
+Build
+
+ make
+ make install
+ make boot
+
+boot is install plus selc -i. The binary is a Windows subsystem
+image; launching it from Explorer or Run does not open a console.
+as(1) and ld(1) must be the MinGW ones; config.mk prepends
+MINGWBIN to PATH.
+
+Default install path: %USERPROFILE%\.local\bin
+Override: make PREFIX=... install
+
+
+How
+
+A WH_MOUSE_LL hook (and optionally WH_KEYBOARD_LL) records the
+gesture on the hook thread and posts to a message-only window.
+The window waits COPYWAIT ms so the target app can finish the
+selection, then:
+
+ 1. ignore non-client hits (caption, scrollbars, resize)
+ 2. ignore password Edit controls
+ 3. WM_COPY to the focused child (SendMessageTimeout)
+ 4. if the clipboard sequence did not change, inject Ctrl+C
+ except into console classes listed in config.h
+
+Logon autostart is HKCU\...\Run\selc, so it starts with the
+interactive session. That is the right time; a clipboard helper
+cannot run in session 0.
+
+
+Remarks
+
+Injected Ctrl+C is skipped for ConsoleWindowClass, Windows
+Terminal, and mintty so a false gesture cannot interrupt a
+job. Those hosts often already copy on select.
+
+UIPI: an unelevated selc cannot copy from an elevated window.
+Run it at the same integrity level as the programs you use.
+
+Edit config.h (copied from config.def.h) for thresholds and
+the no-Ctrl+C class list. Recompile.