Skip to content

Commit 1903eeb

Browse files
Update the docs for version 6.2.0
1 parent 1cda629 commit 1903eeb

File tree

5 files changed

+47
-19
lines changed

5 files changed

+47
-19
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# SharpHook Changelog
22

3+
## [v6.2.0](https://github.com/TolikPylypchuk/SharpHook/releases/tag/v6.2.0) (July 19, 2025)
4+
5+
- The ability to disable events of type `KeyTyped` was added.
6+
7+
- Simulation of keyboard events was fixed on macOS.
8+
9+
- libuiohook was updated to commit
10+
[4217638](https://github.com/TolikPylypchuk/libuiohook/tree/42176381d991fc009b369295121bb2bccc9ff705).
11+
312
## [v6.1.2](https://github.com/TolikPylypchuk/SharpHook/releases/tag/v6.1.2) (June 22, 2025)
413

514
- Simulation of letter keys in different layouts was fixed on Windows – the same keys are simulated regardless of the

SharpHook/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ called.
3030
- `RunMouse` – creates a mouse-only global hook and runs it on the current thread, blocking it until `Stop` is called.
3131
- `Stop` – destroys the global hook.
3232

33-
**Important**: You have to remember that only one global hook can exist at a time since calling `SetDispatchProc` will
34-
override the previously set one.
33+
> **Important**: You have to remember that only one global hook can exist at a time since calling `SetDispatchProc` will
34+
> override the previously set one.
3535
3636
Additionally, `UioHook` contains the `PostEvent` method for simulating input events.
3737

@@ -89,9 +89,9 @@ propagation by setting the `SuppressEvent` property to `true` inside the event h
8989
and is only supported on Windows and macOS. You can check the event time and whether the event is real or simulated with
9090
the `EventTime` and `IsEventSimulated` properties respectively.
9191

92-
**Important**: Always use one instance of `IGlobalHook` at a time in the entire application since they all must use the
93-
same static method to set the hook callback for libuiohook, so there may only be one callback at a time. Running a
94-
global hook when another global hook is already running will corrupt the internal global state of libuiohook.
92+
> **Important**: Always use one instance of `IGlobalHook` at a time in the entire application since they all must use the
93+
> same static method to set the hook callback for libuiohook, so there may only be one callback at a time. Running a
94+
> global hook when another global hook is already running will corrupt the internal global state of libuiohook.
9595
9696
You can create a keyboard-only or a mouse-only hook by passing a `GlobalHookType` to the hook's constructor. This makes
9797
a real difference only on Windows where there are two different global hooks – a keyboard hook and a mouse hook. On

docs/articles/about.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ You need .NET 9 to build SharpHook.
5555

5656
## Changelog
5757

58+
### [v6.2.0](https://github.com/TolikPylypchuk/SharpHook/releases/tag/v6.2.0) (July 19, 2025)
59+
60+
- The ability to disable events of type `KeyTyped` was added.
61+
62+
- Simulation of keyboard events was fixed on macOS.
63+
64+
- libuiohook was updated to commit
65+
[4217638](https://github.com/TolikPylypchuk/libuiohook/tree/42176381d991fc009b369295121bb2bccc9ff705).
66+
5867
### [v6.1.2](https://github.com/TolikPylypchuk/SharpHook/releases/tag/v6.1.2) (June 22, 2025)
5968

6069
- Simulation of letter keys in different layouts was fixed on Windows – the same keys are simulated regardless of the

docs/articles/native.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ the hood.
1212
## Low-Level Functionality Providers
1313

1414
If you want to use the low-level functionality, you don't need to use the `UioHook` class directly. Instead you can use
15-
interfaces in the `SharpHook.Providers` namespace. The methods in those interfaces are the same as in the `UioHook`
16-
class. `SharpHook.Providers.UioHookProvider` implements all of these interfaces and simply calls the corresponding
17-
methods in `UioHook`. This should be done to decouple your code from `UioHook` and make testing easier.
15+
interfaces in the `SharpHook.Providers` namespace. The methods and properties in those interfaces are the same as in the
16+
`UioHook` class. `SharpHook.Providers.UioHookProvider` implements all of these interfaces and simply calls the
17+
corresponding methods in `UioHook`. This should be done to decouple your code from `UioHook` and make testing easier.
1818

1919
## Working with the Hook Itself
2020

@@ -95,6 +95,12 @@ thread which handles the event. Supressing events works only on Windows and macO
9595
> after `MouseReleased` if the cursor was not dragged. Since these events are raised by libuiohook, and not the OS,
9696
> suppressing them has no effect.
9797
98+
Events of type `KeyTyped` can be disabled using the `UioHook.SetKeyTypedEnabled` method. It is recommended to disable
99+
them if your application doesn't use them as these events may cause slight system-wide side effects. More information
100+
can be found in [an article on OS-specific constraints](os-constraints.md). `UioHook.IsKeyTypedEnabled` can be used to
101+
query whether `KeyTyped` events are enabled. By default they are enabled. `SharpHook.Providers.IGlobalHookProvider`
102+
contains the `KeyTypedEnabled` property which can also be used to control this behaviour.
103+
98104
## Simulating Input Events
99105

100106
`UioHook` contains the `PostEvent` method for simulating input events. It accepts a `UioHookEvent`, but it doesn't need

docs/articles/os-constraints.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ This article describes OS-specific constrains and other things that should be no
88

99
Only Windows 10 and 11 are supported.
1010

11-
> [!IMPORTANT]
12-
> If the global hook runs on versions of Windows older than Windows 10 1607, then it will destroy dead keys rendering
13-
> them unusable. This is because it uses the
14-
> [`ToUnicodeEx`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-tounicodeex) function to
15-
> determine which characters are typed by key presses, and before Windows 10 1607 this function changed the keyboard
16-
> state.
17-
18-
> [!IMPORTANT]
19-
> There is an issue on Windows 10 – when a global hook is running, some editors may insert Unicode characters when the
20-
> user presses <kbd>Alt</kbd>+<kbd>Up Arrow</kbd> or <kbd>Alt</kbd>+<kbd>Down Arrow</kbd>. This issue is not present on
21-
> Windows 11.
11+
### `KeyTyped` Events
12+
13+
It is recommended to disable events of type `KeyTyped` if they are unused since they may cause system-wide side
14+
effects:
15+
16+
- When a keyboard global hook is running with `KeyTyped` events enabled on versions of Windows older than Windows 10
17+
1607, it will destroy dead keys rendering them unusable. This is because it uses the
18+
[`ToUnicodeEx`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-tounicodeex) function to
19+
determine which characters are typed by key presses, and before Windows 10 1607 this function changed the dead key
20+
state.
21+
22+
- When a keyboard global hook is running with `KeyTyped` events enabled, some editors may insert Unicode characters when
23+
the user presses <kbd>Alt</kbd>+<kbd>Up Arrow</kbd> or <kbd>Alt</kbd>+<kbd>Down Arrow</kbd>. As of July 2025, on Windows
24+
11, this issue can be reproduced in Microsoft Visual Studio, but on Windows 10, it can be reproduced in other editors as
25+
well.
2226

2327
### Supported Architectures
2428

0 commit comments

Comments
 (0)