better input
This commit is contained in:
parent
2a9ff10eae
commit
f8903877e2
@ -243,14 +243,19 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
_value, // trick way to make backspace work always
|
_value, // trick way to make backspace work always
|
||||||
keyboardType: TextInputType.multiline,
|
keyboardType: TextInputType.multiline,
|
||||||
onChanged: (x) {
|
onChanged: (x) {
|
||||||
var char = x[x.length - 1];
|
|
||||||
if (x.length <= _value.length) {
|
if (x.length <= _value.length) {
|
||||||
char = 'VK_BACK';
|
final char = 'VK_BACK';
|
||||||
} else if (char == '\n') {
|
|
||||||
char = 'VK_RETURN';
|
|
||||||
}
|
|
||||||
if (char != '' && char != null)
|
|
||||||
FFI.inputKey(char);
|
FFI.inputKey(char);
|
||||||
|
}
|
||||||
|
for (var i = _value.length;
|
||||||
|
i < x.length;
|
||||||
|
++i) {
|
||||||
|
var char = x[i];
|
||||||
|
if (char == '\n') {
|
||||||
|
char = 'VK_RETURN';
|
||||||
|
}
|
||||||
|
FFI.inputKey(char);
|
||||||
|
}
|
||||||
_value = x;
|
_value = x;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user