X-Git-Url: https://git-public.kairo.at/?p=lantea.git;a=blobdiff_plain;f=js%2Fui.js;h=b9c0519d0fe2740f7b6cfc4c970967997f3c407a;hp=2ff241f7a231aaf27b8b010dd3870a1ab620d77e;hb=afa031872dc73ded1c8f1bed53600439bb499b85;hpb=68afcd960381dcd51be0161c69cad4161313c6d0 diff --git a/js/ui.js b/js/ui.js index 2ff241f..b9c0519 100644 --- a/js/ui.js +++ b/js/ui.js @@ -36,6 +36,8 @@ window.onload = function() { areas[i].addEventListener("touchleave", uiEvHandler, false); } + document.getElementById("body").addEventListener("keydown", uiEvHandler, false); + if (navigator.platform.length == "") { // For Firefox OS, don't display the "save" button. // Do this by setting the debugHide class for testing in debug mode. @@ -72,7 +74,7 @@ window.onresize = function() { function initDB() { // Open DB. - var request = window.indexedDB.open("MainDB", 2); + var request = window.indexedDB.open("MainDB-lantea", 2); request.onerror = function(event) { // Errors can be handled here. Error codes explain in: // https://developer.mozilla.org/en/IndexedDB/IDBDatabaseException#Constants @@ -188,6 +190,7 @@ var uiEvHandler = { case "touchmove": case "mouseup": case "touchend": + case "keydown": showUI(); break; }