Commit Graph

2 Commits (7e611ac50cd35a089e1f43a23fae0d435012edaf)

Author SHA1 Message Date
Aleksa Sarai 7e611ac50c
keyboard: japanese: always put digits as the south gesture for latin (#8443)
This is to match GBoard's layout for the latin keyboard mode.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
Aleksa Sarai cdae66a661 keyboard: japanese: switch to 12-key flick layout
This layout is far more commonly used on mobile devices, and allows for
much easier typing. The keyboard primarily functions through gestures in
the four cardinal directions to select which vowel kana to select. In
addition, users can cycle through each kana row by tapping the key
within a 2-second window (this is the equivalent to T9 input for
Japanese phone keyboards).

This also resolves the long-standing issue that the old keyboard did not
correctly handle dakuten (there was a standalone dakuten key which added
a stray dakuten mark, and the umlat mode which added dakuten to all of
the keys it could) and could not input handakuten characters at all.

In order to allow adding dakuten and cycling through the various
modifiers for the previous kana, we need to wrap the input-box (similar
to korean) but luckily we don't need any state machine magic since we
just need to modify the last character in the character buffer. However
because the tap timeout for T9-like-cycling needs to be reset after any
non-tap key we need to add some basic wrappers around a few other
input-box methods.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago