[Tutorial] Enable SoftKeys and Disable Soft Touch Keys - LG Optimus G (International)

Requirements:
-Root
-ArtMod v5.1 http://forum.xda-developers.com/opt...om-e97520a-eu-4-4-2-artmodv3-0-te-10-t2811342
-SoftKey Enabler https://play.google.com/store/apps/details?id=com.fatedevgroup.softkeyenabler&hl=it
-A File Manager(for fixing taskmanager FC and modify keylayout)
-TaskManager Apk . (Link Below).
Steps:
- Go to settings and disable key illumination.
-With SoftKeyEnabler enable SoftKeys without rebooting..not necessary.
-To disable the hardware keys go to /system/usr/keylayout and modify keypad_8064.kl file by adding "#" on the last 3 lines.
Should look like this :
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER WAKE
#key 139 MENU VIRTUAL
#key 158 BACK VIRTUAL
#key 172 HOME VIRTUAL
-To fix taskmanager FC you will have to download the app(link below) and copy it to system/app and fix permission.
-Enjoy.
ps: maybe there are better methods but this is the way i did it..
ps2: my first tutorial ..:good:
BUG : softkeys settings don't work..need for some one to fix. Not a big deal.Keys work fine without it.
Taskmanager link :
http://click.xda-developers.com/api...| Optimus G | XDA Forum&txt=LGTaskManager.apk

Sorin90 said:
Requirements:
-Root
-ArtMod v5.1 http://forum.xda-developers.com/opt...om-e97520a-eu-4-4-2-artmodv3-0-te-10-t2811342
-SoftKey Enabler https://play.google.com/store/apps/details?id=com.fatedevgroup.softkeyenabler&hl=it
-A File Manager(for fixing taskmanager FC and modify keylayout)
-TaskManager Apk . (Link Below).
Steps:
- Go to settings and disable key illumination.
-With SoftKeyEnabler enable SoftKeys without rebooting..not necessary.
-To disable the hardware keys go to /system/usr/keylayout and modify keypad_8064.kl file by adding "#" on the last 3 lines.
Should look like this :
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER WAKE
#key 139 MENU VIRTUAL
#key 158 BACK VIRTUAL
#key 172 HOME VIRTUAL
-To fix taskmanager FC you will have to download the app(link below) and copy it to system/app and fix permission.
-Enjoy.
ps: maybe there are better methods but this is the way i did it..
ps2: my first tutorial ..:good:
BUG : softkeys settings don't work..need for some one to fix. Not a big deal.Keys work fine without it.
Taskmanager link :
http://click.xda-developers.com/api...| Optimus G | XDA Forum&txt=LGTaskManager.apk
Click to expand...
Click to collapse
man i have g2 headset which have 3 buttons but there is only play button can work so could you make work other buttons from g2 kernel??

Hmm i have no idea xD
Sent from my LG-E975 using XDA Free mobile app

The headset is probably one of the vendor things in /keylayout... dig around and report back in what you find!

hey there, nice trick if I wanted to disable a soft touch key in the bottom? I'm trying to insert # symbol in generic.kl file and external_kbd.kl at 139, 158 and 172 lines but doesn't work, any idea?

Gal3onn said:
hey there, nice trick if I wanted to disable a soft touch key in the bottom? I'm trying to insert # symbol in generic.kl file and external_kbd.kl at 139, 158 and 172 lines but doesn't work, any idea?
Click to expand...
Click to collapse
Did you reboot?
Sent from my LG-E975 using XDA Free mobile app

Of course
Sent from my LG-E975 using XDA Free mobile app

Awesome

Related

Remap Home key to open Voice Command 1.6

