chromium-codereview
chromium-codereview copied to clipboard
Keyboard shortcuts
In particular, I feel sad without j/k.
What do you expect j/k to do?
I was thinking next/prev file, but maybe next/prev hunk would make more sense in this layout.
FWIW, these are the keyboard shortcuts I added to the WebKit code review tool. Personally, I only ever ended up using n/p for navigating comments.
enter add/edit comment for focused item escape accept current comment / close preview and help popups j focus next diff k focus previous diff shift + j focus next line shift + k focus previous line n focus next comment p focus previous comment r focus review select element ctrl + shift + up extend context of the focused comment ctrl + shift + down shrink context of the focused comment
I added the <cr-keyboard> widget in https://github.com/esprehn/chromium-codereview/commit/37ce43da35733125e4870d1378966c041eb168b6 so this should just be a matter of hooking up the keys to things.
I'd also like a keyboard shortcut to bring up the publish dialog. I often find I'm at the bottom of the page when doing a review, and want to publish at that point. It's annoying to have to scroll back up.
I'll have to think about how to make that work with the dialog. HTML5 <dialog> is always fixed at the top of the screen so bringing it up would jump your scroll position to the top.
Are you sure about that? That doesn't sound right to me.
ojan@ Ah yeah I see
How do you expect j/k to work when multiple patchsets are expanded?
Not sure, probably stay in current PS? And maybe another key or J/K to go harder to the next one.
Do whichever is easier. I doubt anyone will notice either way.