+ // add sendKeys buttons
+ var skpanel = $D('noVNC_send_keys_panel');
+
+ var buttonlist = [
+ {
+ text: 'Tab', handler: function() {
+ UI.pve_send_key('tab');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-Delete', handler: function() {
+ UI.pve_send_key('ctrl-alt-delete');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-Backspace', handler: function() {
+ UI.pve_send_key('ctrl-alt-backspace');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F1', handler: function() {
+ UI.pve_send_key('ctrl-alt-f1');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F2', handler: function() {
+ UI.pve_send_key('ctrl-alt-f2');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F3', handler: function() {
+ UI.pve_send_key('ctrl-alt-f3');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F4', handler: function() {
+ UI.pve_send_key('ctrl-alt-f4');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F5', handler: function() {
+ UI.pve_send_key('ctrl-alt-f5');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F6', handler: function() {
+ UI.pve_send_key('ctrl-alt-f6');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F7', handler: function() {
+ UI.pve_send_key('ctrl-alt-f7');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F8', handler: function() {
+ UI.pve_send_key('ctrl-alt-f8');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F9', handler: function() {
+ UI.pve_send_key('ctrl-alt-f9');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F10', handler: function() {
+ UI.pve_send_key('ctrl-alt-f10');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F11', handler: function() {
+ UI.pve_send_key('ctrl-alt-f11');
+ }
+ },
+ {
+ text: 'Ctrl-Alt-F12', handler: function() {
+ UI.pve_send_key('ctrl-alt-f12');
+ }
+ }
+ ];
+
+ buttonlist.forEach(function(btn) {
+ var el = document.createElement('input');
+ el.setAttribute('type', 'button');
+ el.setAttribute('value', btn.text);
+ el.onclick = function(handler) {
+ return function() {
+ if (UI.sendKeysVisible === true) {
+ UI.togglePVESendKeysPanel();
+ }
+
+ handler.call(this);
+ };
+ }(btn.handler);
+ el.style.display = "block";
+ el.style.width = "100%";
+ el.style.minWidth = "150px";
+ skpanel.appendChild(el);
+ });
+