mozilla-b2g/gaia — pull request #6383 by davidflanagan (2012-11-13 21:05:49+00:00)
Title: Bug 807846 - punctuation alternatives

This PR patches the keyboard to add alternative punctuation characters to the . key of the english and portuguese keyboards, per https://docs.google.com/spreadsheet/ccc?key=0Aho3t5kX1TtRdFFOS25rZFNXcncxZm9LRUtzaDlKLVE#gid=0 and the discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=807846

It also adds 1st, 2nd, 3rd, etc. to the english keyboard numbers, also according to the spreadsheet above. In order to ensure that these only appear in the english keyboard and not all layouts that inherit the default, it gives the english keyboard its own alt layout.

This PR moves the portuguese and spanish keyboard layouts from the bottom of layout.js to the top, since they are two of our most important targets for v1.

Finally, there were bugs in render.js that made wide alternatives like "1st" and "R$" appear in menus that were too narrow, so this patch rewrites showAlternativesCharMenu)_. Part of the problem was the no-longer valid assumption that the first alternative passed in was the original key that the user pressed on.