Wacom pen button function overrides by GIMP
Using gimp 2.10.12, latest wacom drivers as of 15 August 2019. Wacom ptk-440, but many other tablets have the issue too, at least some bamboo tablets and ptk-640 too I believe. Wacom pen buttons can be assigned keypresses or mouse clicks in all programs except for the GIMP. This bug has been around since at least 2013. I understand from forums around the internet that it has something to do with GTK overriding the buttons. All other buttons on the tablet work normally, the way you assign them. Some people describe that moving the cursor away from the canvas causes the buttons to temporarily work.
I couldn't fix it with autohotkey because I couldn't find the buttons with keybdhook en mousehook. Any help would be highly appreciated, especially since it's open source and it's a selected group of people using intuos 4 and bamboo wacom tablets.