Can anyone help me remap the home key so it opens VC 1.6. Right now when I press it it opens voice speed dial not VC 1.6.
ch8 said:
Can anyone help me remap the home key so it opens VC 1.6. Right now when I press it it opens voice speed dial not VC 1.6.
Click to expand...
Click to collapse
Which ROM are you running on your device.....?
I am running the rogers WM6 rom
Remap
ch8 said:
I am running the rogers WM6 rom
Click to expand...
Click to collapse
Try to find this download {eT9 Excalibur.0409.Kmap}, I believe this is what you need! Just copy to the Windows folder..................!
Thanks I did d/l the file but I have no idea how to make voice command launch since they are using program codes here.
//
// N O T E: This file must be saved as Unicode
//
// This file contains the virtual keys mapping table for the
// Excalibur device. The mapping table is define as follow
//
// VK_TPOUND = 0x78
// VK_TSTAR = 0x77
// VK_TAB = 0x09
//
// We do not support escape value yet. So the key/char values should be
// entered explicitly or by encoding start with 0x
//
// Format:
// {VK VK' CH1 CH2}
// VK -> value from keyboard driver
// VK' -> printed on keys
// CH1 -> symbols produced by Fn + key
// CH2 -> symbols in 123 mode
// KeyIndex -> matched the kdb key index, 0xff -> no key index
{Q Q % % 0x00}
{1 W 1 1 0x01}
{2 E 2 2 0x02}
{3 R 3 3 0x03}
{T T + + 0x04}
{Y Y ( ( 0x05}
{U U ) ) 0x06}
{I I - - 0x07}
{O O _ _ 0x08}
{P P " " 0x09}
{0x78 A # # 0x0a} // VK_TPOUND maps to Device Button A
{4 S 4 4 0x0b}
{5 D 5 5 0x0c}
{6 F 6 6 0x0d}
{G G / / 0x0e}
{H H ? ? 0x0f}
{J J @ @ 0x10}
{K K $ $ 0x11}
{L L = = 0x12}
{0x77 Z * * 0x13} // VK_TSTAR maps to Z
{7 X 7 7 0x14}
{8 C 8 8 0x15}
{9 V 9 9 0x16}
{B B ' ' 0x17}
{N N & & 0x18}
{M M ! ! 0x19}
{0xBC , ; ; 0xff} // 0xBC = VK_COMMA
{0xBE . : : 0xff} // 0xBE = VK_PERIOD
{0 0x09 0 0 0xff} // 0x30 = VK_TAB
{0xE9 0xE9 0xC1 0xC1 0xff} // Launch Camera with Fn
Copy To The Windows Folder
Copy the download to the Windows folder,don't take the download out of the package leave the download in the package, just copy it to the Windows folder, soft reset the device.
Actually, this is an interesting topic in itself, i.e. remapping the long-press (aka. press-and-hold) functionality of the HOME key. For example, I'd like to change it to be something completely different (perhaps the VITO AudioNotes recorder, for example), and it doesn't look like this can be achieved from fiddling with the keymap (kmap) file.
On the some smartphones, the long press of the HOME key can be tweaked by simply replacing the default application that gets loaded by tweaking the appropriate registry key. For example, on the Motorola Q, the long-press of the HOME key brings up the quickapp.exe (i.e. the "quick list" that seems to come up on my T-Mobile Dash w/WM6 when I quickly press the Power button). So, if I had a Motorola Q, all I'd need to do was go to:
HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Rai\:MSQuickApp\1
and replace quickapp.exe with something else.
I just can't figure out the right place to tweak things for my Dash. All I know is that now when I press-and-hold the HOME key it brings up the Voice Recorder. I can't even find where the Voice Recorder program is stored... it's link file (.lnk) in the Start Menu contains:
22#:MSTNOTES?:notesapp
And I can't seem to find any reference to notesapp (either in the \Windows directory -- e.g. no notesapp.exe or notesapp.lnk, nor in the registry).
My only hint was to look under HKLM\Software\Microsoft\Shell\Rai\:MSTNOTES
but there I found that it was referencing ":MSPOUTLOOK notes"... Another mystery to me. It feels like I'm going through magic rabbit holes like Alice in Wonderland, that lead to nowhere...
Anyone with some further insights on this?
Remap Home key for Voice Command
Will the above keymap change the rest of my keys? I don't know how to read those things, so I can't just create my own keymap by changing that one line.
For me holding the Home key launches Voice Command. Do you have App3 selected as the voice Button? Do you have voice command enabled. I am using an s621 with the Rogers WM6 ROM.

How can I get back deleted "Settings"

Accidentally I deleted the "Settings" Icon in Program Launcher. How can I get it back? It doesn't appear in the Program List. And for tweaking the registry I needed the actual name of the settings application.
Anyone knowledgeable?
Hi, I almost deleted mine when tweaking start menu icons
You need to edit/change following registry keys:
HKLM\Software\HTC\Manila\ProgramLauncher
there find subkey number corresponding to Your icon (0=Top left, 1=Top Midle, 2=Top Right, 3=Next row left column...).
For command Settings You need to edit these Keys:
- Command = "--switchtopage Manila://settings.page"
- DispName = "Settings"
- IconPath = "\windows\HTC\Assets\Images\programlauncher\Program_icon\settings_88.qtc"
- Path = "\Windows\manila.exe"
ChAr
Thanks, you saved my day!
char said:
Hi, I almost deleted mine when tweaking start menu icons
You need to edit/change following registry keys:
HKLM\Software\HTC\Manila\ProgramLauncher
there find subkey number corresponding to Your icon (0=Top left, 1=Top Midle, 2=Top Right, 3=Next row left column...).
For command Settings You need to edit these Keys:
- Command = "--switchtopage Manila://settings.page"
- DispName = "Settings"
- IconPath = "\windows\HTC\Assets\Images\programlauncher\Program_icon\settings_88.qtc"
- Path = "\Windows\manila.exe"
ChAr
Click to expand...
Click to collapse
just a quick question - could this be a way you could edit those 'LOCKED' icons? i would really like to move some of those around - say having my tomtom up the top etc... i havent found a way round this as yet... :-S
Remove Locked Start Menu / Programs tab Items
Free up the start menu / Programs Tab icons that are there by default and not removable you need to change (Thanks Mallman)
Code:
HKLM/Software/HTC/Manila/ProgramLauncher/0/IsReadOnly
HKLM/Software/HTC/Manila/ProgramLauncher/1/IsReadOnly
HKLM/Software/HTC/Manila/ProgramLauncher/2/IsReadOnly
HKLM/Software/HTC/Manila/ProgramLauncher/3/IsReadOnly
Change this value from 1 to a 0 and you can then edit their shortcuts.
radak23 said:
... i havent found a way round this as yet... :-S
Click to expand...
Click to collapse
*rolls eyes* it's in the wiki and it's in the sticky on this forum...

Tilt2 PTT button Remap

I am looking for someone who still has the stock ATT rom to give me some information so I can attempt to remap the PTT button for MS Voice Command. I have keyboard config installed, but so far I have not had much luck getting it to work the way I want it.
If someone could be so kind, I need the following information. With a registry editor, goto:
HKLM\Software\Microsoft\Shell\Keys
Please include all the entries under that section. They should look something like this. They will be label with codes like 40C6,40C7...etc
Code:
(default) "path to your program in quotes"
dword: BtnWnd value=0
dword: Flags value=0
string: Name value=Button 6
string: ResetCmd value "path to your program in quotes"
string: WndCls LEAVE BLANK
just go into settings, buttons, and set push to talk as voice command. it lets you do that on the stock rom.
I use AE Buttons. It will let me use a single click for "ok/close" and a long press for voice command.
The Jack of Clubs said:
just go into settings, buttons, and set push to talk as voice command. it lets you do that on the stock rom.
Click to expand...
Click to collapse
The ROM I use does not have those buttons mapped under the buttons config. That is why I would like the registry entires so I can add them.
Pops_G said:
I am looking for someone who still has the stock ATT rom to give me some information so I can attempt to remap the PTT button for MS Voice Command. I have keyboard config installed, but so far I have not had much luck getting it to work the way I want it.
If someone could be so kind, I need the following information. With a registry editor, goto:
HKLM\Software\Microsoft\Shell\Keys
Please include all the entries under that section. They should look something like this. They will be label with codes like 40C6,40C7...etc
Code:
(default) "path to your program in quotes"
dword: BtnWnd value=0
dword: Flags value=0
string: Name value=Button 6
string: ResetCmd value "path to your program in quotes"
string: WndCls LEAVE BLANK
Click to expand...
Click to collapse
KEYS
40c1
-default: "\Windows\Voice Command.lnk"
-Flags: 0 (DWORDecimal)
-Icon \windows\voicecmd.exe, 0
-Name Send key(Hold)
-ResetCmd "\Windows\Voice Command.lnk"
40C5
-BtnWnd 0 (DWORDecimal)
-Default "\Windows\Start Menu\Programs\Push to Talk.lnk"
-Flags 0 (DWORDecimal)
-Icon \Windows\PTTMgr.exe, 0
-Name PPT Button
-ResetCmd "\Windows\Start Menu\Porgrams\Push to Talk.lnk"
-WndCls

mapping keys (recentapps, application) in keyboard layout file

I am trying to map the recent apps and applications key on samsung bluetooth keyboard to teh recnet apps and apps buttons, just like the app_switch capactive button. The Home button and back button the the physical keyboard already work. Following the below guide, one would modify /system/usr/keylayout/Generic.kl with relevant scan codes
Code:
#http://www.thriveforums.org/forum/toshiba-thrive-development/9626-how-create-customized-keylayout-any-usb-bluetooth-keyboard-rooted.html
#/system/usr/keylayout/Generic.kl
key 704 RECENTAPPS
key 705 APPLICATION
and save the file as /system/usr/keylayout/Vendor_04e8_Product_a006.kl, where the keyboard's vendor and product id are found by
Code:
cat /proc/bus/input/devices
; on my device this gets the following
I: Bus=0005 Vendor=04e8 Product=a006 Version=0001
N: Name="Samsung Bluetooth Keyboard EJ-CT800"
P: Phys=
S: Sysfs=/devices/virtual/misc/uhid/input11
U: Uniq=
H: Handlers=sysrq event11 sec_debug
B: PROP=0
B: EV=12001b
B: KEY=147 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10003 2010007 ff9f317a c14057ff febeffdf ffefffff ffffffff fffffffe
B: ABS=ffffff00 0
B: MSC=10
B: LED=1f
However, this does not work; niether does copying the appropriate keylayout file Vendor_04e8_Product_a006.kl directly from samsung stock rom, which shows the key scancoes above. Instead, it seems some people got it working by changing the source code related to whievever key code you desire and compile android.policy.jar ike this:
evilisto said:
platform/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
from :
Code:
} else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
if (down && repeatCount == 0) {
showOrHideRecentAppsDialog(RECENT_APPS_BEHAVIOR_SHOW_OR_DISMISS);
}
return -1;
}
to :
Code:
} else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
if (down && repeatCount == 0 && !keyguardOn) {
try {
mStatusBarService.toggleRecentApps();
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
}
}
return -1;
}
Click to expand...
Click to collapse
It seems simple enough, but i am not compilng yet; it would be useful to have this for cm roms, but not sure about compatibility with different rom versions (i.e., cm-11, 12, 13, 14); if someone builds this, perhaps comment on this... thanks
would someone like to compile this and try, as i'm sure a lot of people have this keyboard? :laugh:
err, found my error with the recentapps button; making it app_switch instead of recentapps makes it work, so it only remains to make the application button, which opens the app drawer. i ohpe this interests somebody, but if not whatever
I have the same issue. I guess it's a rom compatibility thing. My Samsung Bluetooth keyboard works fine except for recent apps key (F2) then F3 and F4 don't work as in when you hit those keys, nothing happens at all. I hope we can find a workaround for this.
Same issue here as well.
I am using as well the Original keyboard of tab s (EC-JT800) with aicp ROM 7.1. (preatty good i would say) but there are several issues with the hardware keyboard like:
change between 2-3 languages (no keyboard mapping)
app switching (F2) and app drawer (F3) buttons are not working
caps lock light not turn on
lang does nothing
etc.
I have tried another ROM which is based on the samsung stock firmware: IronRom V3.2 ( https://forum.xda-developers.com/galaxy-tab-s/development/prerooted-stock-touchwiz-rom-t2973107) and i noticed that the keyboard is fully working as expected. Therefore i assume that the keyboard layout is the original from samsung incorporated into the ROM. If we copy this layout it will work on a 7.* ROM version ?
Update: Searching inside the above mentioned ROM i found the file Vendor_04e8_Product_a006.kl which i am planning to copy over. The thing is that the system filesystem is read only.
Any Idea ?
---------- Post added at 15:07 ---------- Previous post was at 14:33 ----------
I research and it seems that ssome of the mapping missings are :
key 368 LANG
# F2 F3 F4
key 704 RECENTAPPS
key 705 APPLICATION
key 706 SIP_ON_OFF
# LEDs
led 0x01 CAPS_LOCK
Will copy the file over from the other ROM and update about the results.
I'm trying to do the same here, with Lineage OS on an SM-T800.
As already said, the stock keylayout, which includes something like this:
Code:
key 704 RECENTAPPS
key 705 APPLICATION
key 706 SIP_ON_OFF
key 707 VOICESEARCH
key 708 QPANEL_ON_OFF
key 710 SFINDER
key 712 MULTI_WINDOW
does not work on non-stock ROMs. I can also verify that setting scancode 704 to keycode APP_SWITCH, does work.
Indeed, these keycodes (RECENTAPPS, etc) are not mentioned in the KeyEvent android developers page, nor can I find a substitute for the missing ones.
For the language switch, I tried running inside an adb shell the command
Code:
input keyevent LANGUAGE_SWITCH
and sure enough, I was able to switch language on my keyboard.
I then checked to see what is emitted when I press the "LANG" key on the keyboard, and it seems that it's just SHIFT+SPACE. So I went ahead and defined a keychar file (/system/user/keychars/Vendor_04e8_Product_a006.kcm) where I asked for Shift+Space to send the LANGUAGE_SWITCH keycode. No luck
As a temporary solution, I've mapped the "keyboard" key (just right of the Function key) to LANGUAGE_SWITCH, and that is working fine.
So my keylayout for now includes:
Code:
key 704 APP_SWITCH
key 706 LANGUAGE_SWITCH
Last (but not least), I have no clue how to drive the led for caps-lock. I tried all led numbers from 0x00 to 0x1f in the keylayout file, nothing seems to be doing the trick. I also cannot find any proper documentation on that, to understand how it works.
I'll keep digging. I really don't get why the key character map file didn't work for setting the language. At least that part should be feasible.
Quite strange.
I have installed the IronRom V3.2 (https://forum.xda-developers.com/galaxy-tab-s/development/prerooted-stock-touchwiz-rom-t297310 ) and the keyboard layout is working fine !!! Functions keys, language key and the caps lock led are all working. Keep in mind that this ROM is based on stock and is running android 6.0.1
I wonder if a copy of the files /system/user/keychars/* to a newer android version might work. I also noticed on other nougat versions (AICP, LIneage) that the keyboard settings are completely different that Marshmallow.
ale_kons said:
Quite strange.
I have installed the IronRom V3.2 (https://forum.xda-developers.com/galaxy-tab-s/development/prerooted-stock-touchwiz-rom-t297310 ) and the keyboard layout is working fine !!! Functions keys, language key and the caps lock led are all working. Keep in mind that this ROM is based on stock and is running android 6.0.1
I wonder if a copy of the files /system/user/keychars/* to a newer android version might work. I also noticed on other nougat versions (AICP, LIneage) that the keyboard settings are completely different that Marshmallow.
Click to expand...
Click to collapse
Your link seems to be wrong.
If this ROM is based on samsung stock, then my guess would be that this is what makes it work with the keyboard, not necessarily the android version. Did you use the ROM with the stock kernel or the "ironstock" kernel?
I guess I have the stock kernel, have to check though
My kernel version is: 3.4.113-IronStock_SM-T800_V3.2
Current ROM: IronRom V3.2_T800
As mentioned above the keyboard is working as it was supposed too.

[GUIDE] Fix: Headset Controls Not Working on Custom Roms

The Problem: The Volume Up and Volume Down Keys of my Headset; Xiaomi Earphone Mi Hybrid Pro HD 2, did not work on my Redmi 5 Plus build.
Using KeyTest App, I identified that the keys were not mapped to any function.
How to fix;
Code:
In /system/usr/keylayout/Generic.kl
Change:
Code:
key 257 BUTTON_2
key 258 BUTTON_3
To
Code:
#key 257 BUTTON_2
#key 258 BUTTON_3
key 257 VOLUME_UP
key 258 VOLUME_DOWN
Save and reboot.
Should work here after.
Edit: If anyone is having issues with Apple earphones, let me know, I can try to see what changes need to be done.
If anyone is facing any issues please let me know and I will update with better more specific instructions.
RAZR-93 said:
Edit: If anyone is having issues with Apple earphones, let me know, I can try to see what changes need to be done.
If anyone is facing any issues please let me know and I will update with better more specific instructions.
Click to expand...
Click to collapse
This how to will be nice, too.
And thanks my Sony headset work now.
Sure I'll look into putting together a general how to for all devices with same issue will be out in a day or two.
Thanks.
Can send me a Pm when u're finish, please?
I've two generations of the iPhone headset.
RAZR-93 said:
The Problem: The Volume Up and Volume Down Keys of my Headset; Xiaomi Earphone Mi Hybrid Pro HD 2, did not work on my Redmi 5 Plus build.
Using KeyTest App, I identified that the keys were not mapped to any function.
How to fix;
Code:
In /system/usr/keylayout/Generic.kl
Change:
Code:
key 257 BUTTON_2
key 258 BUTTON_3
To
Code:
#key 257 BUTTON_2
#key 258 BUTTON_3
key 257 VOLUME_UP
key 258 VOLUME_DOWN
Save and reboot.
Should work here after.
Edit: If anyone is having issues with Apple earphones, let me know, I can try to see what changes need to be done.
If anyone is facing any issues please let me know and I will update with better more specific instructions.
Click to expand...
Click to collapse
Hey I'm kinda new to this. I have root. I would like to know how to do this.
I have a redmi note 10 pro.
RAZR-93 said:
The Problem: The Volume Up and Volume Down Keys of my Headset; Xiaomi Earphone Mi Hybrid Pro HD 2, did not work on my Redmi 5 Plus build.
Using KeyTest App, I identified that the keys were not mapped to any function.
How to fix;
Code:
In /system/usr/keylayout/Generic.kl
Change:
Code:
key 257 BUTTON_2
key 258 BUTTON_3
To
Code:
#key 257 BUTTON_2
#key 258 BUTTON_3
key 257 VOLUME_UP
key 258 VOLUME_DOWN
Save and reboot.
Should work here after.
Edit: If anyone is having issues with Apple earphones, let me know, I can try to see what changes need to be done.
If anyone is facing any issues please let me know and I will update with better more specific instructions.
Click to expand...
Click to collapse
Its not working in lineage os ,, is there any other way to make it work?

Categories

Resources