mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
23 lines
463 B
JavaScript
23 lines
463 B
JavaScript
function KeyEvent()
|
|
{
|
|
}
|
|
|
|
KeyEvent.prototype.menuTrigger = function()
|
|
{
|
|
var e = document.createEvent('Events');
|
|
e.initEvent('menuKeyDown');
|
|
document.dispatchEvent(e);
|
|
}
|
|
|
|
KeyEvent.prototype.searchTrigger= function()
|
|
{
|
|
var e = document.createEvent('Events');
|
|
e.initEvent('searchKeyDown');
|
|
document.dispatchEvent(e);
|
|
}
|
|
|
|
if (document.keyEvent == null || typeof document.keyEvent == 'undefined')
|
|
{
|
|
window.keyEvent = document.keyEvent = new KeyEvent();
|
|
}
|