import UIKit

extension UIKeyModifierFlags {
    func printableKeys() -> String {
        return [
            (contains(.command), "⌘"),
            (contains(.alternate), "⌥"),
            (contains(.shift), "⇧"),
            (contains(.control), "^"),
            (contains(.alphaShift), "CAPS")
            ]
            .filter { keep, _ -> Bool in
                keep
            }.map { _, str in
                str
            }.joined(separator: " + ")
    }
}

import UIKit

extension UIKeyModifierFlags {

    func printableKeys() -> String {
        return [
            (contains(.command), "⌘"),
            (contains(.alternate), "⌥"),
            (contains(.shift), "⇧"),
            (contains(.control), "^"),
            (contains(.alphaShift), "⇪")
            ]
            .filter { keep, _ -> Bool in
                keep
            }.map { _, str in
                str
            }.joined(separator: " + ")
    }
}

Use nicer symbol for Caps Lock
Use nicer symbol for Caps Lock
