The LG Optimus F3Q (D520) is a phone with "Five-Line Slide-Out QWERTY Keyboard with PC-Like Shortcuts" (LG website). Missing from the keyboard however, is the "Ctrl" key. This brief guide shall attempt to show how an arbitrary key may be remapped for it.
Root the phone. Saferoot by k1mu works for this phone, although I found that the phone did appear to hang should one try to reboot or power off using the hardware power button after rooting. Removing and replacing the battery boots up the phone without issue should that happen. Software-based rebooting works fine.
Install your favourite file explorer for root users. ES File Explorer File Manager worked well for me.
On the phone, navigate to the "/system/usr/keylayout" directory.
Make a copy of the "f3q-keypad.kl" file and put it somewhere safe in case you need to revert to it.
Edit the "f3q-keypad.kl" file using a text editor.
Look for the line "key 100 ALT_RIGHT WAKE_DROPPED". This corresponds to the fn key on the right side of the keyboard.
Replace "ALT_RIGHT" with "CTRL_RIGHT".
Exit the file and save. View it again to verify that your changes have been saved.
Reboot.
Try it out. Ctrl-C should work in a terminal emulator.
To have even greater control over the remapping, you would also need to edit the "f3q-keypad.kcm" file in the "/system/usr/keychars" directory.
Note! If you are using connectbot, please obtain at least version 1.8.1 from connectbot at GitHub. Version 1.7.1 of connectbot in the Google Play store did not recognise the Ctrl command when I tried. Thus, it may be possible that some other programs may also not recognise the Ctrl command.
Disclaimer: I mucked around a lot by trial and error as version 1.7.1 of connectbot was tripping me up, so I had changed a lot more things than what I had listed in the steps above. However, looking back at it, I doubt that any other changes I had made were truly necessary.
Helpful stuff:
appelflap has a button remapper app, which I installed, but didn't appear to be able to do what I wanted. However, the KeynrTracker.apk he linked is very helpful should you very quickly want to know which key corresponds to what.
References:
Key Layout Files
Key Character Maps Files
List of Unicode characters
Other thoughts:
I found Link2SD and Foldermount [ROOT] to be indispensible for this phone.
Thanks! I just might try replacing that pesky write and share app key with CTRL...
It would satisfy a request of mine for my F3Q ROM.
EDIT: Downloaded the app. Because pressing the key pushes the app to the background, it won't capture.
Last line of the file though says "WRITE_SHARE". Think I got somewhere.
Sure did, "WRITE_SHARE" now replaced with "CTRL_LEFT", and is working like a charm!
Glad this helped somebody !
joel.maxuel said:
Thanks! I just might try replacing that pesky write and share app key with CTRL...
It would satisfy a request of mine for my F3Q ROM.
EDIT: Downloaded the app. Because pressing the key pushes the app to the background, it won't capture.
Last line of the file though says "WRITE_SHARE". Think I got somewhere.
Sure did, "WRITE_SHARE" now replaced with "CTRL_LEFT", and is working like a charm!
Click to expand...
Click to collapse
Keth Tenderfoot said:
Glad this helped somebody !
Click to expand...
Click to collapse
how to deal with sticky keys?
Polish keyboard mapping on F3Q
Hi, I'm sharing my .kcm and .kl files of the F3Q used with the Polish characters mapped to the respective keys.
(Note to the German users of F3Q: you might edit my f3q-keypad.kcm file ,and map your äöüß characters to the aous keys, if you feel like having your language version of the mapping.)
Keyboard allocation modifications:
SEARCH key mapped to TAB
WRITE_SHARE key mapped to CTRL_LEFT
ALT_RIGHT key mapped to CTRL_RIGHT
PL layout: [ęąółżźćń] mapped on ctrl+[eaolzxcn]
PL layout: [„] mapped on ctrl+[k]
PL layout: [”] mapped on ctrl+[,]
The files have to replace /system/usr/keychars/f3q-keypad.kcm and /system/usr/keylayout/f3q-keypad.kl respectively to be active.
Hallo Pruszków,
Thanx for your polish Keymaps, great work!!!
At the moment I try to modfy them to German. It works fine so far, but now my question is, how can I use the right "fn" key (which is the new ctrl/alt key) without pressing at the same moment as the vowel/consonant, which I want to modify? With the left "fn" key I can first press the button, then release it and it holds its function.
Do you know what I mean?
Would be fantastic, if there is a solution too!
Best regards & dziękuję,
sÖren
fn/alt or ctrl?
Hi Sören,
Thanks for sharing your feedback. I'm glad my stuff could be of some help to you!
spacemoere said:
how can I use the right "fn" key (which is the new ctrl/alt key) without pressing at the same moment as the vowel/consonant, which I want to modify? With the left "fn" key I can first press the button, then release it and it holds its function.
Click to expand...
Click to collapse
Well, the "fn" labeled key was originally associated with the "alt" behavior. The "alt" keeps its mode when you press and release it. But I mapped the right "fn" to the "ctrl" bahavior, and... "ctrl" works just when you press and hold it. So, what to do in your case?
You might get back to the original "fn' mapping (in the .kl file) and keep the right "fn" as "alt", and then define äöüß (in the .kcm file) in combination with "alt" instead of "ctrl".
But...
there is a challenge with the special characters already mapped to the keys. E.g. let's take the key "u". Originally "alt" and "u" prints "+". When you'd map "alt" and "u" as "ü" then you'd loose any possibility to get "+". I have no good idea how to resolve that well. Maybe you'd map "+" to: "ctrl" and "u"? Then you'd use "ctrl" only from the key 59 (CTRL_LEFT), as the key 100 you'd map back to ALT_RIGHT.
The bottom line is: you'd need to choose between "alt" and "ctrl" stuff when deciding your settings.
In my case I took "ctrl" for my Polish mapping, as I'm used to press and hold the "fn" to print the Polish characters. If you're used to press and release, to print a German character, you might consider using "alt" instead.
I hope this helps.
Tschüs,
Bernard
Remapping IME
Thank you for the post Keth, very easy explained.
I am wondering about modifying not the standard character map, but the LG Keyboard IME.
I could not find any alternative input method with a good support for physical keyboard and good dictionaries, so I thought it may be better to modify the included input method than using a different one, correct me if I am wrong.
So I extracted the LGEIMEbin.apk from the system/apps directory, and opened it on the computer to figure out how to modify it.
Keyboard layout are saved in XML, so I supposed it should be easy to modify with a text editor like Notepad++, and just say for every key or combination of keys what kind of character do I want.
Well, I was wrong, as the xml do not contain any clear structure that is in any way possible to understand as it was for f3q-keypad.kcm and f3q-keypad.kl.
I tried to open all kind of xml files included in the LGEIMEbin.apk, and all of them presented non recognised characters, as you can see in the picture that can be found at this address:
img4web.com/i/D3RC42.png
Has anybody any hint of why notepad++ does not recognise those characters and how could I correctly visualise them?
Related
uim trying to change my location on titanium weather but i dont know how to put the "|" vertical line between the words NAM|MX|MX005|MONTERREY
pls help
On the bog standard WM keyboard, its on the numbers page. Press the '123' button in the top left, and its in the left-hand block of characters.
Also for future refrence "that |" is called a pipe.
and on a standard keyboard is located above the enter key and can be accessed with "shift \" minus the quoates.... and on your fone as the other poster mentioned.
HTH
later
Rich
jez83uk said:
On the bog standard WM keyboard, its on the numbers page. Press the '123' button in the top left, and its in the left-hand block of characters.
Click to expand...
Click to collapse
thanks, but i have a HTC xcalibur and didnt have a keyboard on the screen, it have a qwerty keyboard :S
had the same problem, what i did was use my desktop computer to create the string, then saved it as a txt file, loaded onto pda then did a copy/paste
hope this helps!
Press the camera button as has secondary function SYM
stylez said:
Press the camera button as has secondary function SYM
Click to expand...
Click to collapse
OMG!!! thxxxx this works!!!
+10
its just pressing the "Cap" then "Camera Button"!!!
Hi All,
In my old XDA the keyboard had a CTRL key which was so easy to cut and paste but the HD2 keyboard is very cumbersome when copying and pasting.
Anyone has suggestion for an alternative keyboard app?
Cheers.
Wolfy
Just press and hold your finger on the text and you will get a pulldownmenu with the commands "copy" and "paste". This is the only way, i know.
Thanx mate..... but I know this function but sometimes it's so hard to highlight the text and then try and copy/cut as soon as I put my finger again on the same place the highlighted text get cleared as the system kind of recognises as I dont want the selection ......sometimes it does work I have to admit but most of the time it doesnt and i just like using teh CTRL function as its kind of neat (thats my understanding) ..... anyone has any alternatives????
wolfyx said:
Thanx mate..... but I know this function but sometimes it's so hard to highlight the text and then try and copy/cut as soon as I put my finger again on the same place the highlighted text get cleared as the system kind of recognises as I dont want the selection ......sometimes it does work I have to admit but most of the time it doesnt and i just like using teh CTRL function as its kind of neat (thats my understanding) ..... anyone has any alternatives????
Click to expand...
Click to collapse
You can use FingerKeyboard for this. You can select text by pressing the 'shift' key and then select the text with the arrow buttons. When you have the right selection, you can copy this by pressing 'shift' and then X. To paste press 'shift' and then V. Even shift-Z and shift-X works, exactly the way it does on a normal keyboard. I use it very much.
wolfyx said:
Hi All,
In my old XDA the keyboard had a CTRL key which was so easy to cut and paste but the HD2 keyboard is very cumbersome when copying and pasting.
Anyone has suggestion for an alternative keyboard app?
Cheers.
Wolfy
Click to expand...
Click to collapse
I use tweak no. 40 http://forum.xda-developers.com/showthread.php?t=583638
which facilitates copy and paste text.
lucbosch said:
You can use FingerKeyboard for this. You can select text by pressing the 'shift' key and then select the text with the arrow buttons. When you have the right selection, you can copy this by pressing 'shift' and then X. To paste press 'shift' and then V. Even shift-Z and shift-X works, exactly the way it does on a normal keyboard. I use it very much.
Click to expand...
Click to collapse
ok, and how can i then replace the selected text with a capital "V" (when shift-v is the shortcut for paste, which is ctrl-v on a pc) ?
hebbe said:
ok, and how can i then replace the selected text with a capital "V" (when shift-v is the shortcut for paste, which is ctrl-v on a pc) ?
Click to expand...
Click to collapse
I'm sorry, I was wrong. You have to press shift and hold (!) the Z, X, C or V button. When you press shift you also see the caption of buttons change. Above the Z you can see 'undo', above the X 'cut' and so on...
Swype has a dedicated copy and one for paste in the symbols/edit section
Thanx for the feedback ....i'm going to try these but i just wish i could have that ctrl button.........hehehe
try swype is much better than the default kb
These are basics features of TouchPal :
Copy, paste, text selection, selec all, home, end, page up & down, etc...
wolfyx said:
Hi All,
In my old XDA the keyboard had a CTRL key which was so easy to cut and paste but the HD2 keyboard is very cumbersome when copying and pasting.
Anyone has suggestion for an alternative keyboard app?
Cheers.
Wolfy
Click to expand...
Click to collapse
Try VNKeyb v2.2.0 of hanoiwap here:
This one works perfectly. Thanks.
In my previous HTC, Touch Pro2, there is a Ctrl key, but on HTC 7 PRO I cannot see it. If there is a way to map such Ctrl key? I need to use it
1.) why do you need the key?
2.) there is actually no ctrl-key and you won't be able to map it do any other.
keymap could be modified on rhodium
http://forum.xda-developers.com/showthread.php?t=538228
Suppose something similar could be digged. have no wp7 at the moment though.
hope to read of android working and smoothly on 7pro :=) unless a cool qwerty is released for android, maybe 4.3"
exilkubaner said:
1.) why do you need the key?
2.) there is actually no ctrl-key and you won't be able to map it do any other.
Click to expand...
Click to collapse
Hi all,
I had the same thought.
The benefit of the Control key (for my usage):
- press CONTROL + BACKSAPCE to delete a whole word at a time (rather than single letters
- using the arrow buttons + CONTORL makes copying text much easier, that way you don't have to get onto the touch screen (useful on long emails etc)
- much easier to copy & paste just using the keyboard, like on your normal keyboard
It would be great to have the Control button or have the same function somehow else.
BGM said:
Hi all,
I had the same thought.
The benefit of the Control key (for my usage):
- press CONTROL + BACKSAPCE to delete a whole word at a time (rather than single letters
- using the arrow buttons + CONTORL makes copying text much easier, that way you don't have to get onto the touch screen (useful on long emails etc)
- much easier to copy & paste just using the keyboard, like on your normal keyboard
It would be great to have the Control button or have the same function somehow else.
Click to expand...
Click to collapse
I use to do the same thing. Feel lost without it. I know it can still be done by dragging your finger. Though to me... its not with the same ease. I dont know how they could possibly think an emoticon button is more crucial :S Its a business phone ffs!
I use the SK4G physical keyboard very often. I couldn't find a way to delete a letter from left to right just like on the pc keyboard. The del key on the SK4G keyboard work like the backspace key on the pc keyboard.
I really need to find a way to delete text from left to right instead of having scroll to the end of a word in order to delete a letter.
Thanks for your help,
Hieu
on old sidekicks (Danger OS) it was Shift+Del. That has been removed and now both Del & Shift+Del function as a Backspace key.
Alt+Del functions as Delete Entire Line
I would like this, too.
Edit Aug, 16: I have found out that the XT9 subsystem is used for specifically our docking stations. If you go to Settings -> Languages & Input -> ASUS Keyboard -> About, you'll see the big stupid XT9 icons. Therefore, our keyboards have to be using the XT9 database files and the only way to procure different languages seems to be via ASUS (that's what Nuance's site said anyway). The manipulation of the keyboard dock layout mentioned below seems to be our only way until 1) we procure these additional language files from a different source (might require tweaking), 2) someone with an XT9 license makes the files for us, 3) we find an editor that we can use to create / edit the XT9 files, or 4) we find out how to rework the keyboard framework to use different altogether.
Because of the way our system uses the XT9 subsystem, the JB keyboard update itself won't help us. Officially, it all depends on what ASUS gives us to enable additional langs/layouts for our keyboard docks.
---- Original
All right. Here is what I have collected thus far regarding the way that Androids handle keyboard layouts. I put it here in development as I'm sure only the people in this area would really have an interest/use for it. As I still have yet to satiate my own curiosity and preference for a different keyboard layout, I do hope that somehow someone can figure out how to get us proper alternative keyboard layouts.
----
Our keyboard layouts are spread into 2 separate data form categories: the buttons and the characters. The buttons are the real buttons (physical keyboard or virtual) that have a specific numerical identifier. The characters are the glyphs and their various states that can occur when using character modifier buttons (shift, control, alt, etc) when the associated key number button is pressed.
All of these values are found in "/system/usr" with those found in the "keychars" directory being for the glyphs and the "keylayout" for the arrangement of button number with associate character represented. Both types of files (".kcm" for characters and ".kl" for layours) are really just text documents and seeing the association between the two is easy during comparison:
Example: 'A'
in the "Generic.kcm", it is defined as
Code:
key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
ctrl, alt, meta: none
}
while in the "Generic.kl", it is defined as
Code:
key 30 A
Therefore, Key 30 is Mapped to Key 'A' that can have the states 'a' or 'A'.
Unfortunately, these two files that constitute a layout are combined in the XT9 subsystem and not totally used "as is". There is a configuration text file for the XT9 database that can be found at "/system/usr/xt9/config/databases.conf" and in there you can see mappings of languages to database files (also note that all are derived from QWERTY format). You'll notice that the databases are of type ".kdb", ".ldb", or ".dat". A quick search on the 'Net will tell you that the ".kdb" is a keepass file and ".ldb" is a Microsoft Access file. These are wrong! I suspect they are both the same file type but I do not know of what type they are so I cannot view nor edit them. I have tried the "suggested" programs and I tried SQLite since that format is used for our "registry". I'm thinking that they might be T9 database files but I haven't found an editor to even verify that hypothesis.
The organization used to create our layouts is highly flexible and therefore really complex. There's some type of combination of format + language that is calculated in order to determine the correct layout to use. No wonder ASUS (and practically everybody else) has limited keyboard layouts. Additionally, this scheme also controls the majority of our hardware keyboard buttons as well.
For the physical keyboard dock, we have direct ways of manipulating the hotkeys or brute-forcing the layout within our grasp. The hotkeys are somehow contained in our "/system/app/keyboard.apk" and for the basic layout, all we really need to do is modify the "asusdec.kl" to shoehorn our preferences into the system.
An example to test if you want a DVORAK keyboard layout is to copy & paste this into the asusdec.kl and restart (back up the file first!) and it should now be in DVORAK format (though it will not be selectable from the menu). Same thing for the "Generic.kl" - edit the chars associated with the key numbers and the buttons will change values. I do not recommend this method as it is hacky/evil/dirty/bad and all sorts of other negative adjectives. However, until a better way is found, it may be our only real way of modding the keyboard the way we want.
I humbly ask if there are any of our beloved geniuses with further knowledge on how this system to please post additional information here in hopes that maybe we may create better keyboard options for our devices.
Thanks for reading
PS: Found out that Jelly Bean will have additional keyboard layouts. From this thread, "Android 4.1 includes 27 international keymaps for keyboards, including Dvorak." That's a good thing.
Wow, thanks. The information you've provided, is really helpful, and well layed out.
Sent from my EVO using Tapatalk 2
LMMT said:
Wow, thanks. The information you've provided, is really helpful, and well layed out.
Sent from my EVO using Tapatalk 2
Click to expand...
Click to collapse
I'm glad that you think so though I don't know how helpful this post will actually be. This is a rare topic to find information on and even rarer to find information that is directly useful. However, I hope that the information I provided would be at least enough to give us a direction when/if development for keyboard layouts start.
Maybe I'll go over to the Prime forums later to read up further on any advancements they have made.
alienedd said:
Edit Aug, 16: I have found out that the XT9 subsystem is used for specifically our docking stations. If you go to Settings -> Languages & Input -> ASUS Keyboard -> About, you'll see the big stupid XT9 icons. Therefore, our keyboards have to be using the XT9 database files and the only way to procure different languages seems to be via ASUS (that's what Nuance's site said anyway). The manipulation of the keyboard dock layout mentioned below seems to be our only way until 1) we procure these additional language files from a different source (might require tweaking), 2) someone with an XT9 license makes the files for us, 3) we find an editor that we can use to create / edit the XT9 files, or 4) we find out how to rework the keyboard framework to use different altogether.
Because of the way our system uses the XT9 subsystem, the JB keyboard update itself won't help us. Officially, it all depends on what ASUS gives us to enable additional langs/layouts for our keyboard docks.
Click to expand...
Click to collapse
I've already contacted ASUS regarding is_IS layout and they will not support it, so I would not hope for much change there. It would be great if ASUS would release some kind of remapping tool so we could map the keys correctly ourselves.
I'll be keeping a close eye on this thread, and will post if I find something interesting.
Okay, after googling a bit I found an app called External Keyboard Helper Pro that allows me to enable my layout perfectly on the dock.
I'd recomend people seeing if it has their layout of choice.
Edit: There is a thread here on xda: http://forum.xda-developers.com/showthread.php?t=1541916
Doing these changes after JB
alienedd said:
...
Example: 'A'
in the "Generic.kcm", it is defined as
Code:
key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
ctrl, alt, meta: none
}
while in the "Generic.kl", it is defined as
Code:
key 30 A
Therefore, Key 30 is Mapped to Key 'A' that can have the states 'a' or 'A'.
...
PS: Found out that Jelly Bean will have additional keyboard layouts. From this thread, "Android 4.1 includes 27 international keymaps for keyboards, including Dvorak." That's a good thing.
Click to expand...
Click to collapse
I had modified the .kcm and .kl files in ICS and had successfully mapped Bluetooth->Mute to be F1-F12 while allowing Caps lock (when on ) to restore those buttons to their original function. I had also modified the Lock and Wireless buttons to function as Delete and ESC respectively. I had made a few other changes as well. After updating to Jelly Bean I made a backup of the new files that had overwritten my edits and then recopied my edits over the new files and rebooted. The edits no longer worked at all and most of the keys I had made changes to now did nothing. I then tried to restore the backups of the files I had changed and then rebooted but nothing changed even though they were seemingly back in their original configuration. Does anyone have any clue as to what might have happened?
Also, anyone else have any success in JB in changing their layouts?
daerwynn said:
I had modified the .kcm and .kl files in ICS and had successfully mapped Bluetooth->Mute to be F1-F12 while allowing Caps lock (when on ) to restore those buttons to their original function. I had also modified the Lock and Wireless buttons to function as Delete and ESC respectively. I had made a few other changes as well. After updating to Jelly Bean I made a backup of the new files that had overwritten my edits and then recopied my edits over the new files and rebooted. The edits no longer worked at all and most of the keys I had made changes to now did nothing. I then tried to restore the backups of the files I had changed and then rebooted but nothing changed even though they were seemingly back in their original configuration. Does anyone have any clue as to what might have happened?
Also, anyone else have any success in JB in changing their layouts?
Click to expand...
Click to collapse
No i'm in the same position you are in i managed to edit my kcm file exactly how i wanted it for ICS but now i have "upgraded" to JB and the changes have been lost it appears JB does not use the files in the XT9 folder at all and i cannot find out how to edit it with JB!!! Very frustrating.
All i want is the backslash key to be a backslash in UK "mode". It is producing a # unless i change modes which is very annoying each time i want it. Wondering if there is any other solution than to downgrade back to ICS?
Please help us someone!
Thanks