This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues/pull-requests.
SkyHook-Unity/README.md

33 lines
719 B
Markdown
Raw Permalink Normal View History

2022-11-02 19:28:50 +09:00
# SkyHook-Unity
2022-11-06 23:41:11 +09:00
SkyHook for Unity.
2022-11-06 10:57:35 +09:00
## Installation
2022-11-06 23:41:11 +09:00
1. Open package manager with `Window -> Package Manager`.
2. Click `+` button and find `Add package from git URL...`.
2022-11-06 10:57:35 +09:00
![Add package from git URL](images/tuto1.png)
2022-11-06 23:41:11 +09:00
3. Paste `git+https://git.pikokr.dev/SkyHook/SkyHook-Unity.git` and click `Add` button.
2022-11-06 10:57:35 +09:00
## Usage
2022-11-06 23:41:11 +09:00
### Starting and stopping the hook
2022-11-06 10:57:35 +09:00
```cs
2022-11-06 23:41:11 +09:00
SkyHookManager.StartHook(); // Starts the hook
2022-11-06 10:57:35 +09:00
2022-11-06 23:41:11 +09:00
SkyHookManager.StopHook(); // Stops the hook, this is automatically called on exit
2022-11-06 10:57:35 +09:00
```
2022-11-06 23:41:11 +09:00
### Receiving key events
2022-11-06 10:57:35 +09:00
2022-11-06 23:41:11 +09:00
> NOTE:
> - `Label` field for labelling keys' names such as F11
> - `Key` field is the raw key code from native module.
2022-11-06 10:57:35 +09:00
```cs
2022-11-06 12:24:55 +09:00
SkyHookManager.KeyUpdated.AddListener(ev => {
2022-11-06 23:41:11 +09:00
// Your code
2022-11-06 10:57:35 +09:00
});
```