Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee15bfe3 authored by Ben Kwa's avatar Ben Kwa
Browse files

Add support for dpads.

Open items when DPAD_CENTER and BUTTON_A are pressed.

BUG=27616153

Change-Id: Ibf00ff2c5cfeb641888ccb7b96a0f4b2e42be11e
parent 2392d997
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1254,12 +1254,15 @@ public class DirectoryFragment extends Fragment
            }

            // Handle enter key events
            if (keyCode == KeyEvent.KEYCODE_ENTER) {
            switch (keyCode) {
                case KeyEvent.KEYCODE_ENTER:
                    if (event.isShiftPressed()) {
                        return onSelect(doc);
                } else {
                    return onActivate(doc);
                    }
                    // For non-shifted enter keypresses, fall through.
                case KeyEvent.KEYCODE_DPAD_CENTER:
                case KeyEvent.KEYCODE_BUTTON_A:
                    return onActivate(doc);
            }

            return false;