diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-09-28 14:36:10 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-09-28 14:36:10 +0200 |
commit | 8881b71079e86e5beb55a2a84ca2c0fc427f497a (patch) | |
tree | fe1b274509a0aaaa4e2bf113475636b18f240b77 /src/main/java | |
parent | f4d6b676e94d12377b5a2833ce8da4ad9dfc2d05 (diff) |
do tab completion only if neither ctrl nor alt are being pressed
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/EditMessage.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditMessage.java b/src/main/java/eu/siacs/conversations/ui/EditMessage.java index 968ce669..fc655b0c 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditMessage.java +++ b/src/main/java/eu/siacs/conversations/ui/EditMessage.java @@ -37,13 +37,13 @@ public class EditMessage extends EditText { protected KeyboardListener keyboardListener; @Override - public boolean onKeyDown(int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_ENTER && !event.isShiftPressed()) { + public boolean onKeyDown(int keyCode, KeyEvent e) { + if (keyCode == KeyEvent.KEYCODE_ENTER && !e.isShiftPressed()) { lastInputWasTab = false; if (keyboardListener != null && keyboardListener.onEnterPressed()) { return true; } - } else if (keyCode == KeyEvent.KEYCODE_TAB) { + } else if (keyCode == KeyEvent.KEYCODE_TAB && !e.isAltPressed() && !e.isCtrlPressed()) { if (keyboardListener != null && keyboardListener.onTabPressed(this.lastInputWasTab)) { lastInputWasTab = true; return true; @@ -51,7 +51,7 @@ public class EditMessage extends EditText { } else { lastInputWasTab = false; } - return super.onKeyDown(keyCode, event); + return super.onKeyDown(keyCode, e); } @Override |