mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
[UI] Add Shift key for noVNC consoles (#5237)
This commit is contained in:
parent
87ee86679e
commit
6cd5b36347
BIN
systemvm/agent/noVNC/app/images/shift.png
Normal file
BIN
systemvm/agent/noVNC/app/images/shift.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 212 B |
@ -282,6 +282,8 @@ const UI = {
|
|||||||
.addEventListener('click', UI.toggleExtraKeys);
|
.addEventListener('click', UI.toggleExtraKeys);
|
||||||
document.getElementById("noVNC_toggle_ctrl_button")
|
document.getElementById("noVNC_toggle_ctrl_button")
|
||||||
.addEventListener('click', UI.toggleCtrl);
|
.addEventListener('click', UI.toggleCtrl);
|
||||||
|
document.getElementById("noVNC_toggle_shift_button")
|
||||||
|
.addEventListener('click', UI.toggleShift);
|
||||||
document.getElementById("noVNC_toggle_windows_button")
|
document.getElementById("noVNC_toggle_windows_button")
|
||||||
.addEventListener('click', UI.toggleWindows);
|
.addEventListener('click', UI.toggleWindows);
|
||||||
document.getElementById("noVNC_toggle_alt_button")
|
document.getElementById("noVNC_toggle_alt_button")
|
||||||
@ -1551,6 +1553,17 @@ const UI = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleShift() {
|
||||||
|
const btn = document.getElementById('noVNC_toggle_shift_button');
|
||||||
|
if (btn.classList.contains("noVNC_selected")) {
|
||||||
|
UI.sendKey(KeyTable.XK_Shift_L, "ShiftLeft", false);
|
||||||
|
btn.classList.remove("noVNC_selected");
|
||||||
|
} else {
|
||||||
|
UI.sendKey(KeyTable.XK_Shift_L, "ShiftLeft", true);
|
||||||
|
btn.classList.add("noVNC_selected");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
toggleWindows() {
|
toggleWindows() {
|
||||||
const btn = document.getElementById('noVNC_toggle_windows_button');
|
const btn = document.getElementById('noVNC_toggle_windows_button');
|
||||||
if (btn.classList.contains("noVNC_selected")) {
|
if (btn.classList.contains("noVNC_selected")) {
|
||||||
|
|||||||
@ -107,6 +107,9 @@
|
|||||||
<input type="image" alt="Ctrl" src="app/images/ctrl.png"
|
<input type="image" alt="Ctrl" src="app/images/ctrl.png"
|
||||||
id="noVNC_toggle_ctrl_button" class="noVNC_button"
|
id="noVNC_toggle_ctrl_button" class="noVNC_button"
|
||||||
title="Toggle Ctrl">
|
title="Toggle Ctrl">
|
||||||
|
<input type="image" alt="Shift" src="app/images/shift.png"
|
||||||
|
id="noVNC_toggle_shift_button" class="noVNC_button"
|
||||||
|
title="Toggle Shift">
|
||||||
<input type="image" alt="Alt" src="app/images/alt.png"
|
<input type="image" alt="Alt" src="app/images/alt.png"
|
||||||
id="noVNC_toggle_alt_button" class="noVNC_button"
|
id="noVNC_toggle_alt_button" class="noVNC_button"
|
||||||
title="Toggle Alt">
|
title="Toggle Alt">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user