How can I change the behavior of the volume buttons vs. the orientation of the screen On the Acer Iconia A200, when you change the orientation of the screen, the function of the volume rocker flips. In landscape mode, with the volume rocker on the right side and at the top, you find that 'down' on the rocker turns down the volume. 

Now, flip the device 90 degrees left to a portait orientation, with the volume rocker on the top left. Now the same press that was 'down' before is 'right' and it turns the volume UP. 

In other words, the action of the volume rocker is sensitive to the orientation of the device.

I haven't found any way to control this yet in the settings - is there any way to change this behavior? I'll eventually get used to it, but for the moment it's driving me batty.

Added: After seeing Zuul's answer talking about the gpio_keys.kl file, AND getting a bluetooth keyboard, I did some experimenting. When using a bluetooth keyboard, the bluetooth vol up/down buttons are independent of tablet orientation. So either some bit of software checks where the key is coming from and remaps or not as appropriate, OR the swap is happening at some lower layer (i.e. before it becomes a key code).
How things currently work

The Android OS uses a file to map the volume buttons in order to know what to do when they get pressed:

The file:

/system/usr/keylayout/gpio-keys.kl


Contains two lines for the volume buttons:

key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED


They aren't "orientation sensitive", just like their physical position on the device.

The issue you're facing, many other tablet owners face, that has to do with the logical position on the action. If we press the down part of the button, the volume should go down, but depending on the orientation, the down part actually raises the volume.

I do believe that the device rotation should account for factors such as this, as to prevent users from having to "create" weird habits for a simple "lower the volume" action. But on the other hand, that's why the volume buttons on your tablet are punctuated by three raised dots for easy tactile recognition.



Possible solution for rooted devices

Since this buttons in order to be changed need to be altered at a "system level", the action must be performed with root privileges on the device.

While the following two solutions cannot deal with orientation-specific scenarios, they are useful to remap the buttons as to have them adjusted to the tablet orientation in which we get most confused about:


Application: ButtonRemapper - Beta v0.2.4


  Tool to remap the hardware buttons. Or better: a generic tool to edit the key layout map file Android uses to map the keys.


XDA Developers forum thread with extensive details by the author




Manual Edit of the file: gpio-keys.kl:


With a root File Manager, travel to /system/usr/keylayout and long touch the file gpio-keys.kl;
From the pop up menu, select "Properties";
Change the file permissions to rw-rw-rw- in order to be able to alter its contents;
After having the new permissions, open the file with a text editor;
Search within the file for the following two lines:

key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED

Update the lines by swapping the key numbers so it becomes:

key 114 VOLUME_UP WAKE_DROPPED
key 115 VOLUME_DOWN WAKE_DROPPED

Save the changes and reboot your tablet.


You should now have the actions of the volume up/down buttons toggled as they best fit your portrait orientation.

To undo it, just reverse these directions. 

Credits for the file edit solution are attributed to user jbeige from thriveforums.org.




After reading your device manual, other tablet manuals and the specifications from the Android OS, this are the best solutions I was able find to work around your issue.