diff --git a/CHANGELOG.md b/CHANGELOG.md index 1387ec0..a35953a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.18.1 + +- Keys can now be unbinded with Esc +- Fixed CHUNITHM IR behavior on actual keyboards + ## 0.18.0 - Added new grouping options to the package list diff --git a/rust/src/modules/keyboard.rs b/rust/src/modules/keyboard.rs index 0c94ef3..994091a 100644 --- a/rust/src/modules/keyboard.rs +++ b/rust/src/modules/keyboard.rs @@ -117,12 +117,16 @@ impl Keyboard { } } Keyboard::Chunithm(kb) => { + let mut enabled_ir = false; if kb.enabled { for (i, cell) in kb.cell.iter().enumerate() { ini.with_section(Some("slider")).set(format!("cell{}", i + 1), cell.to_string()); } for (i, ir) in kb.ir.iter().enumerate() { - ini.with_section(Some("ir")).set(format!("ir{}", i + 1), ir.to_string()); + ini.with_section(Some("ir")).set(format!("ir{}", i + 1), (*ir).to_string()); + if i > 0 && *ir != 0 { + enabled_ir = true; + } } ini.with_section(Some("io3")) .set("test", kb.test.to_string()) @@ -140,8 +144,13 @@ impl Keyboard { .set("service", "0") .set("coin", "0"); } - ini.with_section(Some("io3")) - .set("ir", "0"); + if enabled_ir { + ini.with_section(Some("io3")) + .set("ir", "0"); + } else { + ini.with_section(Some("io3")) + .set("ir", kb.ir[0].to_string()); + } } } diff --git a/rust/tauri.conf.json b/rust/tauri.conf.json index 07c52d0..e3d7df4 100644 --- a/rust/tauri.conf.json +++ b/rust/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "STARTLINER", - "version": "0.18.0", + "version": "0.18.1", "identifier": "zip.patafour.startliner", "build": { "beforeDevCommand": "bun run dev", diff --git a/src/components/KeyboardKey.vue b/src/components/KeyboardKey.vue index ed8e5fd..d12c993 100644 --- a/src/components/KeyboardKey.vue +++ b/src/components/KeyboardKey.vue @@ -4,6 +4,9 @@ import InputText from 'primevue/inputtext'; import { fromKeycode, toKeycode } from '../keyboard'; import { usePrfStore } from '../stores'; import { OngekiButtons } from '../types'; +import { useI18n } from 'vue-i18n'; + +const { t } = useI18n(); const prf = usePrfStore(); @@ -61,6 +64,10 @@ const handleKey = ( } } + if (event.code === 'Escape') { + keycode = 0; + } + if (index !== undefined) { data[button][index] = keycode; } else { @@ -160,13 +167,24 @@ const fontSize = computed(() => { -
+
@@ -108,6 +108,7 @@ const prf = usePrfStore(); button="ir" :index="idx - 1" :tooltip="`ir${idx}`" + tall small color="rgba(0, 255, 0, 0.2)" /> diff --git a/src/i18n/en.ts b/src/i18n/en.ts index b009038..a069dc3 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -189,6 +189,8 @@ export default { 'Only applicable if the IO module is set to segatools built-in (keyboard) or a compatible third-party module (like mu3io.NET)', leverMode: 'Lever mode', mouse: 'Mouse', + irTooltip: + 'When playing on an actual keyboard, only bind ir1; leave the rest unbound', }, wine: { prefix: 'Wine prefix', diff --git a/src/i18n/pl.ts b/src/i18n/pl.ts index 0100a96..6b1dab7 100644 --- a/src/i18n/pl.ts +++ b/src/i18n/pl.ts @@ -229,6 +229,8 @@ export default { 'Dotyczy tylko wtedy, gdy moduł IO jest ustawiony na wbudowaną emulację lub zgodny moduł (np. mu3io.NET)', leverMode: 'Tryb wajchy', mouse: 'Mysz', + irTooltip: + 'Jeśli grasz na klawiaturze, ustaw tylko ir1; pozostałe zostaw wyłączone', }, wine: { prefix: 'Wine prefix',