Skip to content

Commit

Permalink
fix(android): added buttons
Browse files Browse the repository at this point in the history
Added new android keys for playwright-android - AppSwitch, Assist, Cut, Copy, Paste
Modified a android key from 'At' to '@'
Fixes #5216
  • Loading branch information
NareshMurthy authored and pavelfeldman committed Feb 16, 2021
1 parent d07949e commit 0ae73a9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/dispatchers/androidDispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,17 @@ const keyMap = new Map<string, number>([
['Slash', 76],
['/', 76],
['At', 77],
['@', 77],
['Num', 78],
['HeadsetHook', 79],
['Focus', 80],
['Plus', 81],
['Menu', 82],
['Notification', 83],
['Search', 84],
['RecentApps', 187],
['AppSwitch', 187],
['Assist', 219],
['Cut', 277],
['Copy', 278],
['Paste', 279],
]);
9 changes: 7 additions & 2 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7290,15 +7290,20 @@ export type AndroidKey =
'Semicolon' | ';' |
'Apostrophe' | '`' |
'Slash' | '/' |
'At' |
'At' | '@' |
'Num' |
'HeadsetHook' |
'Focus' |
'Plus' | '+' |
'Menu' |
'Notification' |
'Search' |
'RecentApps';
'RecentApps' |
'AppSwitch' |
'Assist' |
'Cut' |
'Copy' |
'Paste';

// This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
export {};
Expand Down
9 changes: 7 additions & 2 deletions utils/generate_types/overrides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,20 @@ export type AndroidKey =
'Semicolon' | ';' |
'Apostrophe' | '`' |
'Slash' | '/' |
'At' |
'At' | '@' |
'Num' |
'HeadsetHook' |
'Focus' |
'Plus' | '+' |
'Menu' |
'Notification' |
'Search' |
'RecentApps';
'RecentApps' |
'AppSwitch' |
'Assist' |
'Cut' |
'Copy' |
'Paste';

// This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
export {};

0 comments on commit 0ae73a9

Please sign in to comment.