How to use Galaxy Tab S9 S Pen button for eraser

Type of device* : Android Tablet
Brand and version of the device: Samsung Galaxy Tab S9 FE (SM-X510)
System** : Android 14.0

Using Krita 5.1.5 for Android from the Play Store

* graphics tablet/display tablet/2-in-1 laptop/Android tablet
** Windows/Linux/Mac/Android, + version (you’ll find it in Help -> Show system information for bug reports)


Description of the issue (you can include screenshots):
I’ve used krita for a while on my 2-in-1 laptop, but recently got a Samsung S9 FE tablet with the S-Pen and wanted to also be able to use it to draw while on the go more easily.
Mostly the pen works great, but I was used to having the pen button change tools, usually to an eraser, on PC. On my tablet however I can’t get it to do that.

Changing the action under Settings>S-Pen Actions>Button Actions doesn’t do anything and it gives me the feeling that krita isn’t recognising the button press as the S-Pen button press.
I also tried binding the button press to E, under Settings>Keyboard Shortcuts>S-Pen Actions, hoping it would activate erase mode, but I can’t set that as a shortcut because no on-screen keyboard pops up.

Under Settings>Canvas Input Settings>Touch Gestures I was able to set the button (which shows up recognised as the mouse middle button) to toggle eraser, but that isn’t quite what I was looking for.

Is there any way to set it to switch to another tool like how it does on PC?

I don’t have a stylus with dual tips so I can’t test this, but I believe you select your desired eraser while using the eraser end. Krita is supposed to remember which brush preset you choose for each end. It should stay selected until you manually select a different brush for the eraser tip.

1 Like

On your PC, that button will cause the stylus driver to pretend that the stylus has an Eraser Tip. That should be observable in the Tablet Tester.
It seems that doesn’t happen with the Galaxy Tab.

Krita 5.2.2 has the facility to manually switch from the ‘normal’ stylus tip to an Eraser Tip by a keyboard shortcut which is Shift+E.
This is Toggle eraser preset

Can you set the stylus button to generate a keyboard key code?
If you can then the keyboard shortcut for Toggle eraser preset is, apparently, defined in the kritashortcutsrc file as seen here:

Eraser Preset

I didn’t create that shortcut, this is a freshly installed krita 5.2.2.

If you can edit the kritashortcutsrc file then you can change that to any keyboard key combination that isn’t already in use if your stylus button can be made to generate that key combination.

You can also put a Toggle eraser preset icon on the Toolbar if you can’t manage a suitable key combination from the stylus button.

Edit:Add: If your stylus can only generate a key combination that is already in use as a keyboard shortcut, you can disable that existing shortcut by changing it to Custom: None in the Settings.

1 Like

I’m not sure if I can do that, but I’ll try. So far I’ve only been able to get it to do a mouse button. Would it be possible to set the Toggle eraser preset to a mouse button instead of a keyboard shortcut?

Also, as of right now, the latest version of krita available to me for download on the Play Store is 5.1.5. Where can I get the 5.2.2 version for Android?

To think I just was coming here to see if the new update, meaning 5.2.2, had updated this exact thing! But for Tab S8+ in my case. By the way for some reason the recent update isn’t yet on Playstore so you have to get it straight from Krita’s downloads page, and choose your system to get it. I’ll try to see if I can implement what Ahab said and see if it works. Cheers!

4 Likes

Oh okay! I’ll try to install the latest version then and test it out.

When you’re able to test out what Ahab suggested and see if it works and how you did it, keep us posted @Airnyx ! Thanks!

1 Like

You can’t use mouse buttons as keyboard shortcuts. They can only be used as Canvas Inputs.
Would putting it as a Toolbar icon be of any use to you?

I think for now just sticking to using it to toggle erase mode on the same brush is more practical for me than that. It’s a shame it doesn’t work natively though, even being a beta version.
Still works perfectly fine otherwise and I’ll stay on the lookout for anything that might fix this issue. Thanks for the help!

I’ll test it on the WE probably, since I’m a bit swamped with work, but will definitely try it out then and come back with the results.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.