1. Are you ready for the Galaxy S20? Here is everything we know so far!

KeyCaps type of app needed!

Discussion in 'Android Lounge' started by (G), Dec 23, 2009.

  1. (G)

    (G) Android Expert
    Thread Starter

    On the Palm platform there was an app called "Key Caps." What it did was allow you to quickly hit a key twice in succession and it would generate a capital letter (hit "g" twice quickly on the keyboard and it would turn it into a capital G" or if you held down the key for a second, it would generate the ALT symbol associated with that key (a "%" for the "g" in this case).

    The prefs menu allowed you to switch those (i.e. double-tap and get the ALT, hold down long and get the capital).

    Any chance of doing something like that?
     


  2. sorceror

    sorceror Member

    I'm a developer, though not of Android apps (yet). I'm planning on getting a Droid in the next few days, though. I, too, am a big fan of KeyCaps on my Treo, and would love to have such functionality on the Droid.

    I've developed for countless flavors of Unix, PalmOS, Windows, Netware, and so forth. I even got some code into the Linux kernel. I'm reasonably sure I could handle this job, but I'm not sure where to start. Anyone here want to advise me?

    Just from a quick skim, it looks like I could implement an android.inputmethodservice.KeyboardView.OnKeyboardActionListener and tweak the input stream it produces. Of course, I'm not sure how to register one, and so forth... any hints? Or suggestions for a better approach?
     
    garyg-1 likes this.
  3. garyg-1

    garyg-1 Lurker

    It sounds like the right sort of place to begin. I've done a bit of keyboard munging, but never in a high-level language. At the native instruction set level you need to be able to capture "key down", "key up", "which key", a "clock", and have some place to keep tables of replacement values. I have implemented several table-driven State Machines for keyboard re-interpretation: State Machines consume more static memory, but have very low CPU costs to run and are easy to debug & tweak. Please keep us posted on your progress.
     
Loading...

Share This Page

Loading...