summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/app/directives/itemshortcuts.coffee8
-rw-r--r--js/public/app.js4
2 files changed, 6 insertions, 6 deletions
diff --git a/js/app/directives/itemshortcuts.coffee b/js/app/directives/itemshortcuts.coffee
index c249984eb..f80045d42 100644
--- a/js/app/directives/itemshortcuts.coffee
+++ b/js/app/directives/itemshortcuts.coffee
@@ -70,12 +70,12 @@ angular.module('News').directive 'itemShortcuts', ['$window', ($window) ->
focused.is('button'))
scrollArea = elm
- # j or right
- if e.keyCode == 74 or e.keyCode == 39
+ # j or right or n
+ if e.keyCode == 74 or e.keyCode == 39 or e.keyCode == 78
jumpToNextItem(scrollArea)
- # k or left
- else if e.keyCode == 75 or e.keyCode == 37
+ # k or left or p
+ else if e.keyCode == 75 or e.keyCode == 37 or e.keyCode == 80
jumpToPreviousItem(scrollArea)
diff --git a/js/public/app.js b/js/public/app.js
index f0c783ba1..e38b6670d 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -201,9 +201,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
focused = $(':focus');
if (!(focused.is('input') || focused.is('select') || focused.is('textarea') || focused.is('checkbox') || focused.is('button'))) {
scrollArea = elm;
- if (e.keyCode === 74 || e.keyCode === 39) {
+ if (e.keyCode === 74 || e.keyCode === 39 || e.keyCode === 78) {
return jumpToNextItem(scrollArea);
- } else if (e.keyCode === 75 || e.keyCode === 37) {
+ } else if (e.keyCode === 75 || e.keyCode === 37 || e.keyCode === 80) {
return jumpToPreviousItem(scrollArea);
}
}