How can I handle sending an event when the return key is pressed and NOT when the return+shift keys are pressed? This would be w/ the TextEditor swiftui component
TextEditor().onKeyPress { press in
if (press.key == KeyEquivalent.return && !press.modifiers.contains(EventModifiers.shift)) {
viewStore.send(.sendMyMessage)
return .handled
}
return .ignored // don't forget to set .ignore otherwise no other keys will appear
}