diff --git a/TODO b/TODO index 21d601d3..abb6f58c 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ This is transient file that lists functionalities to be implemented before first major release. - autocomplete: don't show items that are already used in tag list (unsure) -- posts/upload: better hotkeys for going to next post - posts/upload: ability to paste many urls (unsure) - posts/listing: add buttons for toggling safety - posts: fix empty edit snapshots when changing only thumbnail content diff --git a/public_html/js/Keyboard.js b/public_html/js/Keyboard.js index 0c90839b..052bec95 100644 --- a/public_html/js/Keyboard.js +++ b/public_html/js/Keyboard.js @@ -2,6 +2,14 @@ var App = App || {}; App.Keyboard = function(mousetrap) { + var oldStopCallback = mousetrap.stopCallback; + mousetrap.stopCallback = function(e, element, combo, sequence) { + if (combo.indexOf('ctrl') !== -1) { + return false; + } + return oldStopCallback.apply(mousetrap, arguments); + } + function keyup(key, callback) { unbind(key); mousetrap.bind(key, callback, 'keyup'); diff --git a/public_html/js/Presenters/PostUploadPresenter.js b/public_html/js/Presenters/PostUploadPresenter.js index a7cea60a..5fd4df39 100644 --- a/public_html/js/Presenters/PostUploadPresenter.js +++ b/public_html/js/Presenters/PostUploadPresenter.js @@ -54,8 +54,9 @@ App.Presenters.PostUploadPresenter = function( $el.find('.url-handler button').click(urlHandlerButtonClicked); $el.find('thead th.checkbox').click(postTableSelectAllCheckboxClicked); - keyboard.keyup('a', selectPrevPostTableRow); - keyboard.keyup('d', selectNextPostTableRow); + keyboard.keydown('ctrl+up', selectPrevPostTableRow); + keyboard.keydown('ctrl+down', selectNextPostTableRow); + keyboard.keyup('q', tagInput.focus); $el.find('.remove').click(removeButtonClicked); $el.find('.move-up').click(moveUpButtonClicked);