Skip to content

Commit

Permalink
ctrl+enter was not working, also fixed insert mode
Browse files Browse the repository at this point in the history
  • Loading branch information
stanfieldr committed Dec 17, 2016
1 parent f23ef48 commit 5e8f5b1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/skype.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@
setTimeout(function() {
$('#chatInputAreaWithQuotes').focus();
$('#chatInputAreaWithQuotes').val(tmp + "\n");
$('#chatInputAreaWithQuotes').trigger('blur');
$('#chatInputAreaWithQuotes').blur();
$('#chatInputAreaWithQuotes').focus();
}, 0);
}

function interceptKeys(event) {
if (settings.AltSendKeys && event.key === "Enter" && !event.ctrlKey && event.target.id === "chatInputAreaWithQuotes") {
if (settings.AltSendKeys && event.key === "Enter" && event.target.id === "chatInputAreaWithQuotes") {
if (event.ctrlKey) {
$('.send-button').click();
} else {
alternativeEnter();
}
}

if (_mode === 'normal' && event.key === "i" && ['textbox', 'input'].indexOf(event.target.type) >= 0) {
if (_mode === 'normal' && event.key === "i" && ['textarea', 'input'].indexOf(event.target.type) === -1) {
updateMode('insert');
event.preventDefault();
return;
Expand All @@ -48,8 +52,6 @@
event.stopImmediatePropagation();
return;
}


}

function updateMode(mode) {
Expand Down

0 comments on commit 5e8f5b1

Please sign in to comment.