 
 import Cocoa
 
-/// Subclass of NSTextField that handles Cmd-X, Cmd-C, Cmd-V, and Cmd-A
-///
-/// This class is used instead of the standard NSTextField in the Start.. dialog
-/// to allow the user to use the standard edit keyboard shortcuts even though the
-/// application has no Edit menu.
-///
-/// This class is based on code found at http://www.cocoarocket.com/articles/copypaste.html
-/// which was written by James Huddleston, and improvements discussed at
-/// http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu
+/**
+ Subclass of NSTextField that handles Cmd-X, Cmd-C, Cmd-V, and Cmd-A
 
+ This class is used instead of the standard NSTextField in the Start.. dialog
+ to allow the user to use the standard edit keyboard shortcuts even though the
+ application has no Edit menu.
+
+ This class is based on code found at <http://www.cocoarocket.com/articles/copypaste.html>
+ which was written by James Huddleston, and improvements discussed at
+ <http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu>.
+ */
 class TextField: NSTextField {
     override func performKeyEquivalent(with key: NSEvent) -> Bool {
         // Map Command-X to Cut
         //     Command-C to Copy
         //     Command-V to Paste
         //     Command-A to Select All
-        //     Command-Z to Undo
-        //     Command-Shift-Z to Redo
         if key.type == .keyDown {
             let commandKeyMask = NSEvent.ModifierFlags.command.rawValue
-            let commandShiftKeyMask = commandKeyMask | NSEvent.ModifierFlags.shift.rawValue
 
             let modifierFlagsMask = key.modifierFlags.rawValue
                 & NSEvent.ModifierFlags.deviceIndependentFlagsMask.rawValue

        return super.performKeyEquivalent(with: key)
    }

    func sendFirstResponderAction(_ action: Selector) -> Bool {
        return NSApp.sendAction(action, to: self.window?.firstResponder, from: self)
    }
}

            if modifierFlagsMask == commandKeyMask {
                if let chars = key.charactersIgnoringModifiers {
                    switch chars {
                    case "x":
                        return sendToFirstResponder(#selector(NSText.cut(_:)))
                    case "c":
                        return sendToFirstResponder(#selector(NSObject.copy as () -> Any))
                    case "v":
                        return sendToFirstResponder(#selector(NSText.paste(_:)))
                    case "a":
                        return sendToFirstResponder(#selector(NSStandardKeyBindingResponding.selectAll(_:)))
                    default:
                        break
                    }
                }
            }
