From e5e827e585941b2c1ab74caeea98b487747bf930 Mon Sep 17 00:00:00 2001 From: Athou Date: Sun, 21 Apr 2013 08:07:06 +0200 Subject: [PATCH] more keyboard shortcuts goodness --- src/main/webapp/js/controllers.js | 29 +++++++++-- src/main/webapp/templates/feeds.help.html | 61 +++++++++++++++++------ 2 files changed, 71 insertions(+), 19 deletions(-) diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index 599055a6..1b1c84bd 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -378,8 +378,8 @@ module.controller('FeedListCtrl', function($scope, $stateParams, $http, $route, $scope.mark(entry, true); } }; - - $scope.noop = function(event){ + + $scope.noop = function(event) { if (!event.ctrlKey && event.which != 2) { event.preventDefault(); event.stopPropagation(); @@ -438,7 +438,6 @@ module.controller('FeedListCtrl', function($scope, $stateParams, $http, $route, openNextEntry(e); }); }); - Mousetrap.bind('shift+space', function(e) { $scope.$apply(function() { openPreviousEntry(e); @@ -449,6 +448,30 @@ module.controller('FeedListCtrl', function($scope, $stateParams, $http, $route, openPreviousEntry(e); }); }); + Mousetrap.bind('o', function(e) { + $scope.$apply(function() { + if ($scope.current) { + $scope.entryClicked($scope.current, e); + } + }); + }); + Mousetrap.bind('enter', function(e) { + $scope.$apply(function() { + if ($scope.current) { + $scope.entryClicked($scope.current, e); + } + }); + }); + Mousetrap.bind('r', function(e) { + $scope.$apply(function() { + $scope.$emit('emitReload'); + }); + }); + Mousetrap.bind('v', function(e) { + if ($scope.current) { + window.open($scope.current.url); + } + }); $scope.$on('markAll', function(event, args) { var service = $scope.selectedType == 'feed' ? FeedService diff --git a/src/main/webapp/templates/feeds.help.html b/src/main/webapp/templates/feeds.help.html index b2a783df..a7f94d98 100644 --- a/src/main/webapp/templates/feeds.help.html +++ b/src/main/webapp/templates/feeds.help.html @@ -1,19 +1,48 @@
- -

CommaFeed

-

- CommaFeed is an open-source project. Sources are hosted on GitHub. -

-

- If you encounter an issue, please report it on the issues page of the GitHub project. -

- -

REST API

-

- CommaFeed is built on top of JAX-RS and AngularJS. As such, a REST API is available. -

-

- The documentation about the API is available here. -

+ +
+
+

CommaFeed

+

+ CommaFeed is an open-source project. Sources are hosted on GitHub. +

+

+ If you encounter an issue, please report it on the issues page of the GitHub project. +

+ +

REST API

+

+ CommaFeed is built on top of JAX-RS and AngularJS. As such, a REST API is available. +

+

+ The documentation about the API is available here. +

+
+
+
+
k, space
+
open next entry
+ +
j, shift+space
+
open previous entry
+ +
o, enter
+
open/close current entry
+ +
v
+
open current entry in a new window
+ +
mouse middleclick
+
open entry in new tab and mark as read
+
+
+
\ No newline at end of file