(Q) [Solved :)] Search button as Camera button

Search This thread

motcher41

Senior Member
Jul 29, 2011
3,666
1,337
Perham, Minnesota
Anyone know if it is possible to make it so the search button takes a pic when in camera. I wish the dx2 had the dx camera button

Sent from my DROID X2 using xda premium
 
Last edited:

IAreKyleW00t

Senior Member
Dec 15, 2011
336
131
Ohio
k.yle.sh
Unfortunately, I've tried to find a working way to get that done but I can't find a way to get it. There are ways to change the layout of the buttons, but for some reason I couldn't get it working. Ill keep looking and let you know what I find, lol because I want it too!

Sent from my DROID X2 using XDA App
 

robocuff

Senior Member
Jul 23, 2011
710
275
I have mine like that right now. /system/usr/keylayout. Open the tegra-kbc.kl file in a text editor and find the line that says key 217 SEARCH WAKE_DROPPED and comment it out by putting a # in front of it. Then just add a line that says key 217 CAMERA . Reboot your phone and you should have it.

Sent from my DROID X2 using xda premium
 

IAreKyleW00t

Senior Member
Dec 15, 2011
336
131
Ohio
k.yle.sh
I have mine like that right now. /system/usr/keylayout. Open the tegra-kbc.kl file in a text editor and find the line that says key 217 SEARCH WAKE_DROPPED and comment it out by putting a # in front of it. Then just add a line that says key 217 CAMERA . Reboot your phone and you should have it.

Sent from my DROID X2 using xda premium

Ah, I see. I tried just adding CAMERA to that line. I was trying to get it to still work as a 'search' when your not using the camera - but who uses that anyways? :D Nice job.
 

pacman377

Senior Member
Oct 3, 2011
138
13
I have mine like that right now. /system/usr/keylayout. Open the tegra-kbc.kl file in a text editor and find the line that says key 217 SEARCH WAKE_DROPPED and comment it out by putting a # in front of it. Then just add a line that says key 217 CAMERA . Reboot your phone and you should have it.

Sent from my DROID X2 using xda premium

Thanks man. Much rather have the camera over the search anyway.
 

robocuff

Senior Member
Jul 23, 2011
710
275
I know what you mean. I never use that search button anyway. It's one of the first things I do after flashing a new rom. That's one thing to be aware of. Flash a new rom and you have to do it again. ;)

Sent from my DROID X2 using xda premium
 

IAreKyleW00t

Senior Member
Dec 15, 2011
336
131
Ohio
k.yle.sh
In the same file, is it possible to make the volume buttons wake the phone? I see it shows wake for the home button. And I dont know what wake_dropped means for the menu and back buttons.

Yes, it's possible. WAKE means that if that button/key is pressed while the phone is asleep (screen is off), it will wake the phone up and return it to the app/lock screen.
WAKE_DROPPED means that if that button/key is pressed while the phone is asleep (screen is off), it will 'wake' the phone, but it will NOT return it to the application/lock screen.

Basically, WAKE = unlock phone, WAKE_DROPPED = Doesn't unlock phone.
 

jsgraphicart

Senior Member
Nov 25, 2011
6,295
1,884
OnePlus 7T
Google Pixel 7 Pro
Yes, it's possible. WAKE means that if that button/key is pressed while the phone is asleep (screen is off), it will wake the phone up and return it to the app/lock screen.
WAKE_DROPPED means that if that button/key is pressed while the phone is asleep (screen is off), it will 'wake' the phone, but it will NOT return it to the application/lock screen.

Basically, WAKE = unlock phone, WAKE_DROPPED = Doesn't unlock phone.

Thanks. Will doing this disable the volume buttons though? I changed the search button to the camera button as was described and, obviously, the search function is gone. Will that happen with the volume buttons. If so, I dont want to mess with it.
 

iBolski

Senior Member
First off, excellent thread with an excellent answer.

This needs to be stickied!

Now, another question. I went in there and saw a lot of different .kl files. I myself use SwiftKey X. Does it matter which file I edit? For example, here are the files I have:

AVRCP.kl
Motorola_Bluetooth_Wireless_Keyboard.kl
cpcap-key.kl
qwerty.kl
tegra-kbc.kl
usb_keyboard_102_en_us.kl

Does the tegra-kbc.kl file work across all different keyboard software?

Thanks!
 
Last edited:

IAreKyleW00t

Senior Member
Dec 15, 2011
336
131
Ohio
k.yle.sh
Thanks. Will doing this disable the volume buttons though? I changed the search button to the camera button as was described and, obviously, the search function is gone. Will that happen with the volume buttons. If so, I dont want to mess with it.

Unless you removed the VOLUME_UP and/or VOLUME_DOWN in that, then no. Just change WAKE_DROPPED to WAKE and it should be fine.

The worst that could happen is what... your volume doesn't work for a second while you change it back? lol :D


EDIT:

First off, excellent thread with an excellent answer.

This needs to be stickied!

Now, another question. I went in there and saw a lot of different .kl files. I myself use SwiftKey X. Does it matter which file I edit? For example, here are the files I have:

AVRCP.kl
Motorola_Bluetooth_Wireless_Keyboard.kl
cpcap-key.kl
qwerty.kl
tegra-kbc.kl
usb_keyboard_102_en_us.kl

Does the tegra-kbc.kl file work across all different keyboard software?

Thanks!

I got the same thing, personally it bothers me because of the clutter... but I'd rather not mess with it right now, but if you need to edit something you'll want to use tegra-kbc.kl
I don't think this thread should be stickied, but I think there should be a thread showing how to do this with it. Like a guide/tutorial. :p
 
Last edited:
  • Like
