- PR1: gamescope detection at boot — X11 backend, scale 1, kiosk fullscreen; tray + miniplayer suppressed (click-offset fix). - PR2: full keyboard navigation for the kiosk (3 zones, focus ring, scroll-into-view; typing never navigates). - PR3: native gamepad via gilrs — D-pad/stick/A/B to synthetic Slint keys with hysteresis, repeat and debounce; B suppresses Escape while a text field is focused (closes the Steam OSK). - PR4: Steam OSK via the steam://open/keyboard deeplink on text focus. - PR5: scripts/qbz-add-to-steam (stdlib-only, 19/19 unit tests) with artwork assets + pure-gamepad controller layout. Spec: qbz-nix-docs/steam-deck/STEAM_DECK_GAME_MODE_PLAN.md km
23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
// Standalone leaf global for the hotkey text-input guard.
|
|
//
|
|
// Kept OUT of `state.slint` on purpose: `state.slint` imports structs from a
|
|
// few low-level primitives (e.g. `JumpNavTab` from `primitives/JumpNavBar.slint`),
|
|
// so those primitives CANNOT import `state.slint` back — that is a recursive
|
|
// import. This leaf has zero imports, so any file can import `UiFocusState`
|
|
// from here without a cycle. `state.slint` re-exports it for everyone else.
|
|
|
|
// Every free-text TextInput sets this on `changed has-focus`, so the global
|
|
// hotkey dispatcher ignores single-key shortcuts (Space, q, ?, 1-5, …) while
|
|
// the user is typing (mirrors the Tauri `isInputTarget` check).
|
|
export global UiFocusState {
|
|
in-out property <bool> text-input-focused: false;
|
|
// Steam Deck OSK (Steam plan PR 4): fired on every focus transition so
|
|
// Rust (steam_osk) can open/close the Steam OSK — every text field rides
|
|
// it with zero per-field wiring. Mode: 0 = single-line (all fields today).
|
|
in-out property <int> osk-mode: 0;
|
|
callback osk(bool /* focused */, int /* mode */);
|
|
changed text-input-focused => {
|
|
root.osk(root.text-input-focused, root.osk-mode);
|
|
}
|
|
}
|