mirror of
https://github.com/unraid/webgui.git
synced 2026-02-22 01:39:12 -06:00
Merge pull request #1508 from SimonFair/Add-none-option-for-keymap-for-virtual-gpu
Add option for no keymap.
This commit is contained in:
@@ -789,7 +789,7 @@
|
||||
if ($gpu['id'] == 'virtual') {
|
||||
$strKeyMap = '';
|
||||
if (!empty($gpu['keymap'])) {
|
||||
$strKeyMap = "keymap='" . $gpu['keymap'] . "'";
|
||||
if ($gpu['keymap'] != "none") $strKeyMap = "keymap='" . $gpu['keymap'] . "'";
|
||||
}
|
||||
|
||||
$passwdstr = '';
|
||||
@@ -2085,7 +2085,7 @@
|
||||
function domain_get_vnc_keymap($domain) {
|
||||
$tmp = $this->get_xpath($domain, '//domain/devices/graphics/@keymap', false);
|
||||
if (!$tmp)
|
||||
return 'en-us';
|
||||
return 'none';
|
||||
|
||||
$var = $tmp[0];
|
||||
unset($tmp);
|
||||
|
||||
@@ -1089,6 +1089,7 @@ private static $encoding = 'UTF-8';
|
||||
|
||||
function getValidKeyMaps() {
|
||||
$arrValidKeyMaps = [
|
||||
'none' => 'No Keymap',
|
||||
'ar' => 'Arabic (ar)',
|
||||
'hr' => 'Croatian (hr)',
|
||||
'cz' => 'Czech (cz)',
|
||||
@@ -1413,6 +1414,7 @@ private static $encoding = 'UTF-8';
|
||||
// preserve vnc/spice port settings
|
||||
// unset($new['devices']['graphics']['@attributes']['port'],$new['devices']['graphics']['@attributes']['autoport']);
|
||||
if (!$new['devices']['graphics']) unset($old['devices']['graphics']);
|
||||
if (!isset($new['devices']['graphics']['@attributes']['keymap']) && isset($old['devices']['graphics']['@attributes']['keymap'])) unset($old['devices']['graphics']['@attributes']['keymap']) ;
|
||||
// update parent arrays
|
||||
if (!$old['devices']['hostdev']) unset($old['devices']['hostdev']);
|
||||
if (!$new['devices']['hostdev']) unset($new['devices']['hostdev']);
|
||||
|
||||
Reference in New Issue
Block a user