keycode-for-android
Return keycode for android. Could be useful for appium android test.
Data from Android KeyEvent.
As you know, Android keycodes are different from PCs. For example, "Enter" keycode is 13 on PC but 66 on Android. This module gives your the Android's.
Usage
Install 'keycode-for-android' into your project:
npm i -S keycode-for-android
require
and use it!
const keycode = // You can use a keycode name which is exactly the same as Google document. // Return 66 // You can use a short name, with out "KEYCODE_" // Return 66 // Lowercase is OK, too. // Return 66 // Return 66 // From keycode to its name. // Return 'KEYCODE_ENTER' // Return 'KEYCODE_ENTER' // Return undefined if a keycode name is unknown or a keycode isn't exist. // Return undefined // Return undefined
Fork me on github.