No description
  • Rust 58.3%
  • Shell 32.3%
  • PowerShell 7.1%
  • Nix 2.3%
Find a file
CrackThrough ad9d383b20
All checks were successful
ci/crow/manual/unity Pipeline was successful
fix: missing VK_MAP_BACKWARDS
2026-06-21 23:51:22 +09:00
.cargo fix: toolchain 2026-06-21 05:28:41 +09:00
.crow fix: 저는 저능합니다 2 2026-06-21 05:54:00 +09:00
src feat: add vk_to_key_code() 2026-06-21 23:35:01 +09:00
vendor fix: missing VK_MAP_BACKWARDS 2026-06-21 23:51:22 +09:00
.envrc whatever this is i need to commit 2026-06-20 22:05:33 +09:00
.gitignore fix: joystick is handled on linux 2025-02-12 01:58:22 +09:00
.gitmodules whatever this is i need to commit 2026-06-20 22:05:33 +09:00
build-win.sh feat: build windows crates on linux 2026-06-21 03:49:24 +09:00
build.ps1 fix: use gnu target for windows 2023-12-02 12:11:32 +09:00
build.sh feat: multi platform build 2026-06-21 05:36:27 +09:00
Cargo.toml fix: crate type 2023-03-28 19:25:36 +09:00
Cross.toml feat: use cross for linux building 2025-02-13 19:40:52 +09:00
devenv.lock whatever this is i need to commit 2026-06-20 22:05:33 +09:00
devenv.nix whatever this is i need to commit 2026-06-20 22:05:33 +09:00
devenv.yaml fix: joystick is handled on linux 2025-02-12 01:58:22 +09:00
README.md chore: fix a typo in README 2022-11-26 17:07:00 +09:00
setup-targets.sh chore: add darwin aarch64 target 2022-11-03 23:51:14 +09:00

SkyHook-Native

Dynamic library of SkyHook for use with other languages.

Usage

The following examples are all in C#.

Functions

The extern functions that you should run are simple.

There are just two; start_hook and stop_hook.

start_hook

// Here, we assign a callback along with starting a hook.
// The NativeEvent type is declared below "Types" header.
public static delegate void HookCallback(NativeEvent ev);

// Here, we have an extern method to invoke.
[DllImport("skyhook", EntryPoint = "start_hook")]
public static extern void StartHook(HookCallback callback);

stop_hook

// No additional information required to provide when stopping the hook.
[DllImport("skyhook", EntryPoint = "stop_hook")]
public static extern void StopHook();

Types

NativeEventType

public enum NativeEventType {
    KeyPressed,
    KeyReleased
}

NativeEvent

[StructLayout(LayoutKind.Sequential)]
public struct NativeEvent
{
    public readonly ulong Time; // This is the key state update time.
    public readonly NativeEventType Type; // Whether the key is up or down.
    public readonly ushort Label; // Unified label for keys, such as ESC or F11.
    public readonly ushort Key; // Actual key code from native level.
}

Development

git clone https://git.pikokr.dev/SkyHook/SkyHook-Native #Clone

To build, just run build.sh on Linux or MacOS, build.ps1 on Windows.