Fixed client PPT key
This commit is contained in:
parent
5842854c13
commit
bf9a87d004
1 changed files with 3 additions and 3 deletions
|
@ -14,8 +14,8 @@ namespace Modals {
|
||||||
const button_cancel = modal.htmlTag.find(".button-cancel");
|
const button_cancel = modal.htmlTag.find(".button-cancel");
|
||||||
|
|
||||||
let current_key_age: number;
|
let current_key_age: number;
|
||||||
let last_key;
|
let last_key: ppt.KeyEvent;
|
||||||
let current_key;
|
let current_key: ppt.KeyEvent;
|
||||||
const listener = (event: ppt.KeyEvent) => {
|
const listener = (event: ppt.KeyEvent) => {
|
||||||
if(event.type === ppt.EventType.KEY_PRESS) {
|
if(event.type === ppt.EventType.KEY_PRESS) {
|
||||||
//console.log(tr("Key select got key press for %o"), event);
|
//console.log(tr("Key select got key press for %o"), event);
|
||||||
|
@ -32,7 +32,7 @@ namespace Modals {
|
||||||
button_save.on('click', () => {
|
button_save.on('click', () => {
|
||||||
if(!app.is_web()) {
|
if(!app.is_web()) {
|
||||||
/* Because pressing the close button is also a mouse action */
|
/* Because pressing the close button is also a mouse action */
|
||||||
if(current_key_age + 1000 > Date.now() && current_key == "MOUSE2")
|
if(current_key_age + 1000 > Date.now() && current_key.key_code == "MOUSE2")
|
||||||
current_key = last_key;
|
current_key = last_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue