SharpHook

SharpHook provides a cross-platform global keyboard and mouse hook, event simulation, and text entry simulation for .NET

MIT License

Stars
302
SharpHook - v5.3.7 Latest Release

Published by TolikPylypchuk 4 months ago

This release fixes a CPU usage issue on Linux. libuiohook was updated to commit 1c96539.

SharpHook - v5.3.6

Published by TolikPylypchuk 5 months ago

This release fixes the libuiohook build provided for macOS x64.

SharpHook - v5.3.5

Published by TolikPylypchuk 5 months ago

This release fixes simulating mouse events when the screen configuration changes, as well as simulating text with repeating characters - both on Windows. libuiohook was updated to commit c7500ce.

SharpHook - v5.3.4

Published by TolikPylypchuk 6 months ago

This release fixes simulating some keys on Windows. libuiohook was updated to commit 5128c04.

SharpHook - v5.3.3

Published by TolikPylypchuk 6 months ago

This release fixes simulating mouse movement on multiple screens on Windows. libuiohook was updated to commit 902a30b.

SharpHook - v5.3.2

Published by TolikPylypchuk 7 months ago

This release fixes publishing with Visual Studio and simulating mouse movement on Windows. libuiohook was updated to commit 5024193.

SharpHook - v5.3.1

Published by TolikPylypchuk 8 months ago

This release makes it safe to dispose an already disposed test global hook.

SharpHook - v5.3.0

Published by TolikPylypchuk 8 months ago

This release adds the ability to run keyboard-only and mouse-only global hooks. It also fixes an issue with simulating key press/release events for some keys on Windows. libuiohook was updated to commit 963415f.

SharpHook - v5.2.3

Published by TolikPylypchuk 9 months ago

This release fixes Windows x86 support for .NET Framework.

SharpHook - v5.2.2

Published by TolikPylypchuk 9 months ago

This release fixes libuiohook resolution for Linux Arm64 in package targets. Also, package targets are now executed only for .NET Framework since they aren't needed for .NET/.NET Core.

SharpHook - v5.2.1

Published by TolikPylypchuk 10 months ago

This release fixes HookEventArgs.IsEventSimulated - previously it always returned true. Also, libuiohook was updated to commit 7dbdc09 which includes a fix for kCGEventTapDisabledByTimeout breaking the global hook on macOS. Additionally, the packages are now marked as AOT-compatible.

SharpHook - v5.2.0

Published by TolikPylypchuk 10 months ago

This release adds the ability to distinguish real and simulated events and deprecates key codes which don't exist on modern keyboards. libuiohook was updated to commit d710f0f.

SharpHook - v5.1.2

Published by TolikPylypchuk 11 months ago

This release fixes an issue with key events changing the way some applications handle Alt keys on Windows. It also adds .NET 8 as a target. libuiohook was updated to commit 9027a77.

SharpHook - v5.1.1

Published by TolikPylypchuk about 1 year ago

This release fixes an issue with key events not being simulated on Linux without a running global hook. libuiohook was updated to commit a8b6506.

SharpHook - v5.1.0

Published by TolikPylypchuk about 1 year ago

This release adds a way to simulate multiple mouse clicks on macOS. Also, mouse coordinates were fixed for event simulation on Windows with multiple screens, as well as some events being ignored. libuiohook was updated to commit 2712b31.

SharpHook - v5.0.0

Published by TolikPylypchuk about 1 year ago

This is probably the largest release since v1.0.0 and it contains multiple new features and bug fixes, as well as breaking changes.

Platform Support

  • Support for Mac Catalyst was added which makes it possible to use SharpHook in .NET MAUI apps on macOS.

  • The minimum .NET Framework version was bumped to 4.6.2.

  • Support for Windows on Arm32 was removed.

Breaking Changes

  • Almost all KeyCode values were changed. New codes were added and some were removed. The actual enum values are meaningless and may be changed again in the future.

  • MouseWheelEventData doesn't contain Amount anymore.

  • Mouse wheel simulation doesn't accept the amount anymore. Instead it accepts the scroll direction and type which makes it possible to simulate horizontal scrolling.

  • The meaning of the mouse wheel rotation value was changed - a positive value indicates that the wheel is rotated up or left, and a negative value indicates that the wheel is rotated down or right.

  • KeyboardEventData.KeyChar was renamed to KeyboardEventData.RawKeyChar and the KeyboardEventData.KeyChar property was added.

  • LogEntryParser is now a singleton and doesn't have a public constructor.

  • The constants in the MouseWheelScrollDirection enum were shortened: VerticalDirection to Vertical and HorizontalDirection to Horizontal.

New Features

  • Text entry simulation was added.

  • Low-level functionality providers were added - they can be used instead of directly using the UioHook class.

  • Horizontal mouse wheel simulation is now possible.

  • Classes which help with testing were added.

  • Reactive global hook can now accept a default scheduler which will be used for all observables.

  • Extension methods for SharpHook.Native.ModifierMask were added.

Bug Fixes

  • Global hooks can now be created and disposed multiple times on Windows without problems.

  • Many key code mappings to OS-specific key codes were fixed.

  • KeyTyped events are now better at determining which characters should be produced by key presses on Windows.

Other Changes

  • libuiohook was updated to commit 6f42599.

  • All methods in all structs in the UioHook.Native namespace are now marked as readonly.

  • SharpHook.Reactive now depends on Rx.NET 6.0.0.

  • Docs now use a new theme.

SharpHook - v4.2.1

Published by TolikPylypchuk over 1 year ago

In this release libuiohook was updated to commit 34f279c which fixes a problem with getting screen info for multiple screens on Windows. Also, a memory leak from getting screen info was fixed.

SharpHook - v4.2.0

Published by TolikPylypchuk over 1 year ago

In this release the ability to simulate mouse movement relative to the current cursor position was added, thanks to a contribution by @FaithBeam. libuiohook was updated to commit 56e8cb8.

SharpHook - v4.1.0

Published by TolikPylypchuk over 1 year ago

In this release the ability to simulate mouse press/release events at the current coordinates was added, thanks to a contribution by @FaithBeam. libuiohook was updated to commit 3a90aeb.

Also, turns out that libuiohook has always ignored mouse coordinates when simulating mouse wheel events, so the method which simulates them without coordinates was added, and the previous one was marked as obsolete.

SharpHook - v4.0.1

Published by TolikPylypchuk over 1 year ago

In this release libuiohook was updated to commit 41a17e2 which fixes support for multiple screens on Windows, thanks to a contribution by @FaithBeam.

Badges
Extracted from project README
NuGet NuGet