Fix enter (pty) key, add broken stick key support

This commit is contained in:
Caten
2023-10-02 15:44:52 +08:00
parent b4ca9ae4f7
commit 27a5073551
2 changed files with 26 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ import 'dart:math';
//import 'package:flutter/services.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart';
//import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter/material.dart';
import 'package:xterm/xterm.dart';
@@ -832,7 +832,7 @@ class _MyHomePageState extends State<MyHomePage> {
});
}, onScaleEnd: (details) async {
await G.prefs.setDouble("termFontScale", G.termFontScale);
}, child: TerminalView(G.termPtys[G.currentContainer]!.terminal, textScaleFactor: G.termFontScale))),
}, child: TerminalView(G.termPtys[G.currentContainer]!.terminal, textScaleFactor: G.termFontScale, keyboardType: TextInputType.multiline,))),
G.prefs.getBool("isTerminalCommandsEnabled")!?Padding(padding: const EdgeInsets.all(8), child:
SingleChildScrollView(scrollDirection: Axis.horizontal, child: Row(children: [AnimatedBuilder(
animation: G.keyboard,
@@ -1088,6 +1088,11 @@ class _MyHomePageState extends State<MyHomePage> {
setState(() {});
},),
SizedBox.fromSize(size: const Size.square(8)),
SwitchListTile(title: const Text("终端粘滞键"), value: G.prefs.getBool("isStickyKey")!, onChanged:(value) {
G.prefs.setBool("isStickyKey", value);
setState(() {});
},),
SizedBox.fromSize(size: const Size.square(8)),
SwitchListTile(title: const Text("开启时启动图形界面"), value: G.prefs.getBool("autoLaunchVnc")!, onChanged:(value) {
G.prefs.setBool("autoLaunchVnc", value);
setState(() {});