← Back to team overview

launchpad-dev team mailing list archive

Re: Adding keyboard shortcuts in Launchpad

 

On Tue, 2010-06-08 at 17:23 -0300, Sidnei da Silva wrote:
> On Tue, Jun 8, 2010 at 4:31 PM, Francis J. Lacoste
> <francis.lacoste@xxxxxxxxxxxxx> wrote:
> > Another site that uses shortcuts very well is Remember the Milk. That one also
> > uses single-key letter accelarators and display a portlet on key pages with
> > common shortcuts. It also has a link to the full list.
> >
> > Adi's did consider using single letter short-cut, but dismissed the idea
> > because in Translations there is always an input field that has the focus by
> > default. And single-letter shortcuts don't work well in such an environment.
> > (Do you want the shortcut or type the letter?)
> 
> Let's think outside the box then. The same happens on Gmail, when
> you're composing a message, the keyboard shortcuts do not work. That's
> not a bug or a missing feature IMO, but a safeguard against
> accidentally losing your current work by hitting a shortcut
> unintentionally.
> 
> Arguably, the same applies to Translations: if you are inside an input
> field, typing something, you don't care about shortcuts. If you want
> to move to the next translation, you could hit 'Esc' or 'Tab' to take
> the focus away from the input field. At that point, single-key
> shortcuts would work.
> 
> The way I see it, it would work like this:
> 
> - You land on the Translations page, nothing is focused.
> - You hit 'j/k' to navigate up/down in the list of translations. A
> focus hint is drawn around the current translation.
> - You hit 'e' to start editing the focused translation. Only then the
> input box gets the focus.
> - Once you're done editing you hit 'Esc' to drop focus or 'Tab' to
> move to the next translation.
> - At that point, all shortcuts work since you're not focusing on an input field.
> 
> I would find very enjoyable to work with those shortcuts.

Thanks for this solution.

It looks like an emacs vs vi debate :)

I guess that most users are expecting to just press Ctrl+S while editing
and have the document saved, rather than pressing Esc and then S.

This does not mean that we should not go for "Esc then S" and it may be
a good solution.

A Launchpad translator will always want to edit the field, so a down
will be followed by an edit in most of the cases. This is why it seems
natural for me to look for solutions where down action will
automatically enable the edit of the next translation.

So we will have a loop of:
E - enter translations - Tab = 2 extra keys, 3 groups

Instead of:
enter translations - Shift+Ctrl+j = 3 extra keys, 2 groups

I will try to get some feedback from LP translators regarding this 2
variants.

I like the solution proposed by Silva and it will definitely help users
doing translation reviews and approvals in LP :)

> Special hint: It's really trivial to implement shortcut navigation
> within a common set of descendant elements with YUI3's FocusManager.
> I've played around with it for a specialized view in Landscape and
> it's incredible!
> 
>   http://developer.yahoo.com/yui/3/node-focusmanager/

Thanks for the special hint :)
I will keep this in mind when reimplementing the keyboard navigation.


-- 
Adi Roiban




Follow ups

References