[root]Alternative keyboard layout compilation - Samsung Galaxy S Relay 4G

Hi there,
as this phone isn't available outside of the US I guess it's convenient for us importers to have some keyboard layouts to choose from. I just made a german one - I've made a list with those layouts which were already mentioned somewhere in this forum.
German Layout
Download keypad files here
Code:
My changes:
- AT is now the Umlaut special character (eg. press AT, then 'a' to get 'ä')
- AT is bound to the EMAIL key (EMAIL + A/U/O for umlauts works pretty well)
- SEARCH is bound to the CONTACTS key
- ALT is also bound to the VOICESEARCH key
- Y is Z; Z is Y
- ALT + B will now result in 'ß'
I just got used to two ALT buttons (coming from the DZ/G2). The SEARCH button is used in some apps, but not very often.. I like to have it on my keyboard, thus binding it to the CONTACTS key (I use search+'x' for certain shortcuts).
Nordic layout
user032 said:
Here's a Nordic layout I'm using. It should cover Swedish and Finnish characters. The keymaps have been shamelessly ripped off Desire Z CyanogenMod configuration files.
Email = Ö
Messaging = Ä
Voice Search = Å
sec_keypad.kl:
Code:
# Problem Children
key 155 BUTTON_4 WAKE_DROPPED
key 429 BUTTON_5 WAKE_DROPPED
key 217 BUTTON_3 WAKE_DROPPED
sec_keypad.kcm:
Code:
key BUTTON_3 {
label:'\u00C5'
base:'\u00E5'
shift, capslock:'\u00C5'
alt: '\u00E5'
shift+alt:'\u00C5'
}
key BUTTON_4 {
label:'\u00D6'
base:'\u00F6'
shift, capslock:'\u00D6'
alt: '\u00F6'
shift+alt:'\u00D6'
}
key BUTTON_5 {
label:'\u00C4'
base:'\u00E4'
shift, capslock:'\u00C4'
alt: '\u00E4'
shift+alt:'\u00C4'
}
Click to expand...
Click to collapse
jarrodlombardo's layout (Double [email protected]+DPAD_CENTER)
jarrodlombardo said:
Using the tips from http://forum.xda-developers.com/showpost.php?p=33762519&postcount=537 and some prior knowledge, I modified my keys so Irssi ConnectBot could work (it requires a DPAD_CENTER hard key) and some other things could be better.
If you replace your current versions with the below links, you'll get the following changes:
Shift + [number] gives the symbol Alt + [number] does.
The Email key will give you '@' and Alt + Email will give '~'. (This is how I had modified my Sidekick 4G's @ key since that kbd didn't have '~' at all.)
The stupid microphone button does DPAD_CENTER (this is the same as pressing the trackball button on phones that have them).
sec_keypad.kcm Put this in /system/usr/keychars/.
sec_keypad.kl Put this in /system/usr/keylayout/.
Click to expand...
Click to collapse
orange808's layout (multiple SEARCH keys)
orange808 said:
Sure. Here's my configuration:
http://www.mediafire.com/?tp3jc392w2q2jyg
The right shift key and the alt key are now search keys. This makes using quick launch keyboard shortcuts very easy because there are keys in both corners of the device to press--along with another key to launch an app. This eliminates the need to reach across the device when multitasking.
The voice key is now the right shift.
The sms/contacts and email buttons are now both alt keys.
It's not for everyone and most people will probably be confused with keys that perform strange actions (that conflict with their labels), but it works for me.
Click to expand...
Click to collapse
How to
(you need to mount the system partition as R/W to overwrite those files)
sec_keypad.kcm goes to /system/usr/keychars
sec_keypad.lk goes to /system/usr/keylayout
As written by dillalade in his post about keylayouts. Thanks to Nocturin for creating his information portal - which brought me there.
Feel free to upload your layout files / describe your changes - I'll add them to the list. They don't have to be language specific.

Just made some changes to my layout (added 'ß'), added two more (already mentioned) layouts.

Ctrl key.
Sory if this is not right section but I believe it is somehow related.
Is there a chance to add like or emulate key CTRL?
I was in shock when I get the mobile as was never thinking it is not present.
Regards
Mac

mazak23 said:
Sory if this is not right section but I believe it is somehow related.
Is there a chance to add like or emulate key CTRL?
I was in shock when I get the mobile as was never thinking it is not present.
Regards
Mac
Click to expand...
Click to collapse
Sure, since you can use normal keyboards with your android device there has to be some CTRL function - though I don't know why you'd want CTRL keys. There are some shortcuts in android which use CTRL similar to those windows has.. but I can't think of any other uses.
You just have to bind LEFT_CONTROL or RIGHT_CONTROL (in sec_keypad.kl) to any key you want. Haven't tested that though.

Kueber said:
Sure, since you can use normal keyboards with your android device there has to be some CTRL function - though I don't know why you'd want CTRL keys. There are some shortcuts in android which use CTRL similar to those windows has.. but I can't think of any other uses.
You just have to bind LEFT_CONTROL or RIGHT_CONTROL (in sec_keypad.kl) to any key you want. Haven't tested that though.
Click to expand...
Click to collapse
I want to use it for copy/paste options, we can do it on screen, but sometimes it's faster, and I prefer to do it with physical keyboard.
So do I have to root my device to change anything in that file, I am on 4.1.2 stock one now.
Thanks
Mac

Ah, I see - good idea actually, I'll try that.
Yes, you have to be rooted since you have to modify sytem files.
Sent from my SGH-T699

Kueber said:
Ah, I see - good idea actually, I'll try that.
Yes, you have to be rooted since you have to modify sytem files.
Sent from my SGH-T699
Click to expand...
Click to collapse
Recently I did ping in Shell apk and could't stop it, as without CTRL key I don't know how... So there is more than I said before.

Here's a Nordic layout I'm using. It should cover Swedish and Finnish characters. The keymaps have been shamelessly ripped off Desire Z CyanogenMod configuration files.
Email = Ö
Messaging = Ä
Voice Search = Å
sec_keypad.kl said:
# Problem Children
key 155 BUTTON_4 WAKE_DROPPED
key 429 BUTTON_5 WAKE_DROPPED
key 217 BUTTON_3 WAKE_DROPPED
Click to expand...
Click to collapse
sec_keypad.kcm said:
key BUTTON_3 {
label:'\u00C5'
base:'\u00E5'
shift, capslock:'\u00C5'
alt: '\u00E5'
shift+alt:'\u00C5'
}
key BUTTON_4 {
label:'\u00D6'
base:'\u00F6'
shift, capslock:'\u00D6'
alt: '\u00F6'
shift+alt:'\u00D6'
}
key BUTTON_5 {
label:'\u00C4'
base:'\u00E4'
shift, capslock:'\u00C4'
alt: '\u00E4'
shift+alt:'\u00C4'
}
Click to expand...
Click to collapse

Finally I made CONTROL key.
In file sec_keypad.kl I have now:
key 215 CTRL_LEFT
So instead of email key it is left control key.
I am so glad!
Now I am wondering how to add polish characters : ą, ć, ę, ł, ń, ó, ś, ź, ż
They should be under adequate letter and CTRL button (I believe).
Anybody can point me in the right direction?

Kueber said:
Hi there,
as this phone isn't available outside of the US I guess it's convenient for us importers to have some keyboard layouts to choose from. I just made a german one - I've made a list with those layouts which were already mentioned somewhere in this forum.
...
// edit: I forgot the 'ß', lol. I bound it to alt+B, since this button has no alt function + minor thread layout changes, added two more mappings which were mentioned in Nocturin's post
Click to expand...
Click to collapse
*I want to follow you with my layout but cannot found ß symbol in files you are posting.
Can you update files?
Thanks

mazak23 said:
*I want to follow you with my layout but cannot found ß symbol in files you are posting.
Can you update files?
Thanks
Click to expand...
Click to collapse
It's in the sec_keypad.kcm:
Code:
key B {
label: 'B'
number: '2'
base: 'b'
shift, capslock: 'B'
alt: '\u00df'
shift+alt, capslock+alt: '\u00df'
\u00df is unicode for 'ß'.

Kueber said:
It's in the sec_keypad.kcm:
Code:
key B {
label: 'B'
number: '2'
base: 'b'
shift, capslock: 'B'
alt: '\u00df'
shift+alt, capslock+alt: '\u00df'
\u00df is unicode for 'ß'.
Click to expand...
Click to collapse
Yeah , right.
Silly me, I was looking for S sharfe itself, it is unicode UTF 8?

Yup, UTF 8. DF is 223 in decimal. There are tables out there with all the special keys and their HTML-decimal value.

Here is polish keyboard layout.
Mainly we are getting special letters with CTRL button (which is under email key), but some are coming with left ALT. Thus because CTRL + C for example is COPY.
More explained in files.
Soon I will do it with right shift, which I see useless at all.

Pretty interesting this thread.
I just bought one of these best qwerty device masterpiece and I'm start wondering about how to make special CZECH characters under the numbers 2-0
I'd like this:
2 = ě
3 = š
4 = č
5 = ř
6 = ž
7 = ý
8 = á
9 = í
0 = é
Can you guys give me some guide? Many thanks in advance!

Is it no better to do it with alt or ctrl key?
Kueber wrote already instruction on next post.
There is one thing we should remember, permissions.
I experienced that when it is not right Android is using different file for keyboard layout (not using file sec_keypad.kcm).
I believe it is OK to use Root Explorer apk as it was mention somewhere.
Regards

xheretic said:
Pretty interesting this thread.
I just bought one of these best qwerty device masterpiece and I'm start wondering about how to make special CZECH characters under the numbers 2-0
I'd like this:
2 = ě
3 = š
4 = č
5 = ř
6 = ž
7 = ý
8 = á
9 = í
0 = é
Can you guys give me some guide? Many thanks in advance!
Click to expand...
Click to collapse
You have to modify the sec_keypad.kcm - just edit the keys.
For example, find the '2' key and edit the 'ě' in.. but you need to write it in UTF8.
1) Find character ascii value: ě -> 277 I believe (you can find those numbers in any ASCII chart <- this one even displays all the values in hex)
2) convert to HEX: 115
3) ě in unicode is now '\u0115' - just put the hex-number in like I did
4) edit the value in sec_keypad.kcm
Should look like this:
Code:
before
key 2 {
label: '2'
number: '2'
base: '2'
shift: '2'
alt: '@'
shift+alt: '@'
}
after
key 2 {
label: '2'
number: '2'
base: '\u0115'
shift: '2'
alt: '@'
shift+alt: '@'
}
Now "2" will result in a "ě" .. shift+2 will be your regular "2". Hope that helps.

my own polish physical keyboard layout and char map:
http://forum.xda-developers.com/attachment.php?attachmentid=2293495&stc=1&d=1380569369
voicesearch key (the stupid microphone) mapped to ALT_RIGHT
'ć', 'ę', 'ł', 'ń', 'ó', 'ś', 'ź', 'ż' under right alt+c, e, l, n, o, s, x and z key, respectively
'ą' is under right alt+q key, i could not make it work with a
e-mail key mapped to CTRL_LEFT, crtl+c and ctrl+v shortcuts work
i also recommend this:
http://source.android.com/devices/tech/input/key-character-map-files.html
to everyone making custom keyboard layouts. it explains *.kcm files well
i would like to thank kueber, dillalade and mazak23
good to see that i am not the first t699 user in poland

So, who wants to kang this for us? https://github.com/CyanogenMod/andr...mmit/7f6a2c6a56aceca8505cfce97c5a2cf77612a791
Alternatively, if we set this up, would people submit keymaps for various languages?

Nardholio said:
Alternatively, if we set this up, would people submit keymaps for various languages?
Click to expand...
Click to collapse
feel free to use mine and modify it in any way you like

Related

[MOD] HTC_IME (8th June) v27: Small fix