Reactions: jsgraphicart

jsgraphicart

Senior Member
Nov 25, 2011
6,295
1,884
OnePlus 7T
Google Pixel 7 Pro
Unless you removed the VOLUME_UP and/or VOLUME_DOWN in that, then no. Just change WAKE_DROPPED to WAKE and it should be fine.

The worst that could happen is what... your volume doesn't work for a second while you change it back? lol :D

lol. True. Ok, Im gona give it a try.

---------- Post added at 07:14 PM ---------- Previous post was at 07:04 PM ----------

Awesome, It worked. Thanks again. This is a cool little tweak.
 

iBolski

Senior Member
What I'd like to see is ROM developers include this in their ROMs. I know in Eclipse and Liberty ROMs, they have a "parts" option in the system settings that allows you to modify various things.

Heck, maybe even ROM Toolbox should do this. Maybe a tweet to JRummy might be in order? ;)

It shouldn't be that hard to write an app to do it. Of course, it would need root access and the ability to remount /system as read/write and then set it back after it's modified the file.

Maybe this is what I need to do after I learn how to program a droid! No promises! :D
 

IAreKyleW00t

Senior Member
Dec 15, 2011
336
131
Ohio
k.yle.sh
I've seen an app like that, but it didn't work for me because it was outdated. Forgot where I found it... as for the /system , I find it easiest to just use ADB on my computer and run the command 'adb remount'. That automatically sets /system as RW. :D

I'm no dev, and I certainly don't know how to make apps... so unfortunately I can't help with that. :|

EDIT:
Glad it worked for you jsgraphicart. :D
 
  • Like
Reactions: iBolski

jsgraphicart

Senior Member
Nov 25, 2011
6,295
1,884
OnePlus 7T
Google Pixel 7 Pro
as for the /system , I find it easiest to just use ADB on my computer and run the command 'adb remount'. That automatically sets /system as RW. :D

I did this directly on the phone using Root Explorer. It has the options to switch from R/W to R/O. I just opened up the file in text editor, made the changes and saved. It even made a backup of the original for me. To me, thats easier than going through a computer.
 

IAreKyleW00t

Senior Member
Dec 15, 2011
336
131
Ohio
k.yle.sh
I did this directly on the phone using Root Explorer. It has the options to switch from R/W to R/O. I just opened up the file in text editor, made the changes and saved. It even made a backup of the original for me. To me, thats easier than going through a computer.

That's what I do to, because then I would need to pull and push the files. I was talking about in general making the /system a RW; for other needs.

I use root explorer too, and that automatic backup is a great feature. Gives you some peace-at-mind when doing this. :)
 

motcher41

Senior Member
Jul 29, 2011
3,666
1,337
Perham, Minnesota
Unfortunately, I've tried to find a working way to get that done but I can't find a way to get it. There are ways to change the layout of the buttons, but for some reason I couldn't get it working. Ill keep looking and let you know what I find, lol because I want it too!

Sent from my DROID X2 using XDA App
nevermind root browser had one lol
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    I have mine like that right now. /system/usr/keylayout. Open the tegra-kbc.kl file in a text editor and find the line that says key 217 SEARCH WAKE_DROPPED and comment it out by putting a # in front of it. Then just add a line that says key 217 CAMERA . Reboot your phone and you should have it.

    Sent from my DROID X2 using xda premium
    3
    In the same file, is it possible to make the volume buttons wake the phone? I see it shows wake for the home button. And I dont know what wake_dropped means for the menu and back buttons.

    Yes, it's possible. WAKE means that if that button/key is pressed while the phone is asleep (screen is off), it will wake the phone up and return it to the app/lock screen.
    WAKE_DROPPED means that if that button/key is pressed while the phone is asleep (screen is off), it will 'wake' the phone, but it will NOT return it to the application/lock screen.

    Basically, WAKE = unlock phone, WAKE_DROPPED = Doesn't unlock phone.
    1
    Thanks. Will doing this disable the volume buttons though? I changed the search button to the camera button as was described and, obviously, the search function is gone. Will that happen with the volume buttons. If so, I dont want to mess with it.

    Unless you removed the VOLUME_UP and/or VOLUME_DOWN in that, then no. Just change WAKE_DROPPED to WAKE and it should be fine.

    The worst that could happen is what... your volume doesn't work for a second while you change it back? lol :D


    EDIT:

    First off, excellent thread with an excellent answer.

    This needs to be stickied!

    Now, another question. I went in there and saw a lot of different .kl files. I myself use SwiftKey X. Does it matter which file I edit? For example, here are the files I have:

    AVRCP.kl
    Motorola_Bluetooth_Wireless_Keyboard.kl
    cpcap-key.kl
    qwerty.kl
    tegra-kbc.kl
    usb_keyboard_102_en_us.kl

    Does the tegra-kbc.kl file work across all different keyboard software?

    Thanks!

    I got the same thing, personally it bothers me because of the clutter... but I'd rather not mess with it right now, but if you need to edit something you'll want to use tegra-kbc.kl
    I don't think this thread should be stickied, but I think there should be a thread showing how to do this with it. Like a guide/tutorial. :p
    1
    I've seen an app like that, but it didn't work for me because it was outdated. Forgot where I found it... as for the /system , I find it easiest to just use ADB on my computer and run the command 'adb remount'. That automatically sets /system as RW. :D

    I'm no dev, and I certainly don't know how to make apps... so unfortunately I can't help with that. :|

    EDIT:
    Glad it worked for you jsgraphicart. :D
    1
    Worked great....heres one more camera button question do you now a command to use our noew camera button to activate the camera from say pushing search on a home screen?

    Try long pressing the search button. It opens up the stock camera for me.