]>
git.proxmox.com Git - pve-manager.git/blob - www/manager/qemu/SendKeyMenu.js
1 Ext
.define('PVE.qemu.SendKeyMenu', {
2 extend
: 'Ext.button.Button',
3 alias
: ['widget.pveQemuSendKeyMenu'],
5 initComponent : function() {
9 throw "no node name specified";
13 throw "no VM ID specified";
16 var sendKey = function(key
) {
17 PVE
.Utils
.API2Request({
19 url
: '/nodes/' + me
.nodename
+ '/qemu/' + me
.vmid
+ "/sendkey",
22 failure: function(response
, opts
) {
23 Ext
.Msg
.alert('Error', response
.htmlStatus
);
30 menu
: new Ext
.menu
.Menu({
34 text
: 'Tab', handler: function() {
39 text
: 'Ctrl-Alt-Delete', handler: function() {
40 sendKey('ctrl-alt-delete');
44 text
: 'Ctrl-Alt-Backspace', handler: function() {
45 sendKey('ctrl-alt-backspace');
49 text
: 'Ctrl-Alt-F1', handler: function() {
50 sendKey('ctrl-alt-f1');
54 text
: 'Ctrl-Alt-F2', handler: function() {
55 sendKey('ctrl-alt-f2');
59 text
: 'Ctrl-Alt-F3', handler: function() {
60 sendKey('ctrl-alt-f3');
64 text
: 'Ctrl-Alt-F4', handler: function() {
65 sendKey('ctrl-alt-f4');
69 text
: 'Ctrl-Alt-F5', handler: function() {
70 sendKey('ctrl-alt-f5');
74 text
: 'Ctrl-Alt-F6', handler: function() {
75 sendKey('ctrl-alt-f6');
79 text
: 'Ctrl-Alt-F7', handler: function() {
80 sendKey('ctrl-alt-f7');
84 text
: 'Ctrl-Alt-F8', handler: function() {
85 sendKey('ctrl-alt-f8');
89 text
: 'Ctrl-Alt-F9', handler: function() {
90 sendKey('ctrl-alt-f9');
94 text
: 'Ctrl-Alt-F10', handler: function() {
95 sendKey('ctrl-alt-f10');
99 text
: 'Ctrl-Alt-F11', handler: function() {
100 sendKey('ctrl-alt-f11');
104 text
: 'Ctrl-Alt-F12', handler: function() {
105 sendKey('ctrl-alt-f12');