alt-tab button, #29

This commit is contained in:
copy 2015-01-05 19:21:02 +01:00
parent b468f10382
commit 4443f98737
3 changed files with 14 additions and 0 deletions

View file

@ -126,6 +126,7 @@
<input type="button" value="Reset" id="reset">
<input type="button" value="Exit" id="exit">
<input type="button" value="Send Ctrl-Alt-Del" id="ctrlaltdel">
<input type="button" value="Send Alt-Tab" id="alttab">
<input type="button" value="Get floppy image" id="get_fda_image">
<input type="button" value="Get floppy image" id="get_fdb_image">
<input type="button" value="Get HDA image" id="get_hda_image">

View file

@ -105,6 +105,7 @@
<input type="button" value="Reset" id="reset">
<input type="button" value="Exit" id="exit">
<input type="button" value="Send Ctrl-Alt-Del" id="ctrlaltdel">
<input type="button" value="Send Alt-Tab" id="alttab">
<input type="button" value="Get floppy image" id="get_fda_image">
<input type="button" value="Get floppy image" id="get_fdb_image">
<input type="button" value="Get HDA image" id="get_hda_image">

View file

@ -813,6 +813,18 @@
$("ctrlaltdel").blur();
};
$("alttab").onclick = function()
{
var ps2 = emulator.cpu.devices.ps2;
ps2.kbd_send_code(0x38); // alt
ps2.kbd_send_code(0x0F); // tab
ps2.kbd_send_code(0x38 | 0x80);
ps2.kbd_send_code(0x0F | 0x80);
$("alttab").blur();
};
$("scale").onchange = function()
{
var n = parseFloat(this.value);