Added PD Future Tone Keyboard Layout

pull/16/head
UiharuKazari2008 2023-11-25 07:03:47 -05:00
parent 6124dee2db
commit 418e8f21c6
3 changed files with 30 additions and 1 deletions

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

@ -319,7 +319,8 @@
<option value="gamepad-neardayo"
>XBOX 360 Gamepad, Neardayo Layout</option
>
<option value="gamepad-hori">DS4, HORI DIVA FT ASC 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
>