mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Keyboard: add Chinese stroke-based layout (#9572)
Basically it uses 5 keys for 5 basic stroke types and inputs characters by their stroke order. See https://en.wikipedia.org/wiki/Stroke_count_method
This commit is contained in:
@@ -139,7 +139,9 @@ if Device:isTouchDevice() or Device:hasDPad() then
|
||||
self.is_keyboard_hidden = false
|
||||
end
|
||||
end
|
||||
if #self.charlist > 0 then -- Avoid cursor moving within a hint.
|
||||
-- zh keyboard with candidates shown here has _frame_textwidget.dimen = nil.
|
||||
-- Check to avoid crash.
|
||||
if #self.charlist > 0 and self._frame_textwidget.dimen then -- Avoid cursor moving within a hint.
|
||||
local textwidget_offset = self.margin + self.bordersize + self.padding
|
||||
local x = ges.pos.x - self._frame_textwidget.dimen.x - textwidget_offset
|
||||
local y = ges.pos.y - self._frame_textwidget.dimen.y - textwidget_offset
|
||||
|
||||
Reference in New Issue
Block a user