You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NSTextFieldDelegate
func control(_ control:NSControl, textView:NSTextView, doCommandBy commandSelector:Selector)->Bool{if(commandSelector == #selector(NSResponder.insertNewline(_:))){
// Do something against ENTER key
print("enter")returntrue}elseif(commandSelector == #selector(NSResponder.deleteForward(_:))){
// Do something against DELETE key
returntrue}elseif(commandSelector == #selector(NSResponder.deleteBackward(_:))){
// Do something against BACKSPACE key
returntrue}elseif(commandSelector == #selector(NSResponder.insertTab(_:))){
// Do something against TAB key
returntrue}elseif(commandSelector == #selector(NSResponder.cancelOperation(_:))){
// Do something against ESCAPE key
returntrue}
// return true if the action was handled; otherwise false
returnfalse}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: