Added support for numpad enter

This commit is contained in:
M66B
2023-10-13 10:22:05 +02:00
parent 70c27d6712
commit bc552ab506
3 changed files with 5 additions and 1 deletions

View File

@@ -579,7 +579,9 @@ public class FragmentDialogSearch extends FragmentDialogBase {
etQuery.setOnEditorActionListener(new TextView.OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_GO ||
(event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
(event != null &&
(event.getKeyCode() == KeyEvent.KEYCODE_ENTER ||
event.getKeyCode() == KeyEvent.KEYCODE_NUMPAD_ENTER))) {
dialog.getButton(DialogInterface.BUTTON_POSITIVE).performClick();
return true;
}