diff options
author | Amos Benari <abenari@redhat.com> | 2013-03-18 10:40:49 -0400 |
---|---|---|
committer | Jeremy White <jwhite@codeweavers.com> | 2013-03-19 08:57:51 -0500 |
commit | 828d975b2db7231d5560f4ca3cf0487ce5c80d4b (patch) | |
tree | 99327ceadee2c06314f740cab7db4115fab1921c | |
parent | 20fcfb5f5707c7efa65e5a317179afd46f675027 (diff) |
added sendCtrlAltDel method.
-rw-r--r-- | inputs.js | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -175,6 +175,26 @@ function handle_keyup(e) e.preventDefault(); } +function sendCtrlAltDel() +{ + if (sc && sc.inputs && sc.inputs.state === "ready"){ + var key = new SpiceMsgcKeyDown(); + var msg = new SpiceMiniData(); + + update_modifier(true, KEY_LCtrl, sc); + update_modifier(true, KEY_Alt, sc); + + key.code = KEY_KP_Decimal; + msg.build_msg(SPICE_MSGC_INPUTS_KEY_DOWN, key); + sc.inputs.send_msg(msg); + msg.build_msg(SPICE_MSGC_INPUTS_KEY_UP, key); + sc.inputs.send_msg(msg); + + if(Ctrl_state == false) update_modifier(false, KEY_LCtrl, sc); + if(Alt_state == false) update_modifier(false, KEY_Alt, sc); + } +} + function update_modifier(state, code, sc) { var msg = new SpiceMiniData(); |