• General
  • [Tool] LG Classic Flip - Customize Launcher Hotkeys



CustomLG-Hotkeys

Modify the launcher hotkeys on the LG Classic Flip to ANY CUSTOM APP Activity!

Why?

Because the LG Classic Flip only supports pre-configured apps for the launcher shortcut keys. This means we can't set a shortcut to any third party apps. But using ADB we can fully customize these hotkeys!

What?

CustomLG-Hotkeys will fully customize which activities you want to launch using the shortcut keys. Say goodbye to limitations!

How?

Just download the file at the bottom of this post, extract it, and open customhotkeys.bat. Navigate on your phone to the screen you want to open from the shortcut key, then continue. Choose what key you want to set, and... That's it! Done!

What does it do?

CustomLG-Hotkeys works using the following logic:

  1. It pushes a bash script to /data/local/tmp. The bash script uses dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp' to find the current activity (with sed to narrow it down to exact text).
  2. It instructs the user to navigate to the screen he wants to set as the shortcut key.
  3. It runs the script and saves the output.
  4. It gives the user the option to choose a key.
  5. It runs settings list system commands to set the package and class name of the keys.
  6. It force stops the launcher app so the settings can take effect.

License

This is free to use, distribute, sell, brick your phone, or do whatever else you want with it.

Github Repo / Contributions

Found a bug? Want to fix something? Add a feature? All contributions are welcome, just leave an issue in the Github Repository of this project. [Login to see the link]

Download


[Login to see the link]

    This code is great! My one suggestion would be to set the menu choices as arrow presses (meaning, press the arrow key corresponding to the direction key you're setting). I tried looking up how to do it, and I couldn't figure it out. Maybe you know?

      FliphoneBochur I was thinking that too. I don't think it's possible in batch scripting, but I can probably use a 3rd party binary or powershell for it. Not sure if it's worth it.


      FliphoneBochur I think they have similar opinions...

      It does not seem possible with batch files. The apparent workaround it to write or find a console application which you could run from your batch file, but… does it pay of to bother about it? I don't think so? The batch files have considerable value if they can work in any system, without additional utilities, especially those written only for the purpose of extending batch functionality.


      I was able to make a batch file that can detect arrow key press, but it's using powershell to do so. Not a huge deal, but makes it a bit slower. I may or may not use it.

        Biden2020prez There can be some other ways. For example, using ADB I can ask the guy to press the key on his phone. Or I can use msvcrt from python. But I don't think it's such an important feature that's worth overcomplicating this.

          FliphoneBochur lol. Just saying that I have no rules and I dont need credit. going rate is free and open source.

          [Login to see the link] So we should be able to set a hotkey to launch the AppLauncher app!
          How.simple would it be if we know the Key, Package, and Activity beforehand? How many lines of code?

          Using my batch script you can easily set for the applauncher. To include the code in your launcher, it would be pretty simple. My batch script just runs two settings put system commands, and the rest is just to detect the top activity.

          From what I recall, apps only need WRITE_SECURE_SETTINGS for secure and global, not system. however, my batch script also force stops the launcher for the settings to take effect. I don't know if you're app can do that. After a reboot you should be fine.

          Maybe you are interested in making an app that can set all the shorcut keys to any app 🙂 🙂?

          If someone can test this on an LG Exalt that'd be great

          I added the arrow key function. Was a headache getting it working. In terms of showing the arrows keys in the batch script, I found a way to do it, but it messes some things up, so I may not include that. I am too tired from all this so I'll put it together as a release another time.

          what does this do for me