Fix #314 - Numpad enter should send message
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-02-14 12:20:25 -08:00
parent 7bf2e15009
commit dab09c6acb
1 changed files with 3 additions and 3 deletions

View File

@ -376,9 +376,9 @@ class _MessageViewState extends State<MessageView> {
}
// Send the message if enter is pressed without the shift key...
void handleKeyPress(event) {
var data = event.data as RawKeyEventData;
if (data.logicalKey == LogicalKeyboardKey.enter && !event.isShiftPressed) {
void handleKeyPress(RawKeyEvent event) {
var data = event.data;
if ((data.logicalKey == LogicalKeyboardKey.enter && !event.isShiftPressed) || data.logicalKey == LogicalKeyboardKey.numpadEnter && !event.isShiftPressed) {
_sendMessage();
}
}