This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
Go to file
paring 9284a86dab
chore: update library
2022-11-06 11:25:24 +09:00
src fix: send nanoseconds value 2022-11-05 16:44:24 +09:00
vendor chore: update library 2022-11-06 11:25:24 +09:00
.gitignore chore: add .DS_Store to gitignore 2022-11-03 23:51:04 +09:00
.gitmodules Initial commit 2022-11-03 18:58:31 +09:00
Cargo.toml feat: setup as shared library 2022-11-03 19:00:47 +09:00
README.md feat: example code 2022-11-06 10:48:46 +09:00
build.ps1 chore: add build script for windows 2022-11-05 00:53:54 +09:00
build.sh fix: remove cross compiling 2022-11-05 13:42:52 +09:00
setup-targets.sh chore: add darwin aarch64 target 2022-11-03 23:51:14 +09:00

README.md

SkyHook-Native

dynamic library of SkyHook for use with other languages

Usage

The following examples are all in C#

Functions

The exported functions are simple. Just start_hook and stop_hook

start_hook

public static delegate void HookCallback(NativeEvent event);

[DllImport("skyhook", EntryPoint = "start_hook")]
public static extern void StartHook(HookCallback callback);

stop_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;
  public readonly EventType Type;
  public readonly uint Key;
}

Development

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

to build, just run build.sh on Linux of MacOS, build.ps1 on Windows