S-Pen Button long press and Tasker Task - Samsung Galaxy Tab S6 Guides, News, & Discussion

In settings, it allows setting the 'Air Action' for 'Hold Down Pen Button to' (aka long-pressing the S-Pen button) to any Android app.
So, I setup this Tasker Task named Mute Media Toggle and selected an Icon image for the Task.
Task: Mute Media Toggle
If Condition %MediaMute equals 1
Variable Set %MediaMute to 0
Media Volume Level 10
Else
Variable Set %MediaMute to 1
Media Volume Level 0
End If
I then exported this Task using Tasker App Factory as an app named mute.media.toggle. I then assigned the Mute Media Toggle app as the app for the Air Action for 'Hold Down Pen Button to'. Now whenever I'm in an app that uses media volume, besides using the standard S-Pen Air Gestures for volume up/down, I can now mute/unmute the Media Volume simply by long pressing the S-Pen button. I really needed to be able to mute/unmute media volume easily because the Amazon Fire app when streaming video from the Amazon Recast DVR doesn't have any volume controls at all in the app's video playback screen.
So I imagine that anything Tasker can do in a Task should be able to be set to the 'Hold Down Pen Button to' action.
Sent from my SM-T860 using Tapatalk

I'm using the app SideSqueeze+ for extended S-Pen gestures, since Samsung's gestures are unfortunately pretty limited. It's a very useful app with great support. I recently asked about an option to change the over all volume up and down and it came with last update
m.

Related

5.0.1. - shortcut to notification using volume rocker

Hi all,
Quick question -
I upgraded to 5.0.1. yesterday, and now I can no longer use the volume rocker as a shortcut to switch between "no interrruptions (silent)" and ALL notifications. In other words I cannot use the volume rocker to adjust ring volume and or disable notifications for a period of hours.
The volume rocker only adjusts MEDIA volume now?
What is the quickest shortcut to adjust from ring volume and/or disable interruptions, without having to go into the settings, sound menu.
I'm sure there must be some shortcut.
thanks
Sorry. The shortcut is still there and works with volume rocker. I killed everything in my tasks view window, just dragged away about 20 different tasks. And now the volume rocker shows the options again.
It seems some app was holding the volume rocker as media volume only, even when the app was backgrounded.
When it happens again I'll remove the tasks one at a time to identify the app at fault.
mcgon1979 said:
Hi all,
Quick question -
What is the quickest shortcut to adjust from ring volume and/or disable interruptions, without having to go into the settings, sound menu.
I'm sure there must be some shortcut.
Click to expand...
Click to collapse

Is there any apps that can disable volume buttons when some apps are running?

I'm finding for an app that can disable volume buttons automatically when the specific apps are running.
Sometimes, I'm so annoyed when I'm playing games and I push the buttons unintentionally.
I tried some button mapper apps but it needs to run manually.
You can use Tasker to set them automatically to the lowest/mute when opening the app and then you set it to a different volume manually.
use the app automate - easier as tasker and you can create a action that every time you open a spezific app the media volume is lowered to 0 or you just disable the volume buttons (I think this is also possible)

[Discussion] What do you guys remap bixby to?

Out of curiosity what are all of you remapping your bixby buttons to?
What methods are you using for remap?
I mapped mine to second power button. And I edited the key layout text file. Not using and apps for it...
IMO second power button is awesome. Screen shots power and other functions are even easier.
I'm not worried of pocket presses as I got the shut off in confined space option.
I set it to call the google assistant using bxactions
Inviato dal mio SM-G950F utilizzando Tapatalk
Button Mapper Pro: one press for Google Assistant, Double press media Play/Stop, long press for Bixby because it's awesome with device interaction.
Sent from my Galaxy S8 using XDA Labs
Google's voice assistant through SSAF on Adrenaline Rom. I usually use it to quickly Google something or set reminders
MEDIA_NEXT for skipping tunes without taking the device out of the pocket
I have mine remapped to flashlight using bxActions. It's great having a physical flashlight button since I use it all the time, but sometimes I bump it while pulling my phone out of my pocket.
one press for sound and vibration, double press for flashlight
Button Mapper Pro.
I tried em all, this is the best. With tasker integration!
Bixby: one click: toggle touch
2x click: media play/pause
Long press: take screenshot
The double click action matches with volume 2x click actions.
Volume +/- : media next/previous
Hope u will love this.
My mappings:
once: back
twice: flashlight (also when phone is off - when you need it most!)
long: my Tasker clipboard history from today - paste or copy buttons included
One click: toggle play on my kodi media center.
Using button remapper and Tasker.
Double: flashlight
Single : camera
Long: google assistant
BlockOfDynamite said:
I have mine remapped to flashlight using bxActions. It's great having a physical flashlight button since I use it all the time, but sometimes I bump it while pulling my phone out of my pocket.
Click to expand...
Click to collapse
That's great idea
I have root so I just used the text file to mod mine.
Do not disturb. Easiest way to put it in silent mode when entering a meeting.

