Home of tyty1234

Android Keyboard: Enter Key (CM7)

Posted on by Tyler



About a month ago, I rooted my HTC Droid Incredible with unrevoked and installed CyanogenMod 7 (CM7). With that running successfully on my phone with a finally updated version of Android Gingerbread, I was a bit unhappy with the keyboard that came with CM7, but found a work-around.

Click here if you would just like to get the apk to remove the smiley key.

Reason because I was unhappy with the keyboard, is that there was no enter key, and got a bit frustrated. That didn’t mean I hated CM7 though, because it’s a really great ROM and has promising features in the future for the latest Android Ice Cream Sandwich (ICS) OS. So what I did was find a keyboard apk to install, and through XDA-Developers, I found a keyboard that looked exactly like the HTC sense keyboard. It’s a mod by jonasl who created the HTC_IME mod which luckily, worked well with the CM7 ROM and the specs of the Incredible. After being satisfied with the new familiar keyboard, and having a return key, I discover there’s a lot you can do with the system keyboard and a way to replace it and theme it. Which is what I set my journey for.

It took a lot of Google searching and forum searching over at XDA-Developers to find exactly what I wanted. I searched a while for “keyboard themes”, “custom keyboard”, “remove smiley key” and etc and came up with lots of different results. In the end, I had to piece it all together and connect different threads and methods with eachother to make it all work. In the end, it was the system app Mms.apk that had the option to disable the smiley key and be able to use the enter key. Using a tool called APK Tool, released by Google under the Apache 2.0 License, I was able to decompile the Mms.apk file, go into the res/layout/compose_message_activity.xml file and remove the keyword that said “textShortMessage” within the file to enable the enter key. I then recompiled the apk, and then pushed it to my Incredible via adb and stopped and started the adb shell. This was done with a batch script by Daneshm90 called APK Manager. It took a lot of searching, but that did the trick.

If you are like me and don’t like the smiley key there, you can download the apk here. To install it, rename “Mms.apk.zip” to “Mms.apk”, connect your phone to the computer, open cmd and then push it through adb using the following code.

adb remount
adb push Mms.apk /system/app/Mms.apk

Then you will have to go into the adb shell, and stop then start.

adb shell stop
adb shell start

Your phone should reboot at the boot animation for your ROM. I have the HTC Incredible, and am not sure if it will work on other ROMs/phones. Also, this is the Mms.apk that comes with CM7, so if you don’t have CM7 installed with the Mms.apk that it comes with, you’ll be completely replacing the current style of your Mms.apk app. It is recommended that you backup the original Mms.apk before pushing this one, and your phone must be rooted to get rid of the smiley key. If you prefer to do this yourself, this is the line of code you will need to look for in compose_message_activity.xml located in the /res/layout/ folder of the apk.

<EditText android:id=”@id/embedded_text_editor” android:background=”@android:drawable/edit_text” android:nextFocusRight=”@id/send_button” android:layout_width=”0.0dip” android:layout_height=”wrap_content” android:hint=”@string/type_to_compose_text_enter_to_send” android:maxLines=”3″ android:capitalize=”sentences” android:autoText=”true” android:layout_weight=”1.0″ android:inputType=”textCapSentences|textAutoCorrect|textMultiLine|textShortMessage” android:imeOptions=”actionSend|flagNoEnterAction” />

Where you see “textShortMessage” in bold, is the input type you want to remove. Be sure when you remove that, you remove the “|” character before it as well. There should also be a compose_message_activity_black.xml file as well with almost the same code. If you do have this file, or any other version of the composer_message_activity file, then you may need to perform modifications on that as well. Once you do perform the modifications, you will need to recompile and build the apk. The best way to do this is with Daneshm90’s APK Manager.

If you’re wondering about the image shown above, the keyboard installed is a modified version of the LatinIME.apk file that comes with CM7 using the BlueBlackout theme posted by brainmaster at XDA-Developers. You can get the PSD of the Incredible here. Screenshot was taken with CM7.

Did you like this? Share it:
This entry was posted in Android, Personal. Bookmark the permalink.

10 Responses to “Android Keyboard: Enter Key (CM7)”

  1. John
    November 5, 2012 at 9:23 am

    Hello,
    I downloaded and renamed the the file to apk.
    When I type adb remount however, i get an error message, stating that “adb is not recognized as an internal or external command, …”
    I am typing the command the pc ffrom the directory C:\Users\John

    Thanks for the help

    • Tyler
      November 5, 2012 at 5:30 pm

      Hi John. To use adb from command prompt, you have to either set your global variables, or be in the same directory as the adb in the Android SDK.

  2. zdoe
    December 6, 2012 at 7:04 pm

    my \system\app doesn’t have an Mms.apk – if i put it there am i going to wreak havoc?

    or – where else might this setting be in cyanogen? i’m on 7.2. in the swype forum i read something to the effect that cyanogenmod might have a “messaging” settings menu. can’t find it

  3. zdoe
    December 6, 2012 at 8:51 pm

    i AM viewing the files on the root and see a ton of other stuff in /system/app

  4. zdoe
    December 6, 2012 at 8:54 pm

    i thought i’d try to put it in there anyway… the push-command never finishes, though.

    what if i just copy the file to /system/app with a file manager?

    i’m a noob on using the adb shell.

  5. zdoe
    December 6, 2012 at 9:58 pm

    i’m sure i could figure out APK tool but without ADB push working i’m not able to install any APK that it would generate.

    also – just to make sure – do you think your fix will work for the swype keyboard, or just the stock one?

    • Tyler
      December 7, 2012 at 7:56 am

      Because I only modified the MMS.apk file, to my knowledge, that would be the stock keyboard. It’s possible the Swype keyboard has a different file name, or that it was somehow integrated into a MMS.apk file depending on how you obtained the swype keyboard. In any case, if you’re gonna apply the MMS.apk file that I have, you’re replacing the MMS.apk file that comes with CM7 for the HTC Droid Incredible. If you’re trying to apply the MMS.apk file to another phone that has the same exact CM version, then that *should* still work, however I haven’t tested it.

  6. zdoe
    December 7, 2012 at 8:42 pm

    ok – now i know why i didn’t have Mms.apk – that’s because it was frozen by titanium. i’m using Go-SMS instead, which DOES give me an enter key regardless of the keyboard in use. but this all makes me think that maybe replacing Mms.APK will not cure the keyboard but the app, so i think i’m looking for alt remedies to fix swype. meanwhile, i have an old version of it that does have an enter-key.

Leave a Reply