5,594,386 Members 34,916 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][XPOSED] Swap Volume Keys when not in default orientation [Updated 2013-10-12]

Tip us?
 
etatto83
Old
(Last edited by etatto83; 11th October 2013 at 11:44 PM.) Reason: New release 0.3
#1  
etatto83's Avatar
Junior Member - OP
Thanks Meter 46
Posts: 28
Join Date: Oct 2010
Location: Seillons-Source-d'Argens
Default [MOD][XPOSED] Swap Volume Keys when not in default orientation [Updated 2013-10-12]

This mod will swap the Volume Down and Volume Up keys when the device is not in the default orientation mode.
Default mode can be changed in the mod settings.

Tested on my Xperia Z running the latest firmware and Xposed framework

Source available on my GitHub

Changelog:
  • 0.1:
    - Initial release.
  • 0.2:
    - Rewrite the hook entirely, so the long press works now.
    - New setting for Landscape mode as default orientation.
    - French translation added.
    - Rework the description a bit...
  • 0.3:
    - Rely on the rotation angle to compute the orientation.
    - Add logging setting.

SwapVolumeKeys-0.3.apk
The Following 15 Users Say Thank You to etatto83 For This Useful Post: [ Click to Expand ]
 
Scorpion_Ibm
Old
#2  
Member
Thanks Meter 4
Posts: 68
Join Date: Jun 2013
Location: Cairo
Quote:
Originally Posted by etatto83 View Post
This mod will swap the Volume Down and Volume Up keys when the device is in Landscape mode.

Tested on my Xperia Z running the latest firmware and Xposed framework

Source available on my GitHub

Attachment 2310588
It worked but with some bugs... I am using a note 10.1 with default volume keys config in landscape so the module screwed it and swapped the buttons in landscape and portrait.... Maybe u can fix this with a setting and a GUI
Also when press and hold the volume buttons the up button first decreases volume and then returns to increasing it
 
etatto83
Old
#3  
etatto83's Avatar
Junior Member - OP
Thanks Meter 46
Posts: 28
Join Date: Oct 2010
Location: Seillons-Source-d'Argens
I used to think swapping the volume keys was only usefull for phone, but you're right : I'm gonna add a setting for default mode.
Yep, long press is not swapped :-/ …

Envoyé depuis mon C6603 avec Tapatalk 4
 
etatto83
Old
#4  
etatto83's Avatar
Junior Member - OP
Thanks Meter 46
Posts: 28
Join Date: Oct 2010
Location: Seillons-Source-d'Argens
New 0.2 release...
The Following User Says Thank You to etatto83 For This Useful Post: [ Click to Expand ]
 
Scorpion_Ibm
Old
#5  
Member
Thanks Meter 4
Posts: 68
Join Date: Jun 2013
Location: Cairo
Quote:
Originally Posted by etatto83 View Post
I used to think swapping the volume keys was only usefull for phone, but you're right : I'm gonna add a setting for default mode.
Yep, long press is not swapped :-/ …

Envoyé depuis mon C6603 avec Tapatalk 4
Downloaded and gonna reboot to try updates
 
etatto83
Old
#6  
etatto83's Avatar
Junior Member - OP
Thanks Meter 46
Posts: 28
Join Date: Oct 2010
Location: Seillons-Source-d'Argens
:-#

Envoyé depuis mon Xperia Z avec Tapatalk 4
 
ahrion
Old
#7  
ahrion's Avatar
Senior Member
Thanks Meter 180
Posts: 538
Join Date: Jul 2013
I love this. Only problem I noticed is that in only works on one side of the phones' landscape made, but If I switch to the other side it stays on the other side. Please allow it to work with both sides of landscape mode.

Sent from my LG-E980 using Tapatalk 4
 
Scorpion_Ibm
Old
#8  
Member
Thanks Meter 4
Posts: 68
Join Date: Jun 2013
Location: Cairo
Quote:
Originally Posted by etatto83 View Post
:-#

Envoyé depuis mon Xperia Z avec Tapatalk 4
I tried it and worked perfectly nice work

Quote:
Originally Posted by ahrion View Post
I love this. Only problem I noticed is that in only works on one side of the phones' landscape made, but If I switch to the other side it stays on the other side. Please allow it to work with both sides of landscape mode.

Sent from my LG-E980 using Tapatalk 4
I was gonna suggest this also if it's applicable .... To make it work in the four rotation ways
The Following User Says Thank You to Scorpion_Ibm For This Useful Post: [ Click to Expand ]
 
etatto83
Old
(Last edited by etatto83; 11th October 2013 at 09:27 AM.)
#9  
etatto83's Avatar
Junior Member - OP
Thanks Meter 46
Posts: 28
Join Date: Oct 2010
Location: Seillons-Source-d'Argens
Well, why not, even I always disabled reverse portrait and reverse landscape on my phones & tablets : I don't see the point to have all-orientation rotation You either hold your phone in portrait (most of the time, when calling, on some car dock) or in landscape (desk dock, car dock, watching movies, ...).

Nevertheless, I'm adding it to my TODO.
The Following 2 Users Say Thank You to etatto83 For This Useful Post: [ Click to Expand ]
 
Imperial_Raj
Old
#10  
Imperial_Raj's Avatar
Senior Member
Thanks Meter 53
Posts: 117
Join Date: Apr 2012
Location: Lucknow
Awesome, dude! Had been missing this feature so much after coming back from CM10.1 to stock. Thanks a lot.
---------------------------------------------------
Did I just help you? Just hit THANKS, simple as that.

 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes