Android 4.0 “Ice Cream Sandwich” features a fully-redesigned interface from the ground up. Its home screen is entirely different, the lockscreen is extremely new, and it’s overall much nicer. However, alongside this redesign comes a new central way to change applications: the multitasking button. It’s quite nice, but it unfortunately doesn’t have one-click access on any Android device with the old standard four-button layout. The only phones with the new multitasking button so far are the Galaxy Nexus and the HTC One series.
Recently, the CyanogenMod developers added a new feature to their code that changes how a certain key call works. This allows you to remap any key you want to the new, Ice Cream Sandwich-style menu without having to change any Android code yourself. You can see a result of this modification in action in this video, where I show both the standard long-hold multitasking menu as well as my modified search button:
This is actually a fairly simple modification, and you can just follow the following guide to set it up.
This isn’t a task for those uncomfortable with their phones. To do this mod, you’ll need to have CyanogenMod installed–and not any regular version of CyanogenMod. You’ll need to be running CyanogenMod 9, which is still in development. The difference between CyanogenMod 7 and CyanogenMod 9 is that CM7 is based on Android 2.3 “Gingerbread” while CM9 is based on Android 4.0 “Ice Cream Sandwich”.
If you’re comfortable with using software still in the development phase, you’ll need to download the latest version of CM9 available at the official CyanogenMod download site.  Be sure you download the ROM for the correct phone! You’ll want an update that’s newer than June 3rd. Nightlies from between May 29th and June 3rd also work, but do not allow you to long hold the menu button to use search.
2) Modifying your Configuration
Note: I’ve only done this on my own phone, and other phones may be different. If cypress-touchkey.kl does not exist on your device, open various files until you see one that looks similar to the one below.
To pull this next step off, you’ll need a file browser with root permissions. I used Root Browser  Light, available free on Google Play. Next, navigate to /system/usr/keylayout and copy cypress-touchkey.kl to your regular storage, either emmc or SDCard. Then copy it to another place for safe keeping, in case something goes wrong. Then go back to /system/usr/keylayout and open cypress-touchkey.kl with Root Browser’s built in text editor:
Replace all references to the key you’re remapping, in my case SEARCH, with APP_SWITCH as shown above. The shown layout is for the Vibrant. Reboot your phone and unlock it.
Press the key that you modified, and with any luck, it’ll open up the fancy ICS multitasking switcher. You’re done! However, if it does not work, there are a few other files you can try modifying. Open up other various .kl files and replace SEARCH with APP_SWITCH. Reboot and test each time you edit a file and soon enough, you’ll have the desired effect!
The search button is pretty much useless, in my opinion, and changing it to a multitasking button is a thousand times more useful. You can also map the Search key to really anything you want it, even though I outlined the steps only for the app switcher. There’s lots of choices, and you can see a slightly more complete list here.  Plus, since recent nightlies allow you to use the menu button as a search key on long press, there’s really no reason to not do this.
Modified from this original thread  (now out of date)