[feat] VirtualKeyboard cursor navigation (#3290)

Still lacks Japanese due to insufficient knowledge of the language.
This commit is contained in:
Robert
2017-10-10 18:04:51 +02:00
committed by Frans de Jonge
parent aaab777ddb
commit a392fbcca0
9 changed files with 100 additions and 27 deletions

View File

@@ -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("")