SlideType Keyboard and Yak Shaving

Slidetype Keyboard

Something that was bugging me about Android was the touch screen keyboard. I found it impossible to type anything with acceptable speed or accuracy. Unless you have child-sized fingertips, you’re relying on the dictionary guessing to figure out what word you mean, which is crap at the best of times, and useless if you’re not typing dictionary words. A side issue – I’ve noticed that if you *do* have child-sized fingers, it’s hard to get the touch screen to register at all, when you want it to. I don’t have child-sized fingers, of course, but my children do. When they want to press things, they have to hold their finger on the screen for a while, and sometimes it registers, sometimes it doesn’t. On the other hand, if they approach from behind and stab at the screen while you’re in the middle of doing something, it invariably registers straight away.

Anyway, before I got side-tracked by children’s fingers, I was going to say: But then I discovered the SlideType Keyboard!

The way this works (see the screenshot) is that pressing the buttons gives you the numbers, while pressing and sliding a short distance in the appropriate direction gives you the letters. Pressing Alt switches you to and from a second layout with symbols instead of letters. Additionally, you can ‘long-press’ a letter key to get a pop-up menu of accented versions of those letters. This is a really good idea, and I found I could type reasonably quickly with it straight away, and with perfect accuracy. The one thing lacking is the ability to customise the layout. In particular, I didn’t want to have to switch to the symbol layout and back just to get an apostrophe. This is simple requirement was where the yak shaving started…

Getting the source code was easy enough. Setting up Eclipse and the Android SDK was painful, but no big deal. Unfortunately though, I don’t get on with IDEs in general, and particularly not Eclipse. Although I got the minor changes I wanted done in 5 minutes, I spent the next 55 wrestling with bugs in Eclipse before I realised the error of my ways.

At this point, I ditched Eclipse and used Ant to build it instead. This was much better, and now I could easily build my modified keyboard application and run it in the emulator. To run it on a real device though, the package needs signing. After more messing about (generate key, sign package, ‘zipalign’ package), I had that side of things sorted out and had something I could, in theory, install on my phone.

The sensible way to do this is using ‘adb’, the Android Debug Bridge. In theory, you plug the phone into the USB port, type ‘adb install mypackage.apk’ and you’re done. In practice, it didn’t work due to various bugs and incompatibilities. For reference, using Karmic and a Samsung device, you have to do the following:

  1. Create /etc/udev/rules.d/99-android.rules, with a+rx permissions, with the following line in it: SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", SYMLINK+="android_adb", MODE=”0666″.
  2. Restart udev – sudo service restart udev
  3. Build a non-broken version of adb – see the bug

Note that if the device is not a Samsung, you need to change the 04e8 to the appropriate vendor ID, which you can see as the first 4 digits of the device ID if you run lsusb with the device plugged in. You probably also don’t need the adb bug fix in that case.

Finally, two hours later, I have quote and an apostrophe on the ’1′ button on the keyboard. I don’t know many year’s worth of typing I’ll have to do on it for the time saved to come close to those two hours, but at least I now have a decent Android development environment set up.

  1. Andy’s avatar

    What a great term yak shaving is :-) Thanks for explaining Slide Typing, great ideas often are because they work! I wonder if your phone is any good at voice recognition in terms of turning your speech into text… Anyway, perhaps the calculation to think of is how much time have you spared humanity with this… OK, it probably doesn’t matter, it might not add up, but then you probably don’t care. Cheerio.

    Reply

  2. Little Sis'’s avatar

    Sounds similar to the SureType keyboard that’s on the BlackBerry Storm – the nice thiing about the Storm one is that when you press it the screen clicks a little so it still almost feels like a button press. x

    Reply

Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">