 import Foundation
 import AppKit.NSEvent
 
+/// Modifier keys for keyboard shortcut.
+///
+/// The order of cases (control, option, shift, and command) is determined in the HIG.
 enum ModifierKey: CaseIterable {
     
     case control

    init(modifierMask: NSEvent.ModifierFlags, keyEquivalent: String) {
        
        self.modifierMask = {
            let modifierMask = modifierMask.intersection([.shift, .control, .option, .command])
            
            // -> For in case that a modifierMask taken from a menu item can lack Shift definition if the combination is "Shift + alphabet character" keys.
            if let keyEquivalentScalar = keyEquivalent.unicodeScalars.last,

    }
    
    
    /// whether the shortcut key is empty
    var isEmpty: Bool {
        
        return self.keyEquivalent.isEmpty && self.modifierMask.isEmpty
    }
    
    
    /// Whether key combination is valid for a shortcut.
    ///
    /// - Note: An empty shortcut is marked as invalid.
    var isValid: Bool {