I'm now taking a break from the work on this mod due to serious lack of time. I've spent a huge amount of time on this mod already and also shared all my code and methods. I hope the community has benefited from this. You are all free to do whatever you want with my code if you want to make further improvements. I hope I can find some time to continue this little project later this summer. Thanks for all the encouraging words, feature suggestions and bug reports. Couldn't have done this without you all
Credits:
The old low res hack is based on the version posted by Cyanogen.
The new low res and high res hack is based on the version posted by modaco.
JesusFreke for smali/baksmali.
Couldn't do this without them.
Features:
(Compacted this list to save space, the point is that there are many features not to make this list readable )
Customizable language settings, Smileys hacked into the hide key (see screen shots), Swap Smiley/12# button, Custom smileys, Custom word candidate bar that raises the keyboards so dictionary won't cover the app you type in, Position of word candidate list is saved if you long press and move it, Left align word candidate list, Prediction in fields with own suggestions (search bar etc.), Prediction in fields that sets the filter flag, Prediction in URL fields, Disable automatic capitalization, Play sounds in silent mode, Set sound level, Custom sounds, Automatic space insertion, Enable prediction with cursor in or adjacent to existing words (QWERTY only), Enable a space bar key in URL keyboard, Support for German QWERTZ hard KB layout, Show voice input button for all keyboards with a settings button, Disable key preview popup, Use Google development server for voice (supports German but isn't online 24/7), MANY HTC bugs fixed, the changelog for a few of them, Droid SE X10 landscape support, User dictionary import/export, User dictionary accepts any character, not just HTC approved ones, Custom vibration length, Character replacement (can remove diacritic chars), Pipe key in qwerty mode, Move cursor with volume keys (for Sony Ericsson Xperia X10), Easier access to language specific chars in qwerty popups, Configurable gesture (swipe) actions, Gesture actions: Delete word, delete sentence, shift, hide kb, cursor after word, voice input, switch language, switch keyboard, Use phone keypad / compact qwerty symbol kb for QWERTY, Toggle accept dict. suggestion by space / period / comma, Fast language and keyboard switching by gestures, Version tracking by aTrackDog, Custom domains for .com key
And not least:
My source code is now available for your own modding pleasure
All hacks are configurable in the settings dialog.
Changelog for latest versions
Code:
/*
* 27
* Fixed: T9 is now disabled when adding words manually (sorry, missed that bug report on v26b1)
*/
/*
* 26
* Separate version for Froyo (2.2) due to changed voice input API:s
* Fixed: User dictionary should now be saved correctly on Sense ROMs (if installed correctly!)
* Fixed: Slightly better SMS detection
* Fixed: Custom popup domains will work without enabling custom popup time (caused by typo)
* Fixed: Smiley insertion right after period removed first smiley char
* Fixed: Settings not remembered for some locales
* Fixed: Tweaked space insertion around parentheses some
* Fixed: Fixed "Predict in Browser" option on Froyo (workaround for Android issue #8563)
* Fixed: Space deleted after period insertion and use of chars from symbol KB (HTC bug)
* Fixed: No auto add words didn't always work
* Fixed: Smiley button didn't work on symbol KB
* New: Calibration is considered for all layouts
* New: Modify button height/width on all layouts
* New: € £ added to f popup
* New: T9 toggle settings now remembered
* New: Export/import settings to/from SD card
* New: Pipe added to alt. symbol keyboard (page 4)
* Gesture: Cursor before word
*/
/*
* 25
* New: Move lang. specific popup chars closer to pressed key (help me support more langs!)
* Option: Replace chars only for SMS
* Option: Custom domains for .com key
* Option: Insert period on double space
* Option: Toggle accept dict. suggestion by 12# key
* Option: Configurable custom sounds
* Option: Change language with volume keys
* Option: Adjust portrait QWERTY key width
* Changed: Delete last sentence breaks on comma again.
* Fixed: Space insertion disabled for URI fields (causing problems)
* Fixed: Space insertion tweaked for French
* Fixed: Removed Romanian since not working (blame HTC)
* Fixed: Don't insert space if prediction is disabled in browser
* Fixed: Predict in URL working again.
* Fixed: Sound for HW KB working again
* Gesture: Toggle QWERTY prediction on/off
*/
Download
v27
High resolution version
High resolution version (Froyo/2.2)
Low resolution version for Android 1.6 and up
Low resolution version for Android 1.5 (no voice input)
Instructions:
Download and unzip (not flashable update.zip!)
Install the two apks (HTC_IME & Clicker) using your favorite method (via a file manager or adb install -r). Sense users shouldn't (and needn't) install Clicker.
There is no need to push anything to /system
Go to Menu, Settings, Language & Keyboard. Activate "HTC_IME mod"
To change keyboard, long press on lower left key on stock keyboard or any input field. Select input method in the menu.
See note below if you have earlier versions than v22 installed already!
Requirements:
Android
Compatible resolution screen
Compatible CPU. Sorry can't say which they are but I know some Samsung phones are not supported. This is due to the included HTC native prediction library.
Configuring my hacks
All configuration is now done in the settings dialog. No need for config files on SD card (v22 and up).
Some options modifies stuff that are set when the keyboard first loads. Thus you need to kill it for changes to take effect (or reboot).
Upgrade notes
Starting with v22 I now use my own java package name. This means that it can be installed in parallel with stock HTC_IME (no root needed on Sense).
Settings from v21 and earlier can't be read from v22 and up. You must enter them again. The user dictionary can be exported from v21 and imported into v22. Both versions can coexist during this process. This inconvenience will only happen between v21 and newer. Sorry for this, but this change will enable me do to more advanced mods in the future.
v23 has a hires Clicker. You should install it if not using Sense
Source code
Interested in how I do this? I've decided to share the sources for the mod so that the project can live on when I get tired of it. You can study it just for learning or implement your own mods. You are free to do whatever you want with if as long as you buy me a beer
Download source code
Please spend a few hours trying to set it up and figure out some stuff on your own before bombarding me with questions...
Feeling thankful?
Donations are appreciated. Donate here.
Changelog:
Version 25 Highres pre Froyo, High res Froyo, Lowres >= 1.6, Lowres 1.5
Version 24 hires lowres: Fixed: Droid/Milestone/X10 landscape kb broken due to upscaling, Alt. symbol kb. not set correctly on start input, FC on boot when using some locales, Delete last sentence tweaked
Version 23 hires lowres: Fixed: User dictionary broke in v22 due to changed package name. Sorry!
Version 22 hires lowres: New: My own package name, Fast language & keyboard switching by gestures, Settings dialog redesigned, No more .htcime on SD, all is now GUI based, Hires Clicker, Version tracking by aTrackDog. Fixed: Scale landscape KB on Droid/Milestone/X10, Add word dialog now shows kb automatically, FC on show add word dialog in landscape, Proper hires settings icon from Incredible, P and W in phone number keyboard, Workaround for back button bug in xScope browser Option: Configurable gesture actions, Show current language on start, Kill keyboard from settings, Disable voice button also for English, Use phone keypad / compact qwerty symbol kb for QWERTY, Toggle accept dict. suggestion by space, Toggle accept dict. suggestion by separators, Volume keys for dpad up/down, Gesture: Delete last sentence, Move to end of word, Cycle language, Cycle keyboard types
Version 21 hires lowres: Options: Move cursor with volume keys, Move Scandinavian popup chars closer to pressed key Fixed: More swipe detection tuning, Less laggy sound and vibration feedback with swiping enabled, Space insert more robust
Version 20 hires lowres: Options: Swipe up for shift, Swipe while composing a word (dict. showing), Swap Smiley/12# button, Insert word entered in add word dialog into edited text. Fixed: Swiping more robust, Long press on symbol key now working again, Tweaked candidate bar height calculation (Droid 2.1), Improved HTC popup timer when lag is detected (HTC bad design), Android smiley is :-\ and not :-/ , Bug in landscape autocompletion (gmail compose etc.), Autocap issues in certain cases (blame HTC ), Better handling of (pseudo) multi touch events (easier to press space and periods etc. more quickly)
Version 19 hires lowres:Lowres!, Options: Clear user dictionary, Swipe down to hide keyboard, Swipe left to delete last word, Character replacement (can remove diacritic chars), Custom smileys. Changed: Import/export of user dictionary is now threaded, Pipe key added to qwerty symbol keyboard, Fixed voice hack was enabled by default even if disabled in settings
Version 18: Changed: Hid HTC hidden settings again (caused too much trouble). Option: Smiley button instead of hide kb button, Custom vibration length, Toggle smiley dashes. Fixed: User dictionary editor no longer FC's on modaco custom rom, Word candidate bar now works on Droid 2.1
Version 17: Option: Toggle prediction on/off for single line browser forms
Version 16: Fixed: space insertion is now disabled for password fields with compact qwerty & phone keypad, Prediction cache was not emptied in some cases resulting in weird behavior when starting input next time (prediction continued where you left off last input)
Version 15: Fixed URL KB space hack caused FC on slash key in compact qwerty and phone keypad
Version 14: Option: Disable automatic adding to user dictionary, custom popup delay for secondary characters, swipe right for voice input, toggle space insertion after separators, access hidden HTC internal settings (control vibrator etc. TAKE CARE IN HERE!), prediction in URL fields, disable key preview popup. Fixed: cleaned up settings dialog a bit, deleting voice text by back space now works again, space insertion is now always disabled in some fields (browser URL etc. caused problems). New: My own (experimental!) hard keyboard mapping code (enables space in URL for hard KB, removes need for QWERTZ hack etc.), apk version now shows my version instead of HTC's version (smoother upgrades, more logical), Import/export user dictionary, Can now enter any character into user dictionary (HTC just allowed letters and digits)
Version 13: Option: left align word candidate list. Fixed: experimental Droid 2.1 landscape support, more robust period insertion on space double tap, rare FC when moving the candidate list (HTC bug), typing " I'm " with compact qwerty (HTC bug), FC when clicking on disabled T9 toggle button (HTC bug), better compatibility between space insertion and smileys, User dictionary is no longer a pain to manage due to scrolling (consequence of HTC incompetence, learn how to use ListViews and Adapters guys!)
Version 12: Fixed rotation issues in some apps (ie Terminal). T9/ABC setting is now remembered when switching between letter/number views (HTC's bug, not mine)
Version 11: Fixed saving position of word suggestion list (a typo caused the same value to be used for all orientations). Fixed auto cap in browser with physical keyboard.
Version 10: Many new options (see feature list). Fixes: voice input in all keyboards, voice input didn't capitalize correctly, "speak now" dialog showing to early, prediction not showing for passwords anymore, auto capitalization for T9/compact QWERTY now works in browser, smoother movement of word suggestion list, settings button showed "EN" (now scaled icon from lowres), Landscape now works on Droid (with resolution related glitches)
Version 9: Fixed the screwed up enter key in v8. Added experimental voice server settings. For German to work you will have to use the alternative server.
Version 8: Added custom word candidates bar. Fixed wacky SHIFT key. Word candidate list position now remembered. Configurable in settings dialog. Added some Extras to voice input Intent copied from stock KB (missed earlier). One step closer to Droid landscape support.
Version 7: Fixed compatibility with Terminal Emulator in CyanogenMod, KB going haywire in CoPilot and word candidate list shows to low (hid active input field sometimes like in stock messaging app). Lowered android:minSdkVersion from 7 to 3. This could mean stock Droid support, but don't complain when it FC's on Cupcake
Version 6: Tweaks to the sentence auto capitalization code. Should now work in most web browser forms such as the message composer on this forum. Tweaked enter key behavior a bit.
Version 5: Show voice input button for all languages instead of EN button in all keyboards that uses the same layouts as the English ones. To fix this in all other layouts, modding binary XML is required. I need help with that. Voice input seems to use your current locale if supported, and English as fallback.
Version 4: New voice input control logic that doesn't break Google Voice search. Changed voice processing URL from dev server to stock keyboard settings.
Version 3: Fixed FC in User Dictionary editor. Fixed HTC not obeying EditorInfo.imeOption flag flagNoEnterAction (caused two sends in stock messaging app)
Version 2: Fixed FC in user database
Version 1: Initial release featuring language settings hack with .htcime and dictionary support in web browser forms. Tested on N1. Clicker is low res for now.
Old low res:
Version 4: Better support for OpenEclair (at least one reported succes with Dutch on it)
Version 3: Supports Samsung Galaxy/Spica (this version has never been featured on xda)
Version 2: Dictionary support in web browser forms
Version 1: Initial release featuring language settings hack with .htcime
Hi
Is working right on lanscape?
Is this still the pixelated 320 pixel one?
Yes it does work in landscape, although It doesn't cover the whole screen. It's still usable in my opinion. All other versions of HTC_IME has this behavior on nexus. It's because it's designed for lower resolutions. I haven't changed this.
Edit: It's also pixelated due to the higher resolution on Nexus. Maybe we can use something from the upcoming Bravo. Time will tell.
And what about the HD2 skin
Never edited this apk, so i dunno if can be do it
Nice one. thanks for this.
I've been looking for a way to do this.
Since you can't post the link could you please tell me what file I need to change on the cyanogen version so that I can have multiple languages?
I've been paying around with it but wasn't successful.
Thanks
Lou
Swedish user
Works great! Thanks!
I'm still waiting for a mod to approve me as a non spammer so I can post the link
The main edit is done in SIPUtils.smali. This method originally loads languages from htc's customization provider.
.method public static localeLanguagePicker(Landroid/content/ContextI
I have replaced its content entirely. This is where I load the info from .htcime or in it's absence fall back on default values.
The key points here is the variables
Lcom/htc/android/htcime/HTCIMMData;->mSettingsLocaleData:[[Ljava/lang/String;
Lcom/htc/android/htcime/HTCIMMData;->mSettingsLocaleNumber:I
You must populate the array with your languages and set the number correctly.
In Java terms you have for example
Code:
int dims[] = new int[]{19, 2};
String[][] d = (String[][]) java.lang.reflect.Array.newInstance(String.class, dims);
d[0][0] = "English";
d[0][1] = "0";
d[1][0] = "Arabic";
d[1][1] = "14";
mSettingsLocaleData = d;
mSettingsLocaleNumber = 2;
This would give you English and Arabic. localeLanguagePicker must return the current selected language id as int, so you must read that from SharedPrecerences (key is "keyboard_language")
I have also removed a to call ListPreference.setValueIndex from
.method private localePicker
in KeyboardSettings.smali to avoid a FC.
It's complicated to explain in an easy way... I'll pm you the URL for my mod. baksmali it and diff it to cyanogens
This is the link to jonasl's work.
http://www.mediafire.com/file/gonyzgh0i3o/htc_ime_custom_settings.zip
thank you so much for this. I hope you can post this soon because many people have been waiting for this.
MERCI
GRACIAS
THANKS.
can we still use the voice dictation feature (the mic key in the google keyboard) to dictate commands with this apk?
No, there is no such button on the HTC keyboard and I have not added one. I have just fixed the language settings dialog. The keyboard is designed for Hero w. 1.5. voice input doesn't exist on it. Also some people like me don't use speech input so we don't miss it.
It's more like I have restored the original features on non-Hero phones than adding new ones.
Thanks so much! This is what I had been hoping for for a *very* long time.
samawil said:
thank you so much for this. I hope you can post this soon because many people have been waiting for this.
MERCI
GRACIAS
THANKS.
Click to expand...
Click to collapse
I already posted it for everyone since jonasl was not allowed to post links here yet.
So I installed the htc ime and put the .htcime file in the root of my sd, and get the htc keyboard now and can select Swedish as a language but its not like I get "åäö" keys or anything, what exactly is it you're supposed to get with this mod?
Swedish dictionary support. It will work exactly as on stock HTC Hero firmware. Set it to Swedish. Start write a SMS message. Tap in the word "nastan". It will suggest "nästan". To write åäö manually, press and hold a or o and slide to the correct character. This is the way the Hero keyboard works, no more no less.
jonasl said:
Swedish dictionary support. It will work exactly as on stock HTC Hero firmware. Set it to Swedish. Start write a SMS message. Tap in the word "nastan". It will suggest "nästan". To write åäö manually, press and hold a or o and slide to the correct character. This is the way the Hero keyboard works, no more no less.
Click to expand...
Click to collapse
Oh ok, Yeah I used the previous HTC_IME floating around before this and I was hoping for actual buttons, but the dictionary is a welcome addition!
The updated link...
http://www.mediafire.com/file/mmqmjuzorvm/htc_ime_custom_settings2.zip
Updated the mod to enable dictionary prediction in web forms in your browser. I've never seen that working on any HTC_IME before, not even on Hero. If you want that, download and install again. First version is still available in post #9.
when i choose arabic i dont see any arabic letters on the keyboard?!? i did this manually before this post but didnt work for arabic

[XT720] Remapping the Hardware MEDIA button (next to camera button)

hey guys, I want to remap the hardware MEDIA key (the one next to the camera/focus button) on my xt720, but I cannot seem to find it in qwert.kl or any other files. I have successfully remapped any of the 4 touch-sensitive keys (home, menu, back, search) and the camera/focus key as well, but I can't figure out what the media key is. if anyone have any idea please let me know
I want to change the Media key to turn on and off the autofucus LED to use it as a flashlight on off switch.\
This is what i have been able to find so far.\
http://forum.xda-developers.com/showthread.php?t=939644&page=130
Looks promising...
I think this thread should be moved to DEV.
hellmonger said:
I want to change the Media key to turn on and off the autofucus LED to use it as a flashlight on off switch.\
This is what i have been able to find so far.\
http://forum.xda-developers.com/showthread.php?t=939644&page=130
Looks promising...
I think this thread should be moved to DEV.
Click to expand...
Click to collapse
What's strange is that if you look at the qwerty.kl from Motorola for eclair on the XT720 and froyo on the Korean XT720 they are identical--but both MODE_CHANGE and 112 are not included. Dexter's copy with the MODE_CHANGE and 112 comes from the leaked froyo Milestone A85x. They've been on my radar as files that never change and remain constant over all Motoroi and XT720 releases, but that were changed in Dexter's ROM.
Mioze7Ae said:
What's strange is that if you look at the qwerty.kl from Motorola for eclair on the XT720 and froyo on the Korean XT720 they are identical--but both MODE_CHANGE and 112 are not included. Dexter's copy with the MODE_CHANGE and 112 comes from the leaked froyo Milestone A85x. They've been on my radar as files that never remain constant over all Motoroi and XT720 releases, but that were changed in Dexter's ROM.
Click to expand...
Click to collapse
Yeah i noticed that to.... i think that 112 is incorrect. Just some speculation here but i think the issue is in the framework... need to modify it for the correct key to be recognized....
!!!!!REQUEST HERE!!!!!
If anyone is stuck re-flashing original stock 2.1.1 please run this https://github.com/chrisboyle/keytest/downloads
Also please validate if you have /system/usr/keylayout/sholestabletp3str-keypad.kl and paste output of that file.
I think i might be on to something here...
Well, when we set keycode 112 and other action, like media_next e.t.c. we get what action is must do.
fjfalcon said:
Well, when we set keycode 112 and other action, like media_next e.t.c. we get what action is must do.
Click to expand...
Click to collapse
Where you able to get 112 to do anything?
I think I accidentally an important word there. Just to clarify in case of confusion I meant
Mioze7Ae said:
They've been on my radar as files that never change and remain constant over all Motoroi and XT720 releases, but that were changed in Dexter's ROM.
Click to expand...
Click to collapse
in qwerty keymap.
xavwanted do such thing in his mod.
Sent from my XT720 using XDA App
From 2.1 Russian Rom:
Menu key:
Keycode: 82
KeyEvent: KeyEvent{action=0 code=82 repeat=0 meta=0 scancode=139 mFlags=72}
Back key:
Keycode: 4
KeyEvent: KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=72}
Search key:
Keycode: 84
KeyEvent: KeyEvent{action=0 code=84 repeat=0 meta=0 scancode=217 mFlags=72}
Gallery key:
Keycode: 92
KeyEvent: KeyEvent{action=0 code=92 repeat=0 meta=0 scancode=112 mFlags=8}
Camera shutter key:
Keycode: 80
KeyEvent: KeyEvent{action=0 code=80 repeat=0 meta=0 scancode=211 mFlags=8}
Volume Up key:
Keycode: 24
KeyEvent: KeyEvent{action=0 code=24 repeat=0 meta=0 scancode=115 mFlags=8}
Volume Down key:
Keycode: 25
KeyEvent: KeyEvent{action=0 code=25 repeat=0 meta=0 scancode=114 mFlags=8}
Click to expand...
Click to collapse
As we can see - scancode for keycode 92 - 112...
And that sholestabletp3str_keypad
fjfalcon said:
From 2.1 Russian Rom:
As we can see - scancode for keycode 92 - 112...
And that sholestabletp3str_keypad
Click to expand...
Click to collapse
So this sholestabletp3str-keypad.kl is the original from 2.1.1?
Also i would need to get my hands on sholestabletp3str-keypad.bin in /system/usr/keychars/
I love it when a plan comes together
Yes, it's original.
hellmonger said:
So this sholestabletp3str-keypad.kl is the original from 2.1.1?
Also i would need to get my hands on sholestabletp3str-keypad.bin in /system/usr/keychars/
I love it when a plan comes together
Click to expand...
Click to collapse
Here are all the /system/usr/keychars and /system/usr/keylayouts from
SHOLS_U2_02.36.0 (Milestone eclair)
SHOLS_U2_05.26.0 (Milestone froyo)
STR_U2_01.1E.0 (XT720 eclair UK)
STR_U2_04.1E.1 (XT720 eclair US/CBW)
STSKT_N_79.11.39R (Motoroi eclair)
STSKT_N_79.33.50R (Motoroi froyo)
stock221v13 (Dexter froyo)
Mioze7Ae said:
Here are all the /system/usr/keychars and /system/usr/keylayouts from
SHOLS_U2_02.36.0 (Milestone eclair)
SHOLS_U2_05.26.0 (Milestone froyo)
STR_U2_01.1E.0 (XT720 eclair UK)
STR_U2_04.1E.1 (XT720 eclair US/CBW)
STSKT_N_79.11.39R (Motoroi eclair)
STSKT_N_79.33.50R (Motoroi froyo)
stock221v13 (Dexter froyo)
Click to expand...
Click to collapse
PERFECT!!! Ok il get right on this...
OK!
So i am able to get the autofucus LED to light up by pressing the Media key!!!!
.
BUT!
only with the camera app open..
I have to keep it pressed to keep the light on i would need to speak to the guy that wrote that APK for LightXT im sure we could get something going here...
see the problem is basically the app runs the command echo 1 > /sys/class/leds/af-led/brightness and echo 0 > /sys/class/leds/af-led/brighness when pressing the button but more complex. which requires root for some reason. if there is way to map the key to run the command it might work. unless someone can create a script that runs when the button is pressed that has that command. my brother the creator of the app doesnt think its possible to map the key to the light on and off but we can try he has a droid x so he cant really try out things with out me being there.
easye420 said:
see the problem is basically the app runs the command echo 1 > /sys/class/leds/af-led/brightness and echo 0 > /sys/class/leds/af-led/brighness when pressing the button but more complex. which requires root for some reason. if there is way to map the key to run the command it might work. unless someone can create a script that runs when the button is pressed that has that command. my brother the creator of the app doesnt think its possible to map the key to the light on and off but we can try he has a droid x so he cant really try out things with out me being there.
Click to expand...
Click to collapse
So this is great!!!!
make a entry that is something like
IF = echo 0 > /sys/class/leds/af-led/brightness THEN DO echo 1 > /sys/class/leds/af-led/brightness
If = echo 1 > /sys/class/leds/af-led/brightness THEN DO echo 0 > /sys/class/leds/af-led/brightness
Is this possible? i bet extensive framework modification is required...
Maybe making an app that translates the media keys request? some that will read state of /sys/class/leds/af-led/brightness that should be possible!!!!
hellmonger said:
So this is great!!!!
make a entry that is something like
IF = echo 0 > /sys/class/leds/af-led/brightness THEN DO echo 1 > /sys/class/leds/af-led/brightness
If = echo 1 > /sys/class/leds/af-led/brightness THEN DO echo 0 > /sys/class/leds/af-led/brightness
Is this possible? i bet extensive framework modification is required...
Maybe making an app that translates the media keys request? some that will read state of /sys/class/leds/af-led/brightness that should be possible!!!!
Click to expand...
Click to collapse
It should be easy to make a setuid binary that toggles the value each time you press the button. Can you set the button to call a unix binary or do you have to cover it with java?
Mioze7Ae said:
It should be easy to make a setuid binary that toggles the value each time you press the button. Can you set the button to call a unix binary or do you have to cover it with java?
Click to expand...
Click to collapse
Can you map button presses directly to executables? Here's a suid binary that toggles the light. For example, put it in /system/xbin/toggle-af-led and
Code:
chown 0:0 /system/xbin/toggle-af-led
chmod 6755 /system/xbin/toggle-af-led
Then every time you run /system/xbin/toggle-af-led the light will toggle on or off. It shouldn't be too hard to wrap this in the framework if necessary. I had to do that for the extended power controls to create the /cache/.boot_to_or file.
Source
Code:
#include <stdio.h>
#include <unistd.h>
int main()
{
FILE* fid;
char c;
setuid( 0 );
fid = fopen("/sys/class/leds/af-led/brightness", "r");
fread(&c, 1, 1, fid);
fclose(fid);
if (c == '0')
c = '1';
else
c = '0';
fid = fopen("/sys/class/leds/af-led/brightness", "w");
fwrite(&c, 1, 1, fid);
fclose(fid);
return 0;
}
Mioze7Ae said:
Can you map button presses directly to executables? Here's a suid binary that toggles the light. For example, put it in /system/xbin/toggle-af-led and
Code:
chown 0:0 /system/xbin/toggle-af-led
chmod 6755 /system/xbin/toggle-af-led
Then every time you run /system/xbin/toggle-af-led the light will toggle on or off. It shouldn't be too hard to wrap this in the framework if necessary. I had to do that for the extended power controls to create the /cache/.boot_to_or file.
Source
Code:
#include <stdio.h>
#include <unistd.h>
int main()
{
FILE* fid;
char c;
setuid( 0 );
fid = fopen("/sys/class/leds/af-led/brightness", "r");
fread(&c, 1, 1, fid);
fclose(fid);
if (c == '0')
c = '1';
else
c = '0';
fid = fopen("/sys/class/leds/af-led/brightness", "w");
fwrite(&c, 1, 1, fid);
fclose(fid);
return 0;
}
Click to expand...
Click to collapse
OMFG!!!! you rock so hard!!!
Il work on this when i get home
Fiiiiiiiiiiiiiiiiiiiiinally im home!!!!!!!!!!
Ok moar woark!!!
i had an idea... X had previously re-mapped this button to something else... maybe he has an idea....
Im inviting X in on this too

[APP][Honeycomb] SiMi TaskNote 0.9.6 [06.10.2011]

SiMi.TaskNotes is a Note and Task application. It is something like Taskpaper on the iPad.
How it works:
TaskNotes knows about four things: projects, tasks, notes, and tags. As you type, these items are auto-formatted so that your lists are easier to read.
- To create a task, type a line starting with a "-".
- To create a project, type a line starting with "/".
- Any line that isn't a task or project is a note.
- To change a task into a project type "-" at the beginning of a task.
- To change a project into a task type "/" at the beginning of a project.
- To change a task back to a note type "-" at the beginning of a task.
- To change a project back to a note type "/" at the beginning of a project.
- To indent an item tap space when the cursor is at the start of the item.
- To unindent an item tap delete when the cursor is at the start of the item.
- to mark a task as done swipe from left to right on the task.
- to mark a task as undone swipe from right to left on the task.
What's next:
- Portrait support.
- Tags e.g. @home or @work.
- Synchronization with Google Task, Toodledo,...
- Synchronization with SiMi.GTD.
- Send notes by email.
- Searching.
- Filtering.
Version 0.9.5
- Bugfixes
- Search for notes
- Send notes as email
Version 0.9.6
- Portrait support
Market link SiMi TaskNote
Small Video on how it works
Have Fun
Sorry, am I the only one who's being confused terribly by the instructions?
To summarise what you wrote:
- (New) + "-" = Task
- (New) + "/" = Project
- (New) + (nothing) = Note
- Task + "-" = Project
- Project + "/" = Task
- Task + "-" = Note
- Project + "/" = Note
The last 2 lines contradict with the previous 2 lines, as the instructions are the same. I believe it to be a typo? Logically, REMOVING the symbol should turn it back to a Note?
I like how it is implemented, but I believe there are easier ways to achieve the switching of types? Like...
...buttons perhaps?
Great UI btw, keep it improving! =D
FoliathR said:
Sorry, am I the only one who's being confused terribly by the instructions?
To summarise what you wrote:
- (New) + "-" = Task
- (New) + "/" = Project
- (New) + (nothing) = Note
- Task + "-" = Project
- Project + "/" = Task
- Task + "-" = Note
- Project + "/" = Note
The last 2 lines contradict with the previous 2 lines, as the instructions are the same. I believe it to be a typo? Logically, REMOVING the symbol should turn it back to a Note?
I like how it is implemented, but I believe there are easier ways to achieve the switching of types? Like...
...buttons perhaps?
Great UI btw, keep it improving! =D
Click to expand...
Click to collapse
Hi
Not really ...
I made a small video to show how it works. I will post the link when the upload is done.
Have fun
Looks cool, drat, HC only
Oh man I love this app very easy to use when you get the hang of it. One issue though, it force closes when deleting notes. Moto xoom running rooted stock 3.2 rom and kernal . Keep this alive.....!
johnny0911 said:
Oh man I love this app very easy to use when you get the hang of it. One issue though, it force closes when deleting notes. Moto xoom running rooted stock 3.2 rom and kernal . Keep this alive.....!
Click to expand...
Click to collapse
Thanks
New version which some Bugfixes will be available tomorrow.
Have Fun

[GUIDE] How to get good Ctrl and Alt keys in SSH while keeping Fn

Hi folks. I use JuiceSSH. In the current CM settings, it interprets the hardware alt key as an actual console alt. This is nice for changing windows in irssi (Alt+1, Alt+2, ...), but it's not useful for getting at the Fn keys for special characters. It would be nice to have Fn, Ctrl, and Alt, all working. Here's how to get this done:
View this: hxxp://data.zx2c4.com/galaxy-relay-keyboard-map.jpg
The file /system/usr/keylayout/sec_keypad.kl contains correlations of keycodes and keychars. It turns out JuiceSSH interprets ALT_LEFT as console alt, ALT_RIGHT as Fn, and CTRL_LEFT as console ctrl. So in that file, we want to remap ALT_LEFT to ALT_RIGHT, and then remap the MAIL and CHAT keys to CTRL_LEFT and ALT_LEFT respectively:
Code:
key 56 ALT_RIGHT WAKE_DROPPED
key 155 CTRL_LEFT WAKE_DROPPED
key 429 ALT_LEFT WAKE_DROPPED
key 217 META_LEFT WAKE_DROPPED
The full keycode file is available at hxxp://data.zx2c4.com/sec_keypad_modified.kl .
Here's a command listing of how I enable this using adb:
Code:
[email protected] ~ $ adb shell
[email protected]:/ $ su
[email protected]:/ # mount -o rw,remount /system
[email protected]:/ # wget -O /system/usr/keylayout/sec_keypad.kl hxxp://data.zx2c4.com/sec_keypad_modified.kl
[email protected]:/ # reboot
In practice, this thus far works very well.
Remember to change "hxxp" in this post; as a new member of XDA, I'm not allowed to post links.
I don't use JuiceSSH (but I'll definitely try it at some point if only for mosh), so I tried that with the built-in terminal app. By the way I don't know what version of CM 10.2 you're using, but here on the 20130909 nightly I found the kymaps in /system/usr/keylayout and not in /system/usr/keymap.
I didn't remap ALT_LEFT, but did remap 155 to CTRL_LEFT and 429 to META_LEFT like you did. I also remapped 217 to ESCAPE which is very handy in vim. Here's the diff:
--- sec_keypad.kl.orig 2013-09-12 17:55:28.434192677 -0600
+++ sec_keypad.kl 2013-09-12 18:12:08.876521089 -0600
@@ -81,3 +81,3 @@
-key 155 ENVELOPE WAKE_DROPPED
-key 429 CONTACTS WAKE_DROPPED
-key 217 SEARCH WAKE_DROPPED
+key 155 CTRL_LEFT WAKE_DROPPED
+key 429 META_LEFT WAKE_DROPPED
+key 217 ESCAPE WAKE_DROPPED
The ESCAPE works but not the CTRL_LEFT and META_LEFT. The remapping does seem to work since the keys don't do any longer what they used to do. So I'm guessing it's the key compositing that doesn't work.
I'll keep looking.
Calchan said:
I found the kymaps in /system/usr/keylayout and not in /system/usr/keymap.
Click to expand...
Click to collapse
Typo! My bad; fixed above.
Calchan said:
ESCAPE which is very handy in vim.
Click to expand...
Click to collapse
That does indeed seem quite handy. I'm tempted to remap the mic button away from META how it is now (which is a bit useful but not super) and toward escape for vim. Good idea.
Having a working ctrl and alt key for android itself, not just the terminal, is proving invaluable. Ctrl+A, ctrl+C, ctrl+V, alt+left, alt+shift+left, etc -- all really nice to have when editing text.
You will most likely have to recompile the kernel to change those to alt and ctrl keys. The keys are laid out in board-apexq.c and they are mapped with standard linux keycode names from input.h.
Nardholio said:
You will most likely have to recompile the kernel to change those to alt and ctrl keys. The keys are laid out in board-apexq.c and they are mapped with standard linux keycode names from input.h.
Click to expand...
Click to collapse
I didn't have any such problem, and just changed the keycode association in the .kl file.
zx2c4 said:
That does indeed seem quite handy. I'm tempted to remap the mic button away from META how it is now (which is a bit useful but not super) and toward escape for vim. Good idea.
Click to expand...
Click to collapse
Key 214 is indeed the microphone key, and having that mapped to ESCAPE like I did is very handy. What is META used for?
Can you please try the CTRL and ALT keys in the defaut CM terminal and tell me if they work for you? I haven't had time yet to try in JuiceSSH yet, but they don't work in the default terminal here.
cm 10.2
To make the ALT keys work as described in cm 10.2, you need to delete /system/usr/idc/sec_keypad.idc .
I've found a more careful change, submitted here:
hxxp://review.cyanogenmod.org/#/c/53130/
I used your fix to make JuiceSSH working on my Relay (yes i bought one only for the keyboard/ssh - can't do that on my expensive N5)
It looks like the arrow keys are mapped 'backward' and some alt-<combination> keys (like the '.com') arn't working, is this correct?
[edit]
I fixed it (or it has been fixed by updating to a newer nightly of CM11). But I did also remove the 'idc' file as suggested in this thread, by placing it back things seemed to work correctly (the arrow keys)
[/edit]
I also had to edit Generic.kl.
how to edit system files?
I cant do it even though i have root and es file explorer has access to root ;/
help
EDIT:
Got it
Is ADB process required? or can i just reboot ?

How to handle multi-keycode keys on Android with a bluetooth keyboard?

I have a Microsoft Mobile Wedge keyboard. I've connected it to my Nexus 9 and after setting the language in the settings it works almost perfectly. Almost!
There are 4 keys on it that don't work, because they're multi-keycode keys. They're the "magnifier glass"-key, the "3 dots on a ring"-key, the "black rectangle intersecting with rectangle border"-key and the "gears/settings"-key.
So far I've found out with
Code:
getevent -lt /dev/input/event4
that the Linux keycodes they send are
Code:
KEY_LEFTSHIFT
KEY_LEFTMETA
KEY_F21
Code:
KEY_LEFTALT
KEY_LEFTMETA
KEY_F21
Code:
KEY_LEFTCTRL
KEY_LEFTMETA
KEY_F21
Code:
KEY_LEFTMETA
KEY_F21
I've created the 2 files
Code:
/system/usr/keylayout/Vendor_045e_Product_0790.kl
/system/usr/keychars/Vendor_045e_Product_0790.kcm
and made sure with
Code:
dumpsys input
that they're used.
I tried to enable the F21 in the layout first, but that didn't work because there's no Android keycode for F21. So I bound it to INSERT instead, because it's an unused key.
Then I went into the character map and tried making an INSERT key (which is actually F21) and apply the right modifiers to it.
Code:
key INSERT {
base: 'a'
lmeta: 'A'
}
The above being for the key that only had 2 keycodes. Unfortunatley this didn't work. Nothing happened. So now I'm here to pick your brain.
Does anyone know how to do multi-keycode keys?
Thank you very much in advance.

Categories

Resources