IoT-Gadgets-Logo-272-90

Introducing MyMoves System Wide Gestures For MeeGo Harmattan

By
Sam
 - 
Aug 22, 2011

Everything that you will now read is what began as what was termed by the developer sandst1 as a small 3-day home hackathon:

It’s a thing called MyMoves. MyMoves is an attempt to bring configurable
gestures to Harmattan, written in QML/C++. The idea of MyMoves is to be able
to create a gesture, and attach an arbitrary shell command into it.

The current prototype of MyMoves consists of two parts:

  • Mymoveserver, handles the touch events via XRecord, saves the gestures and performs the recognition
  • Configuration UI for adding new gestures and starting/stopping the gesture observation

The server is controlled by the configuration UI via D-Bus commands

So. What on earth can we do with this? Let’s take a closer look. Here’s the configuration UI:

My-Moves-MeeGo-Harmattan-MeeGoExperts-main

It consists of three buttons: “New Move“, “Start observing gestures“, and “Stop observing“.
The first thing to do is to is to create new gestures. Pressing “New Move” shows the screen for adding a gesture

My-Moves-MeeGo-Harmattan-MeeGoExperts-NewMoves

It’s a very simple screen with a box where you draw the gesture (it’s a QmlCanvas btw)
and buttons for saving and clearing the gesture box. Here’s one drawn gesture:

My-Moves-MeeGo-Harmattan-MeeGoExperts-Gesture

Let’s take a look at the video on how adding gestures goes:

Now that the gestures are set up, it’s time to attach them to shell commands,
which currently means getting dirty with the terminal. The gestures are saved
into files called mymoves[number] under /home/user/MyDocs/moves. Each
gesture has the shell command and the gesture data, so the start of a gesture file looks
something like this:

Add your command here
-128 430
-105 436
-95 441
-76 447
-57 455
-38 460
-21 466
-2 474
14 479

Now we can just edit the file, and add the command we want to run
on that specific gesture, let’s say e.g. the calendar, so we replace
Add your command here
with
/usr/bin/invoker –no-wait –type=m /usr/bin/organiser -showWindow 1 &

The command needs to be added just like to a command to a terminal, so no quotes.
Make sure to add & to the end of the command, so it’ll start in a non-blocking way.
Also, the MyDocs folder is in users possession, so use su – user to get permissions for editing the files.
Do that for each of the mymoves[number] files, and you’re set up!

Now using the gestures is as simple as firing up MyMoves and pressing “Start observing gestures“.
Here’s MyMoves in action:

 

Enough for the talking! Where can I get it?

Source code: http://gitorious.org/mymoves
Harmattan debs: http://koti.kapsi.fi/~sh8dfwk/mymoves

Installation only via command line. SSH to your phone, copy the .debs under /home/user/MyDocs,
and run dpkg -i mymoveserver_0_0_1_armel.deb mymoves_0_0_1_armel.deb.

Plans for the future:
- Making the server more robust
- Decoupling the server from the configuration UI so that it starts from the boot
- A usable UI for configuring everything (such as dialogs for selecting an application to run on a gesture etc)
- anything else that pops into my mind

Source Expr3ss Yourself

IoT-Gadgets-Logo-272-90

About us

IoT Gadgets is dedicated to bring you all the Internet of Things IoT news that pertains to gadgets. Simple. We love for you to join us on this journey.

Contact us: [email protected]

FOLLOW US

crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram