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

import Foundation
import AppKit.NSEvent

enum ModifierKey: CaseIterable {
    
    case control

    init(modifierMask: NSEvent.ModifierFlags, keyEquivalent: String) {
        
        self.modifierMask = {
            let modifierMask = modifierMask.intersection([.control, .option, .shift, .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,
