keymanapp / keyboards

Open Source Keyman keyboards
139 stars 260 forks source link

[sil_euro_latin] feat: auto layer switch for hyphen could be more nuanced #1976

Open mcdurdin opened 1 year ago

mcdurdin commented 1 year ago

From a team review of the Keyman for Android UX (keymanapp/keyman#7161)

If the user types a hyphen on the touch keyboard (which is on the punctuation layer), it drops back to the default layer automatically. This is good for typing hyphenated words. But perhaps when a space or digit is preceding, it would be better to stay on the punctuation layer (e.g. typing 3-1, or something -- something).

It might be good to analyse each of the common punctuation marks for similar scenarios and implement some rules to improve auto layer switches around them also.

LornaSIL commented 1 year ago

I don't feel this is something we can do without help from the development team.

mcdurdin commented 1 year ago

I don't think we'll be able to tackle this at the present time; will revisit in the future when we have some capacity

jahorton commented 4 months ago

It might be good to analyse each of the common punctuation marks for similar scenarios and implement some rules to improve auto layer switches around them also.

One idea would be for math equations. Loosely speaking...

store(digit)        "0123456789"
store(mathSymbol)   "+-/*^"

any(digit) any(whitespace) any(mathSymbol) > layer(&oldLayer)   c  block automatic layer swapping 

I kind of doubt that our keyboards are used that much for math equation typing though; again, this is just an idea.