invoke onEnterPressed callback only if shift is not pressed

This commit is contained in:
Daniel Gultsch 2015-09-04 19:33:31 +02:00
parent 9baa87e5c9
commit 1848b46195
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ public class EditMessage extends EditText {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
if (keyCode == KeyEvent.KEYCODE_ENTER && !event.isShiftPressed()) {
if (keyboardListener != null && keyboardListener.onEnterPressed()) {
return true;
}