1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 03:12:21 -05:00

draft for keyboard shortcuts, thanks to @fguillot (he made this for miniflux)

This commit is contained in:
Nicolas Lœuillet 2014-05-30 18:12:30 +02:00
parent 934a0c6848
commit d6b308d36a
2 changed files with 8 additions and 11 deletions

View File

@ -4,7 +4,7 @@ wallabag.App = (function() {
return { return {
Run: function() { Run: function() {
// wallabag.Event.ListenKeyboardEvents(); wallabag.Event.ListenKeyboardEvents();
wallabag.Event.ListenMouseEvents(); wallabag.Event.ListenMouseEvents();
}, },
} }

View File

@ -38,7 +38,7 @@ wallabag.Event = (function() {
} }
} }
}; };
}/*, },
ListenKeyboardEvents: function() { ListenKeyboardEvents: function() {
document.onkeypress = function(e) { document.onkeypress = function(e) {
@ -51,23 +51,19 @@ wallabag.Event = (function() {
case undefined: case undefined:
break; break;
case 117: // u case 117: // u
window.location.href = "?action=unread"; window.location.href = "/";
queue = []; queue = [];
break; break;
case 98: // b case 98: // b
window.location.href = "?action=bookmarks"; window.location.href = "/bookmarks";
queue = []; queue = [];
break; break;
case 104: // h case 104: // h
window.location.href = "?action=history"; window.location.href = "/archive";
queue = []; queue = [];
break; break;
case 115: // s case 115: // s
window.location.href = "?action=feeds"; window.location.href = "/add";
queue = [];
break;
case 112: // p
window.location.href = "?action=config";
queue = []; queue = [];
break; break;
default: default:
@ -113,9 +109,10 @@ wallabag.Event = (function() {
wallabag.Nav.ShowHelp(); wallabag.Nav.ShowHelp();
break; break;
} }
} }
} }
}*/ }
}; };
})(); })();