From 3eb233ffe2aeb5056749a6dcdc6d33d70fd7db16 Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Wed, 24 Jul 2024 20:18:10 +0800 Subject: [PATCH] handling empty alias for keyboardCmdSring --- Limelight/Input/CommandManager.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Limelight/Input/CommandManager.swift b/Limelight/Input/CommandManager.swift index 2326aee6..b778851f 100644 --- a/Limelight/Input/CommandManager.swift +++ b/Limelight/Input/CommandManager.swift @@ -105,6 +105,7 @@ import UIKit @objc public func addCommand(_ command: RemoteCommand) { command.keyboardCmdString = command.keyboardCmdString.uppercased() // convert all letters to upper case + if(command.alias.trimmingCharacters(in: .whitespacesAndNewlines).count == 0) {command.alias = command.keyboardCmdString} // copy cmd string as alias when alias is empty let keyStrings = extractKeyStrings(from: command.keyboardCmdString) if (keyStrings == nil) {return} // in case of non-keyboard command strings, return commands.append(command)