Need help with the eraser shortcut on my stylus

Hey, I just downloaded Krita and was trying to configure it to my graphic tablet which is an XP-Pen Artist 12, which comes with a stylus that has buttons for shortcuts, including one on the tip to use as an eraser, however, when I try to configure krita so that that button acts as an eraser it doesn’t work, it just activates and deactivates the eraser mode thingy, but I want it to work so that when it’s pressed it erases but when i go back to my regular tip it’s a brush without the need of pressing anything else. I have tried to use the tool invocation settings but i don’t really understand how it works, I would also like to configure the other button on my stylus so that it works as the color sampler, but only when it’s pressed, so that if i stop pressing the button it just goes back to my brush. Please help me with these things.

:slight_smile: Hello @shadow117 and welcome to the forum!

For your eraser, turn your pen around and select one of Kritas eraser presets from the Brush Presets Docker, Krita will use it from then on.
If you want to call the color sampler, then you have to assign CTRL to one of your buttons.
But before assigning any shortcuts, it is strongly advised to create a profile for Krita (okay, it is advised for any software you use with your graphics tablet), how this is done with your tablet is found in your manual.

Michelist

1 Like

Hello and thank you for answering! I have already tried to but Ctrl as a shortcut for the color sampler but it doesn’t work, it’s weird because it shows the color sampler but it doesn’t pick up the colors

It is not enough to hover over the tablet with the pen. The pen must touch the tablet while the key combination is pressed, whether with the pen or the keyboard.

Michelist

Yeah that’s what I mean, it just doesn’t work, or maybe mine it’s just buggy, right now I don’t have access to my laptop, but when I do I’ll try to restart it to see if it works and I’ll tell you, thanks!

1 Like

Okay, do so. I would have been busy with other things for a few hours anyway. So may be others step in to help you further.

Michelist

I do not have an XP-pen tablet, but if you can map your pen button to a specific keyboard keystroke, then you can create an eraser toggle two different ways


Toggle an eraser brush preset

Step 1: Map your pen button to “Shift + E” (or another character)

Step 2: Update one of the Ten Brushes activate brush preset with your selected keystroke

Step 3: Set an eraser brush preset in Ten Brushes (Tools → Script → Ten Brushes)

Check the boxes at the bottom, if you want to be able to switch back to your previous brush preset


Toggle eraser mode
If you want to toggle the eraser mode, and not a specific eraser preset, then you can set it up directly in keyboard shortcuts


Now it should work :slight_smile:

1 Like

Here it is about a two-sided pen, where the one end has the usual known nib and the other end, even without having a nib, works as a brush too but has no pressure, and you assign anything to it, identical to the nib-side. Here, most assign an eraser preset, and you do not need to use any shortcut to use it, you just turn your stylus and can erase with the assigned eraser preset or any other preset you like and have set to erasing mode, Krita recognizes the used side and automatically selects the last used preset.
So it is very similar to a pencil with rubber-eraser on the end, just turn and use it.

Michelist

2 Likes

Double sided pens (stylus with a functional tip on both ends) can use any brush preset in Krita, not just the eraser (for any end). Just as Michelist already mentioned, you have to select an eraser preset with the eraser end first but in fact any will work. By default it might use the same basic round brush the painting tip uses which makes it look like it’s not working.

1 Like

I do not think XP-pen artist 12 pro has a double sided pen. Instead, it looks like XP-pen created a dedicated button to toggle the eraser:

If this button can be remapped to a keystroke, then they should be able to create an eraser toggle in Krita :slight_smile:

In that case things become difficult because in Krita eraser mode is not the same as selecting a dedicated eraser brush preset. Eraser mode pretty much just changed the current brush to delete keeping all the texture, brush tip and dynamics the same, while a dedicated eraser preset can work completely different.

Hey! Thank you so much for answering but it’s not working the way I’m trying to make it work:( If I follow what you first said, when I press the other side of mys stylus (the one that simulates an eraser) it just switches to the eraser, but i can not eraser with that tip, I have to switch my stylus again to the brush tip to erase, and if I press the eraser button on my stylus again it doesn’t switch back to my brush, and if I just configure my stylus so that it just has the toggle eraser mod shortcut kinda the same thing happens but in this case if I press it again it goes back to the regular brush, I’m trying to make it so that I can erase with the eraser tip on my stylus and just use the brush side as a brush, like an actual pencil, kinda like in paint tool sai works.

I have tried to upload a video showing what happens but it says I can’t because I’m new.

Hey, I have restarted my device but the same thing still happens, I tried to see if it was something to do with my stylus so I did it with my mouse by just pressing the Ctrl key and clicking with my mouse and it did work, I have no idea if it is because it doesn’t detect the tip of my stylus as a left -click or something.

Do you mean the default “Eraser” that comes already on as a shortcut on that part of my stylus on the Artist 12 program? I don’t know why but even before my post I have tried to use it but it didn’t work, but now I checked it again and it did. Thank you so much, if you didn’t have said that I probably wouldn’t have tried it again!!

I was drawing right now and it was working perfectly, but then I had to restart my laptop, so I did and when I re opened my drawing it stopped working, I don’t know what to do to make it work again:(

You don’t happen to use something like an institutional PC, i.e. a computer lent to you by a school or perhaps your employer? If so, then it may be that your PC is restricted by so-called policies or even uses guard software that repeatedly undoes certain changes. Policies are sets of rules that can do many things to a computer, e.g. trigger the uninstallation of drivers that the owner of your PC has not authorized, and other things.


I don’t know if there are “crippled” special versions of Windows 11, like there were for Windows 10, and your problem stems from those limitations, such as a removed multimedia system in the EU version or a Korean version with some features removed.


About your video issue:
New users can post videos, there are plenty of examples where users have posted videos in their very first post. But your video must meet certain conditions, like it must be under 3MB in size, and in between I have a strong feeling that you must have completed Kiki’s tutorial on how to use our forum offered to you by our forum bot Kiki in the Greetings topic, at least if you answer the questions Kiki asked and follow the advice she gave instead of skipping it like many do. And the gift Kiki hinted at is the earlier usable features, like posting videos.


Your tablet does not provide eraser-functions, it only provides signals that are interpreted by the interfaces of your computer. The interface and signals that represent the end of your stylus communicates via Windows with your tablet’s driver Application, which then hands these signals over to a Qt-API that stands between Krita and your tablet’s functionalities.
Only the fact that many art programs per se decode the signal coming from the end of a stylus as an eraser does not mean your tablet provides this or any other functionality, it usually only makes the most sense to translate the signals of a specialized hardware in the way it is intended.
The functions you use are always provided by the program that interprets the signals of the respective hardware and, in the case of painting programs such as Krita, works of art are then created from them.
But Krita doesn’t care whether you assign an eraser or the paint pipette to the end of your stylus, and the programs don’t check whether the assignment you make makes sense or not.
But in order to be able to use these combinations of hardware, operating system, program(able) interfaces (APIs), and finally the programs at the end of the signal chain, they are usually assigned the functions intended for the switches and sensors.
However, there are always examples of users using controllers other than the usual ones to operate software, with varying degrees of success, for example game pads.

Michelist

1 Like

Hello @Michelist ! No, my laptop is personal, and btw it worked again, I think it had to do with me pressing another brush with the eraser side or something like that, I honestly don’t know, but I managed to fix it somehow xd

1 Like

Oh and about the video it was in fact the size of it, I just checked.

Edit: I said that because the video is above 3 megabytes, but when I tried to attach one that ism’t above 3 megabytes a message pops up saying that “New users cannot upload attachments” like it did with the first video but weirdly enough it does let me attach the screenshot lol

1 Like

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