GithubHelp home page GithubHelp logo

isabella232 / minikey Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orange-opensource/minikey

0.0 0.0 0.0 21 KB

Minikey provides a command line interface to send and receive keyboard events on KaiOS devices

License: Apache License 2.0

Makefile 14.51% C 82.22% Shell 3.27%

minikey's Introduction

minikey

Minikey provides a command line interface to send and receive keyboard events on KaiOS devices. Minikey implements the mapping between physical keyboard and KaiOS internal input events via the libevdev interface.

Minikey may be used by any test tool for test automation. You can record keyboard events and then replay events as you want.

Note: Minikey has been tested only on Nokia 8110 with the following [mapping table] (MAPPING.md).

Building

Building requires NDK (revision 10 at least). Project include LIBEVDEV as a GIT submodule to initialize first:

git submodule init
git submodule update

Then use the command ndk-build from your Android SDK (see your directory $ANDROID_SDK/ndk-bundle).

ndk-build

You should now have binaries available in a directory ./libs.

Deploy on device

You can use the included run.sh script to build and deploy the right binary on your device.

Or manually, you have to first detect which ABI (Application Binary Interface) your device supports:

ABI=$(adb shell getprop ro.product.cpu.abi | tr -d '\r')

Now, push the appropriate binary to the device:

adb push libs/$ABI/minikey /data/local/tmp/

Note that for SDK < 16, you will have to use the minikey-nopie executable which comes without PIE support. Check run.sh for a scripting example.

Usage

Display the command help:

adb shell /data/local/tmp/minikey -h

Usage: /data/local/tmp/minikey [-h] [-w key] [-r input] [-i] [-f file]
  -w <key>  : Write keys.
  -r <input>: Read keys from a given input (eg. '/dev/input/event0' or 'all' for all inputs at a time).
  -i        : Uses STDIN to send key values.
  -f <file> : Runs a file with a list of commands, doesn't start socket.
  -h        : Show help.

Send one or several key press events (see also the [mapping table] (MAPPING.md) for special keys):

adb shell /data/local/tmp/minikey -w 123pdo

Send one or several key press events from a file:

adb shell /data/local/tmp/minikey -f keys.txt

Send one or several key press events from STDIN (press to send values):

adb shell /data/local/tmp/minikey -i

Read key events from a given input:

adb shell /data/local/tmp/minikey -r /dev/input/event0

Read key events from any input event:

adb shell /data/local/tmp/minikey -r all

License

See LICENSE.

Copyright © Orange, Inc. All Rights Reserved.

minikey's People

Contributors

jmauffret avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.