diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index 420f1fc0..ea736bbe 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -540,7 +540,7 @@ public final class ComposeActivity } }); - textEditor.setOnKeyListener((view, keyCode, event) -> this.onKeyShortcut(keyCode, event)); + textEditor.setOnKeyListener((view, keyCode, event) -> this.onKeyDown(keyCode, event)); textEditor.setAdapter( new ComposeAutoCompleteAdapter(this)); @@ -1645,7 +1645,7 @@ public final class ComposeActivity @Override - public boolean onKeyShortcut(int keyCode, KeyEvent event) { + public boolean onKeyDown(int keyCode, KeyEvent event) { Log.d(TAG, event.toString()); if (event.isCtrlPressed()) { if (keyCode == KeyEvent.KEYCODE_ENTER) { diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java index 9e3a58f6..90b35d5f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java @@ -281,11 +281,6 @@ public final class MainActivity extends BottomSheetActivity implements ActionBut } } - return super.onKeyDown(keyCode, event); - } - - @Override - public boolean onKeyShortcut(int keyCode, KeyEvent event) { if (event.isCtrlPressed() || event.isShiftPressed()) { // FIXME: blackberry keyONE raises SHIFT key event even CTRL IS PRESSED switch (keyCode) { @@ -297,7 +292,8 @@ public final class MainActivity extends BottomSheetActivity implements ActionBut } } } - return super.onKeyShortcut(keyCode, event); + + return super.onKeyDown(keyCode, event); } @Override