toolbox local soft keyboard toggle

This commit is contained in:
TrueZhuanjia
2025-07-02 17:02:20 +08:00
parent 14a384436c
commit a07e94ca74
5 changed files with 72 additions and 10 deletions
@@ -226,7 +226,7 @@
[super viewDidAppear:animated];
_deviceWindow = self.view.window;
if (UIScreen.screens.count > 1 && [self isAirPlayEnabled]) {
[self prepExtScreen:UIScreen.screens.lastObject];
}
@@ -241,6 +241,8 @@
if(self->_settings.externalDisplayMode.intValue != 2) [self->_streamView insertSubview:self->_streamVideoRenderView atIndex:0];
});
}
self->_streamView.originalFrame = self->_streamView.frame;
// check to see if external screen is connected/disconnected
@@ -511,6 +513,10 @@
}];
}
- (void)bringUpSoftKeyboard{
[self->_streamView readyToBringUpSoftKeyboardByToolbox];
}
- (void)oscLayoutClosed{
// Handle the callback
[self->_streamView disableOnScreenControls]; // add this to get realtime back menu working.
@@ -11,6 +11,7 @@ import UIKit
@objc protocol ToolBoxSpecialEntryDelegate: NSObjectProtocol {
@objc optional func openWidgetLayoutTool()
@objc optional func switchWidgetProfile()
@objc optional func bringUpSoftKeyboard()
}
@@ -26,10 +27,11 @@ import UIKit
private let viewBackgroundColor = UIColor(white: 0.2, alpha: 0.8);
private let highlightColor = UIColor(white: 0.39, alpha: 0.8);
private let titleLabel = UILabel()
@objc public var specialEntries : NSMutableArray = ["widgetLayoutTool"]
@objc public var specialEntries : NSMutableArray = ["widgetSwitchTool", "widgetLayoutTool", "bringUpSoftKeyboard"]
private let specialEntryAliasDic : [String:String] = [
"widgetSwitchTool":SwiftLocalizationHelper.localizedString(forKey: "[ Switch among on-screen widget profiles ]"),
"widgetLayoutTool":SwiftLocalizationHelper.localizedString(forKey: "[ Open on-screen widget tool ]")
"widgetLayoutTool":SwiftLocalizationHelper.localizedString(forKey: "[ Open on-screen widget tool ]"),
"bringUpSoftKeyboard":SwiftLocalizationHelper.localizedString(forKey: "[ Bring up soft keyboard ]")
]
private var viewPinned: Bool = false
@@ -370,6 +372,8 @@ import UIKit
specialEntryDelegate?.openWidgetLayoutTool!()
case "widgetSwitchTool":
specialEntryDelegate?.switchWidgetProfile?()
case "bringUpSoftKeyboard":
specialEntryDelegate?.bringUpSoftKeyboard?()
default: break
}
}