Skip to content

v0.0.0.16

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Jul 12:18
· 57 commits to master since this release

Keysharp 0.0.0.16

New

Ks.Image class — capture, load or create an image, then draw on it, transform it, search it and read/write its pixels before saving it. Replaces ImageCapture(). Full on Windows, partial on Linux (X11).

Ks.Overlay class — always-on-top, click-through canvas using the same drawing primitives as Image. Now backs Highlight(), and ToolTip() on Linux/macOS.

Ks.WinEvent — cross-platform window event subscriptions: Active, Exist, NotExist, Move, Minimize, Restore, TitleChange, plus Pause/Stop. Import with #import "Ks" { WinEvent }.

OCR library — new OCR.ks with a pluggable engine (Tesseract by default), built on Image.

Demos — ClipboardHistory, InputHUD, OCRSnip, Shell, WindowGrab, WindowTiler.

Also: Ks.A_ThreadId and Exit(ThreadId); Ks.MonitorGetScale() and Ks.MonitorFromPoint() alongside fully cross-platform monitor functions; InputHook.OnMouseDown/OnMouseUp/OnMouseMove; Gui +ClickThrough and +AutoScroll; an ImageSearch *Dir scan-direction option.

Platform

Linux — SharpHook and the legacy X11 hook/sender logic are removed. All input now goes through the keysharp-inputd daemon (evdev + uinput), reworked for multi-user handling, per-script permissions, unicode sending and mouse buttons.

Wayland — overlays, clipboard and window manipulation via KWin scripting and Keysharp shell extensions for GNOME (including v48+) and Cinnamon.

macOS — hook and sender logic revamped on CGEventTap; the key sender now works. Binaries are signed, and releases ship DMG/PKG with SHA256 checksums.

Internals — the old PlatformManager/WindowManager hierarchies were replaced by a service-oriented Platform layer with shared failure/retry recovery.

Breaking changes

  • ImageCapture() is replaced by the Image class
  • Linux input requires keysharp-inputd — the SharpHook/X11 fallback is gone
  • A_ScaledScreenDPI is renamed to A_ScreenScale
  • A_OSType now returns WINDOWS / OSX / LINUX
  • A_LineFile in the main file resolves to A_FullScriptPath
  • #import inside a function or class body binds to that scope instead of module-wide, and unknown imports throw
  • Reserved words can no longer be used as variable names
  • Invalid Gui options now throw

Fixes

Release-mode stack traces for C# exceptions, OnExit teardown, scripts exiting when the last Eto window closed, thread priority handling, DLL path normalization, Windows overlay flicker and emoji tray icons, and a long tail of Linux/macOS window and input bugs. Parser fixes for #include, static variables, derefs and remap syntax. Performance: RegEx pattern caching, font caching, cheaper per-call thread setup and faster keyboard-layout queries.