diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index 26f8fb941ff..32b824fc25e 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -474,6 +474,10 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { DiscourseURL.routeTo(this.get('model.lastPostUrl'), { skipIfOnScreen: false }); }, + jumpUnread() { + this._jumpToPostId(this.get('model.last_read_post_id')); + }, + selectAll() { const posts = this.get('model.postStream.posts'); const selectedPosts = this.get('selectedPosts'); diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 index d393127a732..15372b27ad6 100644 --- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 +++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 @@ -48,6 +48,7 @@ const bindings = { 'shift+p': {handler: 'pinUnpinTopic'}, 'shift+r': {handler: 'replyToTopic'}, 'shift+s': {click: '#topic-footer-buttons button.share', anonymous: true}, // share topic + 'shift+u': {handler: 'goToUnreadPost'}, 'shift+z shift+z': {handler: 'logout'}, 't': {postAction: 'replyAsNewTopic'}, 'u': {handler: 'goBack', anonymous: true}, @@ -117,6 +118,10 @@ export default { this._jumpTo('jumpBottom'); }, + goToUnreadPost() { + this._jumpTo('jumpUnread'); + }, + _jumpTo(direction) { if ($('.container.posts').length) { this.container.lookup('controller:topic').send(direction);