Added manual key send to the remote keyboard

This commit is contained in:
lukeIam committed 2014-11-12 21:59:35 +01:00
1 parent b036aa5d69
commit 0cdb537424
4 files changed
+32 -6

No files matched your search

+5
View File
@@ -319,8 +319,13 @@
</div> </div>
</div> </div>
<div> <div>
<fieldset data-role="controlgroup" data-type="horizontal">
<input type="checkbox" name="keyboardAutoSend" id="keyboardAutoSend" />
<label data-i18n="keyboardAutoSend" for="keyboardAutoSend"></label>
</fieldset>
<label for="keyboardButtonKeys" data-i18n="keyboardButtonKeys"></label> <label for="keyboardButtonKeys" data-i18n="keyboardButtonKeys"></label>
<input type="text" id="keyboardButtonKeys" data-mini="true"> <input type="text" id="keyboardButtonKeys" data-mini="true">
<a data-role="button" id="keyboardButtonSend" data-i18n="keyboardButtonSend"></a>
</div> </div>
</div> </div>
<!-- /content --> <!-- /content -->
+21 -4
View File
@@ -641,7 +641,6 @@
var KeyboardPageHandler = function () { var KeyboardPageHandler = function () {
var init = function () { var init = function () {
initKeyboardPageHandler(); initKeyboardPageHandler();
}; };
@@ -694,15 +693,34 @@
}); });
}); });
$("#keyboardAutoSend").change(function () {
if ($('#keyboardAutoSend').is(':checked')) {
$('#keyboardButtonSend').hide();
} else {
$('#keyboardButtonSend').show();
}
});
$('#keyboardButtonSend').click(function () {
sendKeyboardText();
});
$('#keyboardButtonKeys').keyup(function (e) { $('#keyboardButtonKeys').keyup(function (e) {
if (!$('#keyboardAutoSend').is(':checked') && e.keyCode != 13) {
return;
}
sendKeyboardText();
});
function sendKeyboardText() {
var text = $('#keyboardButtonKeys')[0].value; var text = $('#keyboardButtonKeys')[0].value;
$('#keyboardButtonKeys')[0].value = "";
if (text.length <= 0) { if (text.length <= 0) {
return; return;
} }
$('#keyboardButtonKeys')[0].value = "";
$('#keyboardButtonKeys').first().focus();
/* if ($('#keyboardButtonFunct').is(':checked')) { /* if ($('#keyboardButtonFunct').is(':checked')) {
$('#keyboardButtonKeys')[0].value = text.splice(1) + $('#keyboardButtonKeys')[0].value; $('#keyboardButtonKeys')[0].value = text.splice(1) + $('#keyboardButtonKeys')[0].value;
@@ -726,8 +744,7 @@
}).fail(function () { }).fail(function () {
$('#keyboardButtonKeys')[0].value = text + $('#keyboardButtonKeys')[0].value; $('#keyboardButtonKeys')[0].value = text + $('#keyboardButtonKeys')[0].value;
}); });
}
});
}; };
init(); init();
+3 -1
View File
@@ -80,5 +80,7 @@
"keyboardButtonShift": "Umschalt", "keyboardButtonShift": "Umschalt",
"keyboardButtonAlt": "Alt", "keyboardButtonAlt": "Alt",
"keyboardButtonCtrl": "Steuerung", "keyboardButtonCtrl": "Steuerung",
"keyboardButtonBackspace": "Rücktaste" "keyboardButtonBackspace": "Rücktaste",
"keyboardAutoSend": "Tasten autom. senden",
"keyboardButtonSend": "Senden"
} }
+3 -1
View File
@@ -80,5 +80,7 @@
"keyboardButtonShift": "Shift", "keyboardButtonShift": "Shift",
"keyboardButtonAlt": "Alt", "keyboardButtonAlt": "Alt",
"keyboardButtonCtrl": "Control", "keyboardButtonCtrl": "Control",
"keyboardButtonBackspace": "Backspace" "keyboardButtonBackspace": "Backspace",
"keyboardAutoSend": "Auto send keys",
"keyboardButtonSend": "Send"
} }