pull/16/merge
Yukimi Kazari 2023-11-25 18:40:19 -05:00 committed by GitHub
commit 8624c31a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 1 deletions

BIN
.vs/slnx.sqlite 100644

Binary file not shown.

View File

@ -14,6 +14,7 @@ pub enum KeyboardLayout {
Tasoller,
Yuancon,
Umiguri,
PDFTA,
TasollerHalf,
EightK,
SixK,
@ -140,6 +141,12 @@ impl OutputMode {
sensitivity: u8::try_from(v["keyboardSensitivity"].as_i64()?).ok()?,
direct_input: v["keyboardDirectInput"].as_bool()?,
},
"kb-pdfta" => OutputMode::Keyboard {
layout: KeyboardLayout::PDFTA,
polling: PollingRate::from_str(v["outputPolling"].as_str()?)?,
sensitivity: u8::try_from(v["keyboardSensitivity"].as_i64()?).ok()?,
direct_input: v["keyboardDirectInput"].as_bool()?,
},
"gamepad-voltex" => OutputMode::Gamepad {
layout: GamepadLayout::Voltex,
polling: PollingRate::from_str(v["outputPolling"].as_str()?)?,

View File

@ -42,6 +42,26 @@ const UMIGURI_KB_MAP: [usize; 41] = [
0x50, 0xbc, 0xbe, // P, VK_OEM_COMMA, VK_OEM_PERIOD,
0x0d, 0x20, 0x1b // VK_RETURN, VK_SPACE, VK_ESCAPE
];
#[rustfmt::skip]
const PDFTA_KB_MAP: [usize; 41] = [
0x5a /* Z */, 0x50 /* P */,
0x5a /* Z */, 0x50 /* P */,
0x5a /* Z */, 0x4F /* O */,
0x5a /* Z */, 0x4F /* O */,
0x58 /* X */, 0x49 /* I */,
0x58 /* X */, 0x49 /* I */,
0x58 /* X */, 0x55 /* U */,
0x58 /* X */, 0x55 /* U */,
0x43 /* C */, 0x52 /* R */,
0x43 /* C */, 0x52 /* R */,
0x43 /* C */, 0x45 /* E */,
0x43 /* C */, 0x45 /* E */,
0x56 /* V */, 0x57 /* W */,
0x56 /* V */, 0x57 /* W */,
0x56 /* V */, 0x51 /* Q */,
0x56 /* V */, 0x51 /* Q */,
0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b // VK_ESCAPE
];
#[rustfmt::skip]
const TASOLLER_HALF_KB_MAP: [usize; 41] = [
@ -150,6 +170,7 @@ impl KeyboardOutput {
KeyboardLayout::Tasoller => &TASOLLER_KB_MAP,
KeyboardLayout::Yuancon => &YUANCON_KB_MAP,
KeyboardLayout::Umiguri => &UMIGURI_KB_MAP,
KeyboardLayout::PDFTA => &PDFTA_KB_MAP,
KeyboardLayout::TasollerHalf => &TASOLLER_HALF_KB_MAP,
KeyboardLayout::EightK => &EIGHT_K_MAP,
KeyboardLayout::SixK => &SIX_K_MAP,

View File

@ -27,6 +27,7 @@
let ledWebsocketUrl = "http://localhost:3001";
let ledUmgrWebsocketPort = 7124;
let ledSerialPort = "COM5";
let hideByDefault = false;
let dirty = false;
@ -41,6 +42,7 @@
let tick = 0;
let previewData = Array(131).fill(0);
let timerData = "";
let initStart = true;
function updatePolling(enabled) {
if (!!polling) {
@ -85,6 +87,11 @@
ledWebsocketUrl = payload.ledWebsocketUrl || "http://localhost:3001";
ledUmgrWebsocketPort = payload.ledUmgrWebsocketPort || 7124;
ledSerialPort = payload.ledSerialPort || "COM5";
hideByDefault = payload.hideByDefault || false;
if (hideByDefault && initStart) {
hide();
}
initStart = false;
});
await listen("showState", (event) => {
@ -143,6 +150,7 @@
ledWebsocketUrl,
ledUmgrWebsocketPort,
ledSerialPort,
hideByDefault,
})
);
dirty = false;
@ -320,6 +328,7 @@
>XBOX 360 Gamepad, Neardayo Layout</option
>
<option value="gamepad-hori">DS4, HORI DIVA FT ASC Layout</option>
<option value="kb-pdfta">Keyboard 16-zone, DIVA FT Custom Layout</option>
<option value="gamepad-hori-wide"
>DS4, HORI DIVA FT ASC Slider Only Layout</option
>
@ -611,6 +620,21 @@
</div>
</div>
{/if}
<div class="row">
<div class="label" />
<div class="input">
<span>
<input
type="checkbox"
id="direct-input"
style="width: unset;"
bind:checked={hideByDefault}
on:change={markDirty}
/>
<label for="direct-input">Hide Window on Launch</label>
</span>
</div>
</div>
</div>
<div class="buttons-row">
<button