mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.
- `TerminalColors` - ssh virtual key auto switch
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:toolbox/data/store/setting.dart';
|
||||
import 'package:toolbox/locator.dart';
|
||||
import 'package:xterm/core.dart';
|
||||
|
||||
class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
|
||||
@@ -7,6 +9,8 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
|
||||
bool ctrl = false;
|
||||
bool alt = false;
|
||||
|
||||
final _setting = locator<SettingStore>();
|
||||
|
||||
void reset(TerminalKeyboardEvent e) {
|
||||
if (e.ctrl) {
|
||||
ctrl = false;
|
||||
@@ -23,7 +27,9 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
|
||||
ctrl: event.ctrl || ctrl,
|
||||
alt: event.alt || alt,
|
||||
);
|
||||
reset(e);
|
||||
if (_setting.sshVirtualKeyAutoOff.fetch()!) {
|
||||
reset(e);
|
||||
}
|
||||
return defaultInputHandler.call(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user