mirror of https://github.com/keeweb/keeweb.git
fix special keys auto-type in linux
This commit is contained in:
parent
51e97d69c0
commit
d0325e48e3
|
@ -37,11 +37,13 @@ AutoTypeEmitter.prototype.setMod = function(mod, enabled) {
|
|||
};
|
||||
|
||||
AutoTypeEmitter.prototype.text = function(text) {
|
||||
Object.keys(this.mod).forEach(function (mod) {
|
||||
this.pendingScript.push('keydown ' + ModMap[mod]);
|
||||
});
|
||||
this.pendingScript.push('type ' + text);
|
||||
var that = this;
|
||||
Object.keys(this.mod).forEach(function (mod) {
|
||||
that.pendingScript.push('keydown ' + ModMap[mod]);
|
||||
});
|
||||
that.pendingScript.push('type ' + text.split('').map(function(char) {
|
||||
return char === '\'' ? '"\'"' : '\'' + char + '\'';
|
||||
}).join(''));
|
||||
this.waitComplete(function(err) {
|
||||
if (err) { return that.callback(err); }
|
||||
Object.keys(that.mod).forEach(function (mod) {
|
||||
|
@ -70,6 +72,11 @@ AutoTypeEmitter.prototype.copyPaste = function(text) {
|
|||
this.waitComplete();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.wait = function(time) {
|
||||
this.pendingScript.push('sleep ' + (time / 1000));
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.waitComplete = function(callback) {
|
||||
if (this.pendingScript.length) {
|
||||
var script = this.pendingScript.join(' ');
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
Release notes
|
||||
-------------
|
||||
|
||||
##### v1.2.2 (2016-07-14)
|
||||
`-` fix special keys auto-type in linux
|
||||
|
||||
##### v1.2.1 (2016-07-12)
|
||||
`-` fix storage auth popups on desktop
|
||||
|
||||
|
|
Loading…
Reference in New Issue