diff --git a/README.md b/README.md index 2d35597..42ddaa6 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,108 @@ -# Todo +logo -- major - - acio support -- qol - - more error handling - - comments -- when umiguri comes out - - ouptut websocket - - led websocket +# slidershim -``` -Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -$env:RUST_BACKTRACE = "1"; -yarn tauri dev -``` +Software adapter for various Chunithm slider controllers with a built-in Brokenithm web controller. Has support for keyboard/gamepad output and LED lighting. + +[Download link](https://github.com/4yn/slidershim/releases/latest) + +screenshot + +## Setup Instructions + +1. [Download here](https://github.com/4yn/slidershim/releases/latest) +2. Extract to any location you like. +3. Run `slidershim.exe`. +4. Pick your input device, output method and preferred lighting. +5. Click apply. +6. ??? +7. Profit! + +### Extra Pointers + +- Less resources are used when the configuration window is hidden. +- Un-hide the configuration window from the system tray. +- For gamepad output, you will need to install [ViGEmBus](https://github.com/ViGEm/ViGEmBus/releases/latest) for it to work. +- For serial LED input, you may need to install [com0com](https://sourceforge.net/projects/com0com/files/com0com/2.2.2.0/) to bridge slidershim with the LED data stream. + +### Brokenithm Setup + +1. Set the device option to "Brokenithm" and apply. +2. Allow firewall access to `slidershim.exe` +3. Connect a touch device to the same wifi or local network as your windows machine + > Windows hotspot works too, but make sure to give "public" firewall access +4. Open the web controller in your tablet device web browser. One of the links should work. + 1. Either manually type in the IP address if you know what IP it is; + 2. Or scan the generated "Broknenithm QR" to get a list of clickable links and save some typing. +5. (Optional) Add the webpage to home screen and/or enable guided access to avoid accidentally exiting the web controller. + +## Output Layouts + +![layouts](./res/layouts/layout.png) + +## Troubleshooting + +
+My controller is not recognised + +- slidershim supports the GAMO2 Tasoller on HID firmware and Yuancon Laverita v2 controllers on HID firmware. + - If you are using a Tasoller controller, make sure it has the correct HID firmware installed. + - If your hardware controller is not one of these, it will not work. +- Hotplug is not supported. If you plugged in the controller after starting slidershim, re-connect your controller by just clicking the "Apply" button (even if it is grey). + +
+ +
+I am using a controller and my keyboard buttons are pressed too often + +- Adjust the sensitivity options. +- The higher the number, the harder it is for keyboard buttons to be pressed. + +
+ +
+The Brokenithm controller cannot be loaded + +- Make sure that you can load the controller in your web browser _from the same windows machine that is running slidershim_. + - Close the windows machine web browser afterwards once you have tested it. +- Double check that your tablet device is connected to the same wifi or local network. +- Try restarting slidershim. + +
+ +
+The Brokenithm controller is stuck + +- Applying changes to the slidershim configuration will reset the brokenithm controller. +- Refresh the web page or force-stop the controller from your tablet device's task switcher and re-open the controller. + +
+ +
+I am still having problems + +- Join the [Cons&Stuff Discord](https://discord.com/invite/zFGemg4r) and ping me there. +- Try to bring your logs. + +
+ +
+Neardayo layout? + +- [Neardayo layout.](https://youtu.be/8dA-RCSB-qA?t=25) + +
+ +## Technical Information + +- Built with Rust, [tauri](https://github.com/tauri-apps/tauri) + [Svelte](https://github.com/sveltejs/svelte), [rusb](https://github.com/a1ien/rusb), [hyper](https://github.com/hyperium/hyper/), [tokio-](https://github.com/snapview/tokio-tungstenite)[tungstenite](https://github.com/snapview/tungstenite-rs) and [serialport](https://crates.io/crates/serialport) +- USB device polling is done on a dedicated thread while everything else is done on a async runtime. + +## Planned Features + +- Major: + - Support AC slider serial protocol + - Output and LED websocket adapters when UMIGURI comes out +- QOL: + - Documentation + - Comprehensive logging and error handling diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..4012dc6 --- /dev/null +++ b/notes.md @@ -0,0 +1,5 @@ +``` +Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass +$env:RUST_BACKTRACE = "1"; +yarn tauri dev +``` diff --git a/public/favicon.png b/public/favicon.png deleted file mode 100644 index 7e6f5eb..0000000 Binary files a/public/favicon.png and /dev/null differ diff --git a/res/layouts/index.html b/res/layouts/index.html new file mode 100644 index 0000000..99883c5 --- /dev/null +++ b/res/layouts/index.html @@ -0,0 +1,334 @@ + + + + + + + + Slidershim Layouts + + +
+
Keyboard 32-zone, Tasoller Layout
+
+
1
+
Q
+
2
+
W
+
3
+
E
+
4
+
R
+
5
+
T
+
6
+
Y
+
7
+
U
+
8
+
I
+
A
+
Z
+
S
+
X
+
D
+
C
+
F
+
V
+
G
+
B
+
H
+
N
+
J
+
M
+
K
+
,
+
+
+
]
+
[
+
;
+
.
+
'
+
/
+
+
+
[enter]
+
[space]
+
[esc]
+
+
+
+
Keyboard 32-zone, Yuancon Layout
+
+
5
+
3
+
1
+
Y
+
W
+
U
+
S
+
Q
+
O
+
M
+
K
+
I
+
G
+
E
+
C
+
A
+
6
+
4
+
2
+
Z
+
X
+
V
+
T
+
R
+
P
+
N
+
L
+
J
+
H
+
F
+
D
+
B
+
+
+
;
+
\
+
]
+
[
+
=
+
-
+
+
+
[enter]
+
[space]
+
[esc]
+
+
+
+
Keyboard 8-zone, Deemo Layout
+
+
A
+
S
+
D
+
F
+
J
+
K
+
L
+
;
+
+
+
+ [space] +
+
+
+
[disabled]
+
[disabled]
+
[disabled]
+
+
+
+
Keyboard 10-zone, Voltex/Neardayo Layout
+
+
W
+
E
+
O
+
P
+
D
+
F
+
J
+
K
+
C
+
M
+
+
+
P
+
O
+
E
+
W
+
+
+
1
+
[esc]
+
[enter]
+
+
+
+
XBOX 360 Gamepad, Voltex/Neardayo Layout
+
+
LS
<<
+
LS
>>
+
RS
<<
+
RS
>>
+
A
+
B
+
X
+
Y
+
LB
+
RB
+
+
+
RS>
+
RS<
+
LS>
+
LS<
+
+
+
[start]
+
[back]
+
[guide]
+
+
+ + diff --git a/res/layouts/layout.png b/res/layouts/layout.png new file mode 100644 index 0000000..9c6c95e Binary files /dev/null and b/res/layouts/layout.png differ diff --git a/res/screenshots/demo.png b/res/screenshots/demo.png new file mode 100644 index 0000000..df70c58 Binary files /dev/null and b/res/screenshots/demo.png differ diff --git a/src-tauri/src/slider_io/keyboard.rs b/src-tauri/src/slider_io/keyboard.rs index fb269aa..883ae82 100644 --- a/src-tauri/src/slider_io/keyboard.rs +++ b/src-tauri/src/slider_io/keyboard.rs @@ -57,7 +57,7 @@ const VOLTEX_KB_MAP: [usize; 41] = [ 0x4f, 0x4f, 0x4f, 0x4f, // O 0x50, 0x50, 0x50, 0x50, // P 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Disabled - 0x31, 0x1b, 0x0d, // 1, VK_ESCAPE, VK_RETURN + 0x31, 0x0d, 0x1b, // 1, VK_RETURN, VK_ESCAPE ]; #[rustfmt::skip] @@ -75,7 +75,7 @@ const VOLTEX_KB_MAP_NEARDAYO: [usize; 41] = [ 0x4f, 0x4f, 0x4f, 0x4f, // O 0x50, 0x50, 0x50, 0x50, // P 0x57, 0x45, 0x45, 0x4f, 0x4f, 0x50, // Disabled - 0x31, 0x1b, 0x0d, // 1, VK_ESCAPE, VK_RETURN + 0x31, 0x0d, 0x1b, // 1, VK_RETURN, VK_ESCAPE ]; pub struct KeyboardOutput {