feat: shift key in ssh term (#819)

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-07-17 18:18:18 +08:00
committed by GitHub
parent a35d21981b
commit c6439673b8
11 changed files with 63 additions and 28 deletions

View File

@@ -23,6 +23,15 @@ class VirtKeyProvider extends TerminalInputHandler with ChangeNotifier {
}
}
bool _shift = false;
bool get shift => _shift;
set shift(bool value) {
if (value != _shift) {
_shift = value;
notifyListeners();
}
}
void reset(TerminalKeyboardEvent e) {
if (e.ctrl) {
ctrl = false;
@@ -30,6 +39,9 @@ class VirtKeyProvider extends TerminalInputHandler with ChangeNotifier {
if (e.alt) {
alt = false;
}
if (e.shift) {
shift = false;
}
notifyListeners();
}
@@ -38,6 +50,7 @@ class VirtKeyProvider extends TerminalInputHandler with ChangeNotifier {
final e = event.copyWith(
ctrl: event.ctrl || ctrl,
alt: event.alt || alt,
shift: event.shift || shift,
);
if (Stores.setting.sshVirtualKeyAutoOff.fetch()) {
reset(e);