Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of having shortcuts for some functionalities #25

Open
p16i opened this issue Feb 1, 2022 · 5 comments
Open

Possibility of having shortcuts for some functionalities #25

p16i opened this issue Feb 1, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@p16i
Copy link

p16i commented Feb 1, 2022

Hi,

Thank you for developing the website. I really like it.

I wonder whether we could also have shortcuts from some functionalities, especially when the toolbar is at the bottom below.
For example, having shortcuts for Feeling Lucky? and Report an Issue could fasten the process of testing and reporting issues.

Below is a JS snippet that I've written to add a shortcut for the Feeling Lucky? feature

// Shortcut `shift+r` for `ar5iv.org`'s `Feeling lucky?` functionality 
document.onkeydown = function(ev) {
    ev = window.event||ev;
    if (ev.keyCode == 82 && ev.shiftKey) {
      window.location  = "/feeling_lucky"
    }
}
@dginev dginev added the enhancement New feature or request label Feb 1, 2022
@dginev
Copy link
Owner

dginev commented Feb 1, 2022

Well, the problem is predictability - can we find what the least surprising keys would be for "Feeling lucky?" and "Report"?

At first I was even thinking of binding the left and right arrow to go to the previous/next article - but most arXiv authors wouldn't expect that, and they may instead want to horizontally scroll through e.g. a very wide table. So I dropped all thoughts of shortcuts.

Maybe something fun and exotic also works for feeling lucky - ctrl + ? where the question mark stands for "take me anywhere"

Something to think about... Thanks for joining in!

@p16i
Copy link
Author

p16i commented Feb 4, 2022

Well, the problem is predictability - can we find what the least surprising keys would be for "Feeling lucky?" and "Report"?

imho, it is probably quite challenging to find a common set of shotcuts; however, given the site is quite new, we might just pick a set of these shotcuts and educate the user somehow, e.g., using brackets
image.

For example, if one does leading-key + F, one activates the Feeling Lucky? functionality. The tricky part is which leading key to be used. Generally, I would try to avoid ctrl and alt because they are commonly used for the functionalities of OS and browsers. What do you think?

@dginev
Copy link
Owner

dginev commented Feb 4, 2022

Right, well, I am still looking at what other platforms have done, which is what I'd like to stay close to if I'm to claim I tried to be "predictable".

For the previous/next buttons, I remembered that the youtube shortcuts bind Shift+P and Shift+N. This kind of convinces me using Shift is fine.

I still like the idea of Shift+? for the random "feeling lucky" navigation.

The conversion report really shouldn't need a shortcut, but maybe Shift+R for reporting an issue is sensible, as is Shift+X to go to the main arXiv page.

Also a Shift+C may be nice to toggle the color theme, would get quite handy if we get more than two -- then one can iterate through them.

I wouldn't mark that in the letters of the footer buttons, since it gets a bit harsh on the eyes. It may be better to pop-up a little modal legend with all possible shortcuts when shift is pressed and held?

@p16i
Copy link
Author

p16i commented Feb 4, 2022

I wouldn't mark that in the letters of the footer buttons, since it gets a bit harsh on the eyes. It may be better to pop-up a little modal legend with all possible shortcuts when shift is pressed and held?

I agree. I like the idea of the modal. Github has it, and you can use ? to activate the panel.

@dginev
Copy link
Owner

dginev commented Feb 4, 2022

Github has it, and you can use ? to activate the panel.

Ha! It looks familiar, so I must have seen it before, but had totally forgotten github has such a handy modal. Yes, basically exactly that 🚀

@dginev dginev added this to the Article Viewer (alpha) milestone Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants