electron-virtual-keyboard
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "electron-virtual-keyboard", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "An electron based virtual keyboard. Uses electron's sendInputEvent api to implement a simple customizable soft keyboard.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -241,2 +241,3 @@ (function (factory) { | ||
} | ||
this._onMouseDown = false; | ||
@@ -280,5 +281,14 @@ this.init(); | ||
.focus(function(e) { | ||
if (base._onMouseDown) { | ||
return; | ||
} | ||
base.inputFocus(e.target); | ||
}) | ||
.blur(function(e) { | ||
if (base._onMouseDown ) { | ||
e.stopImmediatePropagation(); | ||
e.preventDefault(); | ||
return false; | ||
} | ||
base.inputUnFocus(e.target); | ||
@@ -290,2 +300,3 @@ }); | ||
.mousedown(function(e) { | ||
base._onMouseDown = true; | ||
base.simKeyDown(e.target); | ||
@@ -295,2 +306,3 @@ }); | ||
.mouseup(function (e) { | ||
base._onMouseDown = false; | ||
base.simKeyUp(e.target); | ||
@@ -446,9 +458,9 @@ }); | ||
// if we pressed on key setup interval to mimic repeated key presses | ||
// if we pressed on key, setup interval to mimic repeated key presses | ||
if ($(el).data('kb-key')) { | ||
this.keydown = delayThenRepeat(() => { | ||
$(this.currentElement).focus(); | ||
//$(this.currentElement).focus(); | ||
var handler = $(el).data('kb-key-handler'); | ||
var key = $(el).data('kb-key'); | ||
if (handler ) { | ||
if (handler) { | ||
key = handler(this, $(el)); | ||
@@ -455,0 +467,0 @@ } |
@@ -25,3 +25,2 @@ const { ipcMain } = require('electron') | ||
config(e, key, value) { | ||
console.log("config: ", arguments); | ||
if ( key == 'keyPressWait' ) { | ||
@@ -46,3 +45,2 @@ this.keyPressWait = parseInt(value); | ||
flushBuffer() { | ||
console.log(this.keyBuffer); | ||
var ch = this.keyBuffer.shift() | ||
@@ -49,0 +47,0 @@ if ( ch === undefined ) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
517757
895