hacking way for bracket issue
This commit is contained in:
parent
cb2965e8e4
commit
6623e3c7ef
@ -45,7 +45,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_value = initText;
|
|
||||||
FFI.connect(widget.id);
|
FFI.connect(widget.id);
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
SystemChrome.setEnabledSystemUIOverlays([]);
|
SystemChrome.setEnabledSystemUIOverlays([]);
|
||||||
@ -77,7 +76,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
var v = MediaQuery.of(context).viewInsets.bottom;
|
var v = MediaQuery.of(context).viewInsets.bottom;
|
||||||
if (v != _bottom) {
|
if (v != _bottom) {
|
||||||
resetTool();
|
resetTool();
|
||||||
_value = initText;
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_bottom = v;
|
_bottom = v;
|
||||||
if (v < 100) {
|
if (v < 100) {
|
||||||
@ -141,6 +139,11 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
char = 'VK_RETURN';
|
char = 'VK_RETURN';
|
||||||
}
|
}
|
||||||
FFI.inputKey(char);
|
FFI.inputKey(char);
|
||||||
|
final brackets = '("[<{(“【《{';
|
||||||
|
if (brackets.indexOf(char) >= 0) {
|
||||||
|
openKeyboard();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_value = newValue;
|
_value = newValue;
|
||||||
@ -148,6 +151,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
|
|
||||||
void openKeyboard() {
|
void openKeyboard() {
|
||||||
// destroy first, so that our _value trick can work
|
// destroy first, so that our _value trick can work
|
||||||
|
_value = initText;
|
||||||
setState(() => _showEdit = false);
|
setState(() => _showEdit = false);
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
_timer = Timer(Duration(milliseconds: 30), () {
|
_timer = Timer(Duration(milliseconds: 30), () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user