Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Keyboard navigation #23

Open
toxinu opened this Issue Mar 17, 2013 · 12 comments

Comments

Projects
None yet
5 participants
Owner

toxinu commented Mar 17, 2013

No description provided.

rb2k commented Mar 17, 2013

I'd love to see the vim-style j/k key navigation work (as in e.g. google reader)

From http://support.google.com/reader/answer/69973?hl=en

Keyboard shortcuts

Keyboard shortcuts save you time by helping you quickly explore your reading list without moving your hand back and forth between your keyboard and mouse. Here are the keyboard shortcuts for Google Reader:
Navigation      
j/k item down/up    selects the next/previous item in the list
space/shift-space   page down/up    moves the page down/up
n/p scan down/up    in list view, selects the next item without opening it
shift-n/p   navigation down/up  selects the next/previous subscription or folder in the navigation
shift-x navigation expand/collapse  expands or collapses a folder selected in the navigation
o   open/close item in list view, expands or collapses the selected item
enter   open/close item in list view, expands or collapses the selected item
shift-o navigation open subscription    opens the subscription or folder currently selected in the navigation
-   zoom out    decreases the font size of the current item
=   zoom in increases the font size of the current item
Acting on Items     
s   toggle star stars or un-stars the selected item
l   toggle like likes or un-likes the selected item
shift-s toggle share    shares or un-shares the selected item
shift-d share with note shares the selected item with a note
v   view original   opens the original source for this article in a new window
t   tag an item opens the tagging field for the selected item
m   mark as read/unread switches the read status of the selected item
shift-a mark all as read    marks all items in the current view as read
e   email item  opens the email form to send an item to a friend
Jumping     
g then h    go to home  goes to the Google Reader homepage
g then a    go to all items goes to the "All items" view
g then s    go to starred items goes to the "Starred items" view
g then shift-s  go to shared items  goes to the "Your shared items" view
g then u    go to subscription  allows you to navigate to a subscription by entering the subscription name
g then t    go to tag   allows you to navigate to a tag by entering the tag name
g then f    go to friend    allows you to navigate to a friend's shared items by entering the friend's name
g then shift-f  go to all friends' shared items shows all of your friends' shared items
g then shift-t  go to trends    goes to the "Trends" view
g then d    go to feed discovery    shows the recommendations page, or the browse page if there are no recommendations
Application     
r   refresh refreshes the unread counts in the navigation
f   toggle full screen mode displays reading list in full screen mode
u   toggle subscription list display    hides or shows the list of subscriptions
1   expanded view   displays the subscription as expanded items
2   list view   displays the subscription as a list of headlines
/   search  moves your cursor to the search box
a   add a subscription  opens the "Add a subscription" box in the sidebar
?   keyboard shortcuts help displays a quick guide to all of Reader's shortcuts
Owner

toxinu commented Mar 18, 2013

Yes it's a great feature.
I will take a look at it if I have time or someone else.

@toxinu toxinu pushed a commit that referenced this issue Mar 27, 2013

socketubs add some keyboard shortcuts (#23) 70c438a
Owner

toxinu commented Mar 27, 2013

g then h: Go home view
r: Refresh feeds list
a: Add feed popup
m: Toggle read/unread state of selected story
o: Toggle open/close selected story
k: Select and open next story
j: Select and open previous story

@danielmagnussons danielmagnussons added a commit to danielmagnussons/leselys that referenced this issue Mar 27, 2013

@danielmagnussons socketubs + danielmagnussons add some keyboard shortcuts (#23) ab03a06

small issue with current master, j and k should be reversed.
j: go next, k: go previous

Owner

toxinu commented Apr 3, 2013

Thanks fixed in current master! 😄

Owner

toxinu commented May 10, 2013

I keep in mind to introduce more keyboard shortcut.
Do not hesitate to ask me new one.

Hi, I'm loving your app so far. Is it posible to add the keyboard shortcut 'b' to be similar to the key 'v' except it would open the feed link in a background tab. Google reader doesn't have this but other readers do. Cheers and thank you

@juantascon Adding another shortcut is easy enough. The tricky part seems to be opening a background tab in a cross-browser way. So far I found something that works in Chrome and Safari, but does nothing in Firefox:

Mousetrap.unbind('b');
Mousetrap.bind('b',
               function() {
                 var e = document.createEvent("MouseEvents");
                 e.initMouseEvent(
                  "click", true, true, window,
                   0, 0, 0, 0, 0,
                   true, false, false, true, 0, null);
                 storyLink.dispatchEvent(e); });

I found a solution in stackoverflow, maybe you could give it a try,
would do it myself but I dont have the required binaries to run
minify.sh:

var tab=window.open("");
tab.document.write(""+document.getElementsByTagName("html")
[0].innerHTML+"");

tab.document.close();

window.location.href=url;

On Thu, Jun 20, 2013 at 6:28 PM, Michael Blakeley
notifications@github.com wrote:

@juantascon Adding another shortcut is easy enough. The tricky part seems to
be opening a background tab in a cross-browser way. So far I found something
that works in Chrome and Safari, but does nothing in Firefox:

Mousetrap.unbind('b');
Mousetrap.bind('b',
function() {
var e = document.createEvent("MouseEvents");
e.initMouseEvent(
"click", true, true, window,
0, 0, 0, 0, 0,
true, false, false, true, 0, null);
storyLink.dispatchEvent(e); });


Reply to this email directly or view it on GitHub.

Owner

toxinu commented Jun 21, 2013

If you run leselys with --debug, it will use non minified js. (but still use minified css).

For now I do a window.open(link, '_blank') and it works in firefox and chrome (maybe other) but I think the way to open tabs in background is browser settings and can't be decide with javascript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment