We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

Option to disable volume and camera buttons

asked 2017-11-11 13:37:36 +0200

Lars Maria gravatar image

updated 2018-01-09 11:33:44 +0200

jiit gravatar image

Generally I'm very pleased with Sailfish X on Sony Xperia X, and it will be very interesting to see the development in the coming updates of SFOS. But there is one thing I find very annoying with Xperia X, and that is the placement of the volume and camera buttons. I've tried to ignore it, or to handle the phone in another way, but they are always in the way in my handling of the phone. I constantly change the volume without meaning or wanting to. Not when I have it in my hand and the screen is active and I'm doing something with it, but whenever I need to pick up the phone, move it, or simply put it in my pocket. I wish the buttons were placed as they are on Jolla 1.

Therefore I would like to have an option to disable the volume and camera buttons when the screen is inactive/locked, so they only work when I have the phone ready in my hand and 'open'.

EDIT: I would like (as an option) the volume button to work for a media playing app only when the screen is active, unlocked and that app is active (maximized), and the same for the system sound: only when I'm in 'Settings - System Sound', I'm able to change the volume for the system sound with the volume button. And the same for the camera button. A kind of 'Restrictive mode; function' for the buttons, one could say.

edit retag flag offensive close delete

Comments

Would it help if there was an option to turn the display 180 degrees?

vattuvarg ( 2017-11-11 15:21:03 +0200 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2018-01-10 09:54:27 +0200

spiiroin gravatar image

This might be helpful to some extent: From command line you can tell mce to keep volume keys disabled unless there is ongoing audio playback i.e. volume keys do nothing unless you are already playing music / watching videos / stte.

Install mce-tools package (this part requires root privileges):

devel-su
pkcon refresh
pkcon install mce-tools

Adjust volume key input policy:

mcetool --set-volume-key-policy=media-only

And if you want to go back to the defaults, execute:

mcetool --set-volume-key-policy=default
edit flag offensive delete publish link more

Comments

@spiiroin Is there something like that for disabling the camera button? I hardly ever take any photos (whats is that photomania all about?), but I don't know how many times a day I accidentally start the camera on the XA2.

Tanghus ( 2020-01-10 13:58:39 +0200 )edit

@Tanghus Not to my knowledge.

But if you are comfortable with editing critical system files, have backed up your data and are mentally prepared to reflash the phone if something goes wrong ...

Editing /usr/share/lipstick-jolla-home-qt5/main.qml so that ShutterKeyHandler element near the end of file is always disabled seems do the trick.

-            enabled: !lipstickSettings.lockscreenVisible
+           enabled: false

[have a live ssh connection, take backup of the file, restart lipstick, make sure ui comes back up, do not reboot if/while ui is failing and so on]

spiiroin ( 2020-01-10 14:53:58 +0200 )edit

Thanks for the answer @spiiroin. I try to avoid patching, so I will start with testing if it gets a little less trigger-happy when I get a cover for it :) If it doesn't I will try your suggestion.

Tanghus ( 2020-01-10 17:20:27 +0200 )edit
0

answered 2018-01-07 16:51:47 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2018-01-07 16:51:47 +0200

philter gravatar image

I have the same need. Actually using -patch from openrepos : allow rotation for all apps "allow any rotation for all SailfishOs apps" -android app : rotation orientation manager from pranav pandley I solved for both Sailfish apps and whattsapp

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2017-11-11 13:37:36 +0200

Seen: 643 times

Last updated: Jan 10 '18