Skip to content

Commit

Permalink
Fix the KeyMap for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
zigavehovec committed Jun 11, 2024
1 parent 9474c20 commit b3b30c2
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/ts/spatialnavigation/keymap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,17 @@ const AndroidKeyMap = {
isApplicable: () => BrowserUtils.isAndroid,
keyCodes: {
// D-pad Up
19: Direction.UP,
38: Direction.UP,
// D-pad Down
20: Direction.DOWN,
40: Direction.DOWN,
// D-pad Left
21: Direction.LEFT,
37: Direction.LEFT,
// D-pad Right
22: Direction.RIGHT,
// D-pad Center
23: Action.SELECT,
// Enter
66: Action.SELECT,
39: Direction.RIGHT,
// D-pad OK
13: Action.SELECT,
// Back
4: Action.BACK,
27: Action.BACK,
},
};

Expand Down Expand Up @@ -113,6 +111,7 @@ const DefaultKeyMap = {
* Returns the matching key map for the current platform.
*/
export function getKeyMapForPlatform(): KeyMap {
console.log("getKeyMapForPlatform, isAndrod", BrowserUtils.isAndroid);
const applicableKeyMap = [
WebOsKeyMap,
TizenKeyMap,
Expand Down

0 comments on commit b3b30c2

Please sign in to comment.