Makes Krita treat the brush and eraser as if they're separate tools. The brush and eraser keep track of presets, size, opacity, flow, etc separately. All added functions can be found under Tools > Separate Brush and Eraser in the shortcuts menu.
If you click the eraser in the top bar, the eraser will toggle on/off for the current tool without changing presets (ie. what Krita does by default).
If you switch from the brush tool to another tool the eraser will automatically be deactivated unless you're holding shift.
Uses input adapter library from shortcuts composer
Download separatebrusheraser.zip and install by going to Tools > Scripts > Import Python Plugin From File...
in Krita and selecting the zip file.
If you're having issues, more information on plugin installation can be found here.