Cross-Compatibility with Linux
Make this application cross-platform for Linux
-
Controller access (
SharpDX.XInputon Windows): SharpInputSystem (https://axiom3d.github.io/sharpinputsystem) could be used to access the gamepad -
Scroll wheel access: Use
libscroll.sowhich will work only with root privileges. This will work with pointing to a window and scrolling there
Fallback option for scrolling via Shift+Up/Down. This only works if the focused application supports this keybinding
[DllImport("libX11.so.6")]
static extern void XTestFakeKeyEvent(IntPtr display, int keycode, bool is_press, IntPtr time);
// Works without special perms on X11
- Mouse access: XQueryPointer/XWarpPointer can be used from the X11 libraries which will also work with XWayland under Wayland compositors:
[DllImport("X11")]
static extern IntPtr XOpenDisplay(IntPtr display);
[DllImport("X11")]
static extern int XWarpPointer(
IntPtr display, IntPtr src_w, IntPtr dest_w,
int src_x, int src_y, uint src_width, uint src_height,
int dest_x, int dest_y);
[DllImport("X11")]
static extern bool XQueryPointer(
IntPtr display, IntPtr w, out IntPtr root_return, out IntPtr child_return,
out int root_x_return, out int root_y_return,
out int win_x_return, out int win_y_return,
out uint mask_return);