[desktop] keydown event to app when hints is showed

This commit is contained in:
Maxim Kadushkin 2022-05-24 20:52:27 +03:00
parent 1f15df4fee
commit b7c3927f94

View file

@ -195,6 +195,13 @@ define([
native.execCommand('althints:show', JSON.stringify(visible && !(level > 0))); native.execCommand('althints:show', JSON.stringify(visible && !(level > 0)));
} }
var _onKeyDown = function (e) {
if ( Common.UI.HintManager.isHintVisible() ) {
native.execCommand('althints:keydown', JSON.stringify({code:e.keyCode}));
console.log('hint keydown', e.keyCode);
}
}
return { return {
init: function (opts) { init: function (opts) {
_.extend(config, opts); _.extend(config, opts);
@ -287,6 +294,8 @@ define([
}, },
}, },
}, {id: 'desktop'}); }, {id: 'desktop'});
$(document).on('keydown', _onKeyDown.bind(this));
} }
}, },
process: function (opts) { process: function (opts) {