mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[feat] VirtualKeyboard cursor navigation (#3290)
Still lacks Japanese due to insufficient knowledge of the language.
This commit is contained in:
@@ -239,6 +239,30 @@ function InputText:delChar()
|
||||
self:initTextBox(table.concat(self.charlist))
|
||||
end
|
||||
|
||||
function InputText:leftChar()
|
||||
if self.charpos == 1 then return end
|
||||
self.charpos = self.charpos -1
|
||||
self:initTextBox(table.concat(self.charlist))
|
||||
end
|
||||
|
||||
function InputText:rightChar()
|
||||
if self.charpos > #table.concat(self.charlist) then return end
|
||||
self.charpos = self.charpos +1
|
||||
self:initTextBox(table.concat(self.charlist))
|
||||
end
|
||||
|
||||
function InputText:upLine()
|
||||
if self.text_widget.moveCursorUp then
|
||||
self.text_widget:moveCursorUp()
|
||||
end
|
||||
end
|
||||
|
||||
function InputText:downLine()
|
||||
if self.text_widget.moveCursorDown then
|
||||
self.text_widget:moveCursorDown()
|
||||
end
|
||||
end
|
||||
|
||||
function InputText:clear()
|
||||
self.charpos = nil
|
||||
self:initTextBox("")
|
||||
|
||||
Reference in New Issue
Block a user