Input Refractor. A tool that communicates with controllers through proprietary interfaces, and "refracts" them into something the operating system can understand.
InFract exposes controller features that are usually not accessible, like extra buttons and gyro/accelerometer data, by converting it into a virtual DualSense, DualSense Edge, DualShock 4 or SInput device (support varies per OS).
- GameSir Cyclone 2: Must be in XInput mode. Refracts back buttons, capture button, M button, and gyro.
Note
Currently only one controller is supported, though more can be added through further reverse engineering.
Windows:
- .NET 10 Runtime: For running the application.
- VIIPER (Recommended) or ViGEmBus (Legacy): For input emulation.
- HidHide: For hiding the unrefracted controller from applications. Optional, but highly recommended. (InFract does NOT configure HidHide for you!)
Warning
Windows builds aren't heavily tested by me. Your mileage may vary.
Linux:
- User must have
hidrawanduhidpermissions. Copy50-infract.rulesto/etc/udev/rules.d/, and add yourself to theinputgroup:usermod -aG input $USER.
Binaries can be downloaded from the releases tab.
InFract currently has no installation method. As long as the requirements are met, you can run the program as normal on Windows, or within your terminal on Linux. You can also set it up as a service that runs at start up. Both of these are automated for NixOS users via a flake.
This may be made easier in the future.
InFract is designed to need as little configuration as possible. You shouldn't need to change any settings, unless you know what you're doing.
Configuration is done through environment variables prefixed with INFRACT_.
INFRACT_EMULATOR: Input emulator to use.UHID: Linux only (Default).VIIPER: Windows only (Default).VIGEM: Windows only. Legacy option.
INFRACT_CONVERTER: Device to emulate. Varies based on chosen emulator.DUALSENSE: Only onUHIDorVIIPERemulators (Default).DUALSENSEEDGE: Only onUHIDorVIIPERemulators.SINPUT: Only onUHIDemulator.DUALSHOCK4XBOX360
INFRACT_VIIPER_ADDRESS: VIIPER server address. Defaults tolocalhost.INFRACT_VIIPER_PORT: VIIPER server port. Defaults to3242.INFRACT_VIIPER_PASSWORD: VIIPER server password. Defaults to no password.
This repository exposes a Nix flake:
packages.<system>.infract/packages.<system>.default: builds and exposes the binary.nixosModules.default: enables a systemd service that runs the same wrapper and registers the bundled udev rules.
To just run it:
nix run github:NaokoAF/InFract?dir=nix#infractNote
Might not hide the controller, it's recommended to use the module instead.
Example NixOS flake configuration:
{
inputs = {
infract.url = "github:NaokoAF/InFract?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, infract, ... }: {
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
infract.nixosModules.default
{
services.infract = {
enable = true;
environment = {
INFRACT_CONVERTER = "SINPUT";
};
};
}
];
};
};
}