Gitea: Feature Request: Support keyboard hotkeys in web interface

Created on 22 Jan 2019  Â·  11Comments  Â·  Source: go-gitea/gitea

Within :cough: some web based Git browsing systems one can use hotkeys to simplify navigation and working with repositories.

In GitHub for example typing "?" from any page (where the cursor is not in a text input/text area window) displays a context sensitive list of shortcuts, with a link to a complete list of keyboard shortcuts/hotkeys.

e.g.:

screenshot from 2019-01-21 18-12-39

For advanced users this can greatly improve efficiency and is a feature I (personally) have been sad to not have at my fingertips (pun intended) when using Gitea.

kinproposal kinui

Most helpful comment

Personally, I use https://github.com/ccampbell/mousetrap exclusively, it's not tied to vue or jQuery so works universally. I'd use global hotkeys and react to them depending on page URL or other factors.

All 11 comments

+1. Recently started using gitea for home stuff. At work a heavy GitHub user and keyboard shortcuts are really useful and make the workflow significantly faster and more efficient.

Some of the most useful shortcuts for me are navigation ones (e.g. g+p to go to pull requests). I image those should not require any server changes as js should be able to handle them. Same would probably apply to filtering on issue pages.

Some of shortcuts though will require new functionality in the application or at least I dont believe similar functionality already exists in gitea. One of my favorites is file finder (triggered with t) which requires separate search page with fuzzy file matching. Cant find any related issues for those features here. Not sure if it makes sense to create a separate feature request(s) for that functionality or combine everything under single keyboard shortcuts issue.

Maybe one of the owners/contributors can guide what is more appropriate for this project?

Maybe just copy github's js file on paste on gitea will work? :)

+1

Especially missing gn for switching to notifications. Once there's a setup for this, it'd be easy to add a lot of shortcuts, of course.

Edit: another big one is being able to select part of an issue comment and pressing r for easy quoting/replying.

@Lunny I thought about this but in 3 minutes of looking couldn't find a
license for it (and it's minified on delivery). If you can verify that it's
in a compatible license, this may be a good starting point.

On Thu, Jan 24, 2019, 17:13 Sebastian Kippe <[email protected] wrote:

+1

Especially missing gn for switching to notifications. Once there's a
setup for this, it'd be easy to add a lot of shortcuts, of course.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/go-gitea/gitea/issues/5796#issuecomment-457419169,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgxr0dkmKphiRUKU1NoO45_qHDIDz7ks5vGlpPgaJpZM4aLzKl
.

https://github.com/Dafrok/v-hotkey makes sense since Gitea is starting to prefer Vue for a lot of stuff

Personally, I use https://github.com/ccampbell/mousetrap exclusively, it's not tied to vue or jQuery so works universally. I'd use global hotkeys and react to them depending on page URL or other factors.

I noticed while ::shiver:: working on some patch sets for OpenStack that they have a very, very similar mechanism in Gerrit (which, of course means that is F/L/OSS):

screenshot from 2019-02-14 10-25-05

I dug around and found the following change sets which outline how it works and (potentially more importantly) some great commit messages talking about the ideology and lessons learned of it's implementation over the last 8 years:

To add a "what I miss personally" comment, for me it's p to go the parent commit on the commit view page. It makes reviewing commits so much easier than keep finding and clicking the parent hash (which may change screen position between commits.)

Here's the full list supported by GitHub:
Screenshot 2019-08-07 at 17 25 18

I primarily miss y for converting a file URL to a permalink, i.e. replacing ref names with the commit ID. I use this all the time when sharing a link to some piece of code with others so that the link stays valid (still points to the right thing) in the future when refs have long since changed.

Was this page helpful?
0 / 5 - 0 ratings