Add setting for suppressing input from mouse, keyboard, or gamepads (#941)

This commit is contained in:
Brian Kendall
2023-03-08 07:47:19 -05:00
committed by GitHub
parent 31885434f2
commit f238cf5303
4 changed files with 98 additions and 0 deletions

View File

@@ -297,6 +297,57 @@
If back_button_timeout &lt; 0, then the Home/Guide button will not be emulated<br />
</div>
</div>
<!--Enable Mouse Input-->
<div class="mb-3">
<label for="mouse" class="form-label"
>Enable Mouse Input</label
>
<select
id="mouse"
class="form-select"
v-model="config.mouse"
>
<option value="disabled">Disabled</option>
<option value="enabled">Enabled</option>
</select>
<div class="form-text">
Allows guests to control the host system with the mouse
</div>
</div>
<!--Enable Keyboard Input-->
<div class="mb-3">
<label for="keyboard" class="form-label"
>Enable Keyboard Input</label
>
<select
id="keyboard"
class="form-select"
v-model="config.keyboard"
>
<option value="disabled">Disabled</option>
<option value="enabled">Enabled</option>
</select>
<div class="form-text">
Allows guests to control the host system with the keyboard
</div>
</div>
<!--Enable Gamepad Input-->
<div class="mb-3">
<label for="gamepad" class="form-label"
>Enable Gamepad Input</label
>
<select
id="gamepad"
class="form-select"
v-model="config.controller"
>
<option value="disabled">Disabled</option>
<option value="enabled">Enabled</option>
</select>
<div class="form-text">
Allows guests to control the host system with a gamepad / controller
</div>
</div>
<!-- Key Repeat Delay-->
<div class="mb-3" v-if="platform === 'windows'">
<label for="key_repeat_delay" class="form-label"
@@ -952,6 +1003,9 @@
this.config.origin_pin_allowed || "pc";
this.config.origin_web_ui_allowed =
this.config.origin_web_ui_allowed || "lan";
this.config.mouse = this.config.mouse || "enabled";
this.config.keyboard = this.config.keyboard || "enabled";
this.config.controller = this.config.controller || "enabled";
this.config.hevc_mode = this.config.hevc_mode || 0;
this.config.encoder = this.config.encoder || "";
this.config.nv_preset = this.config.nv_preset || "p4";