[FREE] [OPEN SOURCE] Keyboard/Button Mapper [NO ADS] [4.4+]

Hello there!
Key Mapper is an open source key mapping application, which aims to remap any combination of your keys/buttons and provide unique features.
It is currently in beta and any feedback (positive or negative) would be greatly appreciated. Please post your thoughts in the thread or send me an email.
First things first...
Downloads!
XDA Labs: https://labs.xda-developers.com/store/app/io.github.sds100.keymapper
Google Play: https://play.google.com/store/apps/details?id=io.github.sds100.keymapper
F-Droid: https://f-droid.org/en/packages/io.github.sds100.keymapper/
GitHub: https://github.com/sds100/KeyMapper/releases
Source code
https://github.com/sds100/KeyMapper
Donations
Ko-Fi: https://ko-fi.com/sethschroeder
What can be remapped?
There is NO GUARANTEE any of these buttons will work and this app isn't designed to control games. Your device's OEM/vendor can prevent them from being remapped.
ONLY HARDWARE buttons can be remapped.
• Volume buttons.
• Navigation buttons.
• Bluetooth/wired keyboards and mice connected to your device.
• Buttons on other connected devices should also work but there is no guarantee.
You can combine multiple keys to form a "trigger" and have as many triggers as you want for each action. You can make a key map only work on a long press and to vibrate as well.
What can’t be remapped?
• Pixel Active Edge
• OnePlus Alert Slider
• Power button
• Bixby button
Your key maps don't work if the screen is OFF.
What can I remap my keys to do?
Some actions will only work on rooted devices and specific Android versions.
• Open an app
• Open an app shortcut. This feature is very useful since you can tell another app to do something Key Mapper can’t. E.g If your launcher has a shortcut to open the app drawer, you can select that shortcut in this app and make any button open the app drawer.
• Go back
• Go home
• Open recents
• Open menu
• Expand notification drawer
• Expand quick settings
• Collapse status bar
• Toggle/enable/disable WiFi
• Toggle/enable/disable Bluetooth
• Toggle/enable/disable mobile data (ROOT only)
• Toggle/enable/disable NFC (ROOT only)
• Toggle Play/pause media
• Pause/play media
• Next/previous track
• Fast forward/rewind
• Volume up/down
• Increase/decrease a specific volume stream
• Cycle through and change the ringer mode
• Show the volume dialog
• Mute/unmute/toggle mute (Android 6.0+)
• Toggle/enable/disable auto-rotate
• Force portrait/landscape mode
• Switch between portrait and landscape mode
• Toggle/enable/disable auto-brightness
• Increase/decrease brightness
• Toggle/enable/disable flashlight (Android 6.0+)
• Take a screenshot (Android 9.0+)
• Open the Google Assistant
• Open camera
• Consume key event (Do nothing)
• Lock the device
• Move the cursor to the end
• Toggle/show/hide the keyboard
• Show the keyboard picker (ROOT only for Android 8.1+)
The Key Mapper input method needs to be selected for these to work and you can’t use a soft keyboard at the same time:
• Input a specific keycode
• Input a key
• Insert a block of text
More will be added. If you have any ideas, leave a comment or email the developer.
What other things can the app do?
• Option to show a persistent notification which can pause/resume your keymaps. It can also open the accessibility settings on the device to enable/disable the service. Rooted devices can start/stop the accessibility service without going into settings and just tap the notification.
• Automatically change the input method to the Key Mapper one and/or show the input method picker when a chosen Bluetooth device is connected and switch back to the old one when it is disconnected.
• Option to show a toast message whenever an action is performed.
• Option to log events and send them to the developer so it is easier to debug issues with the app.
Planned features
• Double tap to perform an action
• Remap media (i.e volume, headset) buttons when the screen is off. Android only allows apps to detect media buttons when the screen is off.
• Action to broadcast an intent with extras.
• Multiple profiles which can be activated and deactivated automatically when a Bluetooth device is connected or when you open an app.
• Integrate the AOSP keyboard into the Key Mapper input method so a soft keyboard can be used at the same time.
CHANGELOG
https://github.com/sds100/KeyMapper/blob/master/CHANGELOG.md
is it possible to remap the play / pause button of the bluetooth headset to start Assistant?where is the download?
dario2106 said:
is it possible to remap the play / pause button of the bluetooth headset to start Assistant?where is the download?
Click to expand...
Click to collapse
I haven't tried using buttons on a Bluetooth headset but I have tried using the buttons on a wired headset and it does work. Most buttons should work as long as they don't have a proprietary implementation in the Android skin you're using. E.g Bixby, Pixel Active Edge. XDA doesn't allow new members to put links in posts until they have posted 10 times for security reasons. Once I can, I will definitely put links in the description.
dario2106 said:
is it possible to remap the play / pause button of the bluetooth headset to start Assistant?where is the download?
Click to expand...
Click to collapse
https://forum.xda-developers.com/android/apps-games/app-keyboard-button-mapper-t3914005
Here is the link to the app on XDA labs
sds100 said:
I haven't tried using buttons on a Bluetooth headset but I have tried using the buttons on a wired headset and it does work. Most buttons should work as long as they don't have a proprietary implementation in the Android skin you're using. E.g Bixby, Pixel Active Edge. XDA doesn't allow new members to put links in posts until they have posted 10 times for security reasons. Once I can, I will definitely put links in the description.
Click to expand...
Click to collapse
Update: I can add links on mobile completely fine. :laugh:
Nice! Will map a button to a broadcast intent be implemented?
Droidphilev said:
Nice! Will map a button to a broadcast intent be implemented?
Click to expand...
Click to collapse
Yeah! Great idea. I've added it to the "issues" on the GitHub repo. I have exams coming up so it will probably be a couple months.
It would be great if you could add the possibility to force close the app in use! Thanks and keep up the work!
articuz said:
It would be great if you could add the possibility to force close the app in use! Thanks and keep up the work!
Click to expand...
Click to collapse
Thanks! That's now been added to the planned features. Would you say the app is stable enough to come out of beta?
New version!
1.1.0 Beta 1
Added
Setting to change the long-press delay.
Persistent notification which can pause/resume your remaps. It can also open the accessibility settings on the device to enable/disable the service. Rooted devices can start/stop the accessibility service without going into settings and just tap the notification.
Use Material Design 2 for homescreen.
Bugs Fixed
Persistent notifications wouldn't show on boot
The app would crash if using the "open google assistant" action if the Google app wasn't installed.
Prevent the accessibility service from stopping if there is a fatal exception and show a toast when it happens.
New version!
1.1.0 Beta 2
Won't immediately crash on KitKat anymore!
Bug Fixes
Persistent IME notification wouldn't automatically show when it is enabled.
App would crash if it couldn't find the device's accessibility settings page.
Feature request:
App currently conflicts if the same button is mapped twice
Example
Short press mute = play/pause
Long press mute= open notification drawer
Result:
Long press mute results in both actions being performed.
Expected result:
Long press mute key should not activate the short press mapping
Fixes:
1. Change short press so that it ONLY activates if the button is RELEASED before the long press kicks in (should be around 500ms)
(Long press delay meaning how long the key must be held before performing the function)
Long press actions should happen if the button is NOT released within that time.
2. Multi-triggers should have a flag for "in sequence" that makes them work in sequence instead simultaneously. In sequence enabled should also Grey out / disable the long press flag on the current trigger.
And you should be able to set the same trigger twice.
Example: vol up, vol up = quick settings
To do this, you'd have to make it so that short presses are only activated if the button is released before the long press delay AND there are no other key presses within 300ms of releasing it
Great app.
Thanks
Nah.uhh said:
Feature request:
App currently conflicts if the same button is mapped twice
Example
Short press mute = play/pause
Long press mute= open notification drawer
Result:
Long press mute results in both actions being performed.
Expected result:
Long press mute key should not activate the short press mapping
Fixes:
1. Change short press so that it ONLY activates if the button is RELEASED before the long press kicks in (should be around 500ms)
(Long press delay meaning how long the key must be held before performing the function)
Long press actions should happen if the button is NOT released within that time.
2. Multi-triggers should have a flag for "in sequence" that makes them work in sequence instead simultaneously. In sequence enabled should also Grey out / disable the long press flag on the current trigger.
And you should be able to set the same trigger twice.
Example: vol up, vol up = quick settings
To do this, you'd have to make it so that short presses are only activated if the button is released before the long press delay AND there are no other key presses within 300ms of releasing it
Great app.
Thanks
Click to expand...
Click to collapse
Thanks for the feedback! I'll try to implement/fix these problems. They should be relatively easy to fix (hopefully). ?
New version!
1.1.0 Beta 3
Reduced the repeat delay to 5ms
Force expand the menu on the homescreen
Made the cards on the homescreen slightly more compact
Added
Flag to vibrate and an option to force vibrate for all actions
Action which just consumes the keyevent and does nothing
Action to lock the device (ROOT only for now) and an option to lock the device securely (without root).
Bug fixes
The bottom app bar on the homescreen would overlap the list items
The app would potentially crash when trying to perform a flashlight action whilst the camera is in use in another app.
Short press actions with the same trigger as a long press action would be performed with the long press action
A keymap would still have the "Show volume dialog" flag if the action is changed to a non volume related action
The app would crash if trying to show the menu on the homescreen if it is already showing.
The accessibility service status on the homescreen wouldn't change when the service is started/stopped.
Hi,
it is possible to make it work with the Mi Box S controller? Especially with the Netflix and Live buttons, I tried the back button and it works, but not those two "special" buttons. I will be very grateful
Sent from my Lenovo TB-8704F using XDA Labs
Ja_som said:
Hi,
it is possible to make it work with the Mi Box S controller? Especially with the Netflix and Live buttons, I tried the back button and it works, but not those two "special" buttons. I will be very grateful
Sent from my Lenovo TB-8704F using XDA Labs
Click to expand...
Click to collapse
Do the other buttons also work? I'm guessing the Netflix and Live buttons don't send a standard KeyEvent which apps installed by the user can see. Xiaomi probably have some agreement with Netfix to have that button there to drive more people to Netflix which is why they don't want us changing it.
sds100 said:
Do the other buttons also work? I'm guessing the Netflix and Live buttons don't send a standard KeyEvent which apps installed by the user can see. Xiaomi probably have some agreement with Netfix to have that button there to drive more people to Netflix which is why they don't want us changing it.
Click to expand...
Click to collapse
Most buttons work, home, back, left, right, up and down are recognized propperly. OK and 'all apps' (not sure if it the right name of that button) have no name in triggers but they work. If I try to record trigger with vol. up or down, it is not recorded, it just changes the volume. The mic. button is recorded with no name, but when I try to use it to trigger the action it does nothing.
Sent from my Lenovo TB-8704F using XDA Labs
Ja_som said:
Most buttons work, home, back, left, right, up and down are recognized propperly. OK and 'all apps' (not sure if it the right name of that button) have no name in triggers but they work. If I try to record trigger with vol. up or down, it is not recorded, it just changes the volume. The mic. button is recorded with no name, but when I try to use it to trigger the action it does nothing.
Sent from my Lenovo TB-8704F using XDA Labs
Click to expand...
Click to collapse
Hmmm... I'll firstly add names to more buttons so they aren't blank. I'm sorry but I don't really know what to do. This behaviour sounds like the accessibility service is broken somehow and needs disabling and then enabling. This has happened to me before during development. But it is likely those buttons won't work. It's quite hit and miss when it comes to non-standard buttons/controllers unfortunately.
No success with Bixby button on S10

[Feature Request] Key Up/Down Action

In >Settings >Controls >Key Up/Down Action the 2 options are change sound volume or change brightness. Would be nice to have a third option to do nothing or disable any function from happening when up/down is pressed during playback. I've used MX for years and find the volume is accidentally set below max quite often. Thanks for reading!
Just realized there is a recent post about this: https://forum.xda-developers.com/apps/mx-player/ui-ux-tweaks-to-make-mx-player-perfect-t3940592
I agree with OathYvne and wanted to also mention that navigating up from bottom control buttons/progress bar will highlight the video (or an invisible button) causing an extra keystroke. Best android player by far!

Categories

Resources