← Back to team overview

launchpad-dev team mailing list archive

Re: Adding keyboard shortcuts in Launchpad

 

On Wed, Jun 9, 2010 at 12:09 AM, Adi Roiban <adi@xxxxxxxxx> wrote:
> 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 :)
>

Hey Adi,

Thanks so much for doing this. Keyboard bindings are a deep and
abiding passion of mine. I would love Launchpad a lot more if it had
good consistent keyboard bindings the whole way through.

A few guidelines on this work for Translations:
 * Prefer single keypress to chords. Although I love Emacs, the single
key thing seems to be an emerging convention.
 * Think a little about how these might work elsewhere in Launchpad,
but don't think too much about it
 * Launchpad *must* have consistent keybindings wherever it has them.
It would be a disaster if Translations had completely different
keybindings to Bugs, say.
 * When we release this, we have to clearly set user expectations such
that they are not surprised by the lack of keyboard bindings
everywhere else.

Thanks again,
jml



References