Automatically disable buttons (menu/home/back/search) during fast thumb typing to prevent accidents


  1. mdrejhon

    mdrejhon Member

    Here's the situation:

    Problem: Some of us fast thumb typists get very frustrated when accidentally hitting buttons (i.e. Search) that interrupt our email or text message.
    (I'm a thumb touch typist -- google "BlackBerry 75 WPM" to find my YouTube video)

    Solution: An application that automatically disables the buttons (Home/Menu/Back/Search) when typing is detected. For a brief moment, until typing stops. That way, accidental touches of the buttons are ignored during fast typing.

    Existing Precedent: On iPhone's, Apple's microphone button automatically behaves as a spacebar button if fast typing is detected. ( Mystery Behind The Change In Color Of Siri

    Advertisement
    :
  2. jonbonazza

    jonbonazza Well-Known Member

    I would think that this would need to be something the developer of the particular keyboard app would need to implement. I don't think just any ol' app could remedy this.
  3. mdrejhon

    mdrejhon Member

    If a keyboard app was done (or I worked with a developer of an existing one), would I be able to do it system-wide? And can I do it with the physical thumb keyboard?

    If that is not possible, another method might be a low level code (ie driver level) which would require creating my own custom firmware modification on a rooted device. I'd rather avoid having to do it at the operating system level.
  4. jonbonazza

    jonbonazza Well-Known Member

    If a user declares the keyboard you developed as the default keyboard in the phone's settings, then yes it will be system wide.
  5. mdrejhon

    mdrejhon Member

    Thanks. That helps answer my question.

    And if I am the default keyboard, I can override the buttons in order to filter them as needed?
  6. jonbonazza

    jonbonazza Well-Known Member

  7. mdrejhon

    mdrejhon Member

    Ok, excellent, now I see a roadmap that allows this to be accomplished in a non-root manner:

    1. Create an Android Input Method. (There's a sample in the SDK)
    2. Use a zero height for the on-screen part, since we don't need an on-screen keyboard. (Which seems to be possible, because it also can interface with external input methods, special voice input methods, or assistive devices)
    3. Monitor key press events (or text change, or spellcheck plugin, or any other non-root method of detecting text being added to the currently-focussed field)
    4. If key presses have been occuring (from the hardware keyboard) recently, basically filter the presses of Menu/Home/Back/Search buttons. Unless there's been a brief idle (of say, at least 500 milliseconds). In which case, pass through the button events normally.

    The hardware keyboard runs concurrently with the input method (this commonly occurs if you use a different screen orientiation, i.e. horizontal onscreen keyboard and a portrait hardware keyboard).

    The devil will be in the details (i.e. how to automatically invoke somebody else's input method, such as the device's native popup keyboard) whenever I'm in landscape orientiation, since I don't need to filter the Menu/Home/Back/Search buttons while the hardware keyboard is sideways.

    If somebody else beats me to writing an app, please contact me.

    Thanks!
    Mark Rejhon
  8. alostpacket

    alostpacket Over Macho Grande? VIP Member

    Just FYI: as far as I know you can't hook into the home button on a non-rooted device.

    I guess you you could however replace the launcher.... but that's.... well a bit crazy :)

    You can hook into the back button.

    I dont know about menu but I suspect it would be inconsistent. Long-pressing the old menu buttons used to bring up the software keyboard, and (I think) could also hide it.

    Search I think would be like menu, inconsistent.

    No idea about the new task switch button in ICS.
  9. jonbonazza

    jonbonazza Well-Known Member

    That's correct. The Home button is off limits to developers as it is a crucial part of the Application Lifecycle.
  10. mdrejhon

    mdrejhon Member

    Oh, that is bad news.

    Can I hook into all 4 buttons if I am rooted?

    If not, can it be a simple mod in a custom ROM?

    If custom ROM, can I donate a code modification to Motorola or Google, since this is a feature they should evaluate: to help steal more BlackBerry users!

    Accidental tap elimination algorithm that will make it unobtrusive and usability enhancing for 99%+ of users:

    DEFINITIONS
    - 'button' here means the menu/home/back/search buttons
    - 'keyboard' here means the physical keyboard
    - 'accident prone key press' is defined as being top row characters only (Q,W,E,R,T,Y,U,I,O,P) as it is the keyboard row below the buttons. This is where all the accidental button presses occur.
    - 'threshold' is defined as a minimum delay allowed between an accident prone key press and a button press/tap, for normal function
    - 'tap of button' assumes buttons are touch buttons. Some older Android devices may use pressable keys for the buttons, but this is rare.

    ALGORITHM
    - button tap ignored if accident-prone key presses occurs either immediately before and/or immediately after, within threshold.
    - button tap allowed instantly if no accident-prone key presses has occured since threshold.
    - last-tap allowance: taps of button made immediately after accident key presses, is allowed if no further typing occurs. (Button tap is buffered till end of threshold, to make sure no further typing occurs). This accomodate situations of people who immediately tap the buttons right after composing text, for some menu/search feature. (There would just be a short lag of a fraction of a second that only occurs in this situation)
    - threshold could theoretically be somewhat adaptive, based on the average typing speed in the last little while, with an upper cieling that could be configurable.

    I am typing this in Tapatalk, being that I thumb type faster than most people can type at the desktop. I have interrupted myself about 25-30 times trying to type this message. I even lost a message once, due to some accidental menu action that discarded the text, because I continued to type several characters after the accidental menu press. This is a frustration big enough for me to create a custom ROM just so I dont have to pull out my laptop instead of my Android. :) and you know how us power users give good references to other people to increase sales of a device, etc.

    A way shall be found...
  11. alostpacket

    alostpacket Over Macho Grande? VIP Member

    Well they intentionally made it so you can't change the home button to prevent a malicious app from taking complete control. I think you could definitely modify it in a ROM, but I don't know how hard or easy it would be.
  12. jonbonazza

    jonbonazza Well-Known Member

    You would need to change that functionality in the ROM itself. It's not something you can do via application, whether you are rooted or not. Why can't another button perform this functionality? Such as the search button?

    EDIT: Actually, the search button isn't required to be implemented by all devices, so that may be a bad idea after all.
  13. mdrejhon

    mdrejhon Member

    How? All four buttons can be accidentally tapped.

    Thumbs are big.
    -- The menu button can be accidentally tapped while successfully typing letter Q or W or E
    -- The home button can be accidentally tapped while successfully typing letter R or T
    -- The back button can be accidentally tapped while successfully typing letter Y or U
    -- The search button can be accidentally tapped while successfully typing letter I or O or P

    My thumb edge often touches a button while successfully pressing a key. Accidental-tap filtering fixes the problem and produces mostly error-free typing.

    This is, so I can thumb touch type without looking, without worrying about unknown accidental popups caused by accidental presses because my thumb tapped a button simultaneously with the letter.

    I am a deaf software developer and thumb keyboards are my livelihood. I develop for various mobile platforms for a living.

    If employees are reading this, please feel free to forward this thread to your contact at Google or at Motorola.

    Note: I typed this message almost two times in Tapatalk. My first draft got lost in a select-all accident that would not have happened with accidental tap filtering.

    For this, I am willing to pay $500 paypal for a software developer to solve this problem with an accidental-tap filtering algorithm as an app (or rom modification that I can install in less than half an hour on a rooted device, over ssh replacing operating system file if needed). You get to keep and sell the app.

    Sincerely,
    Mark Rejhon

  14. jonbonazza

    jonbonazza Well-Known Member

    Like I said, this can't be done via application, whether the device is rooted or not. You will need to develop an entirely new ROM (which is in no way easy and would have to be tweaked for every device out there). In sumary: can't be done.
  15. jonbonazza

    jonbonazza Well-Known Member

    I should also mention that from now on, almost all devices will be released without hardware buttons at all, so this won't be an issue going forward.
  16. mdrejhon

    mdrejhon Member

    Actually, it's still a problem.

    One example: I tried the Samsung Galaxy Nexus. It has no hardware buttons BUT it has three persistent on-screen buttons that can still be accidentally tapped when touching on-screen elements adjacent to the buttons.

    Plus, when Ice Cream Sandwich devices with physical keyboards come out, with the bottom of screen edge nearly touching the top row of physical keyboard, we have EXACTLY the same kind of accident prone issue. Not all vendors will put a BlackBerry-like 0.5 inch gap between a screen and the keyboard.

    Therefore, the exact same kind of accidental tap filtering is still relevant for these 100 percent software screen elements at bottom of screen edge. You would just instead briefly ignore near-simultaneous taps to the edge of the screen that is adjacent to a physical keyboard, if an accident prone key is typed. But you'd be needing to use nearly exactly the same accidental-tap filtering algorithm.

    It seems the most practical method is directly approach Google and Motorola, to do an optional system level modification for the next Android release, since I am not the only one complaining. Let's see how much results can get done by hitting the correct channels.

    Mark Rejhon
Loading...

Share This Page