The Menu key: How something so simple, can go so wrong

The following post is mainly relevant for m7 users, but it does shed some insight into our decision making process when such issues come up

The menu key, as many Android users know, plays an important role in the OS. Its the ‘more’ button, the ‘settings’ button and general all-purpose overflow list. Historically, there have been two categories for Android in this respect, those with a physical hardware menu key, and those that use the software navbar introduced with ICS. 

And then along came the HTC One. This device, as its owners are likely well aware, is unique. It is a hardware key device, but it only has a Home and Back button - no menu. Now, apps that use the Android SDK APIs released with ICS and beyond handle this configuration just fine, rendering the 3-dot overflow that we’ve all familiarized ourselves with. But what about the apps using older apis, or those that haven’t been updated to ICS and higher compliance? This is where things get tricky. These, we’ll call them ‘Legacy’, apps don’t know to invoke the 3-dot overflow menu. 

To handle the legacy apps, the HTC One debuted with “hold Back to get menu” and double-tap home to get Recent apps (Android Police did a write-up and ended up shipping stock with what we’ll call a “menu only navbar”. For those not familiar with this, it is essentially an entire software navigation menu dedicated to one button (Android Central has pictures and a write-up We’re going to call a spade a spade and just outright state that while this is great for discoverability (that is you can’t miss it) it is hideous and a waste of space. 

Many HTC One users agreed, and in one of their OTA’s HTC introduced a new concept to address these legacy apps - configure the ability of these ‘Double tap’ actions and remove the ugly bar. 

Enter Logo2Menu, this creative hack makes a portion of the HTC logo into a hardware menu key. The perfect solution right? Not quite. Android makes a lot of assumptions to do what it does, but one of the key items is that hardware keys, by their definition, cannot be removeable. It makes sense and is a perfectly sane assumption. The issues then gets compounded when you try and let users decide whether Logo2Menu should be active, how the apps respond to suddenly appearing (or disappearing hardware keys) and then how everything gels with CM’s already built in capability to allow users to do key rebindings. It became a mess of logic and a mess of a solution for CM. 

So, we have removed Logo2Menu from CM. There is also the option to force the 3-dot overflow in CM code. The state of the force 3-dot overflow is dependent on three things. The first is whether you have software buttons a la Nexus 4. In this case the 3-dot overflow is always on, with no option to disable. The second whether the device has a hardware menu button, in which case the 3-dot overflow option is off by default, but available to enable/disable. If the device has no hardware menu button available, then we default to the third case. The third is whether the device can actually issue a menu keypress, whether by default or through hardware key rebinding. If it can issue a menu keypress the force 3-dot overflow is disabled with no option to enable, otherwise the overflow is enabled with no option to disable.

We’re working on adjusting this behavior but it is a tricky bit of logic when factoring in all the current dependencies. And when completed, the force 3-dot overflow will be back and configurable to be always available. 

Fun stuff right? To compensate while that code is in progress, we have introduced the Double-tap Home and its configuration - the same solution HTC and Google settled on for the Google Edition device (the double tap code even exists in AOSP). With the UX binge we are on, we hate this compromise, but it is the best of a lot of bad options. Its not discoverable or intuitive, but it works for something that shouldn’t have been missing in the first place, and it plays nice with all the other CM features. And there you have it. One family of devices, with a seemingly trivial issue provided all that heartburn. On the bright side, once this is completed, this should translate well to all other devices with this odd configuration, including the One mini. 

tl;dr Buttons are not easy..
Shared publiclyView activity