Open Combinacijus opened 4 years ago
For example when I map shift to a button (for resizing brush in Krita) it won't work because it only clicks once and do not hold. This happens because how python script call xdotool key instead of xdotool keydown (sequence come from config file) here: https://github.com/joseluis/huion-linux-drivers/blob/763e5da2533f1e57b642b2987fe57c19f9dd8d6a/huion-tablet-driver.py#L498 when config looks like this:
xdotool key
xdotool keydown
[menu_4b_simple] b0 = key ctrl+z # undo (krita) b1 = key shift # resize brush (krita) ...
Workaround In config change key to keydown for button which need hold
key
keydown
[menu_4b_simple] b0 = key ctrl+z # undo (krita) b1 = keydown shift # resize brush (krita) ...
But now it won't release so we need to modify driver to release that button in this case shift (couldn't find a general solution). I did it by calling xdotool keyup in this case using keypress function gives same result. So I added else statement for this if: https://github.com/joseluis/huion-linux-drivers/blob/763e5da2533f1e57b642b2987fe57c19f9dd8d6a/huion-tablet-driver.py#L389
xdotool keyup
if BUTTON_VAL > 0: # 0 means release # Unchanged ... else: # HERE RELEASE ALL KEYS keypress("Shift up", "keyup shift")
For example when I map shift to a button (for resizing brush in Krita) it won't work because it only clicks once and do not hold. This happens because how python script call
xdotool key
instead ofxdotool keydown
(sequence come from config file) here: https://github.com/joseluis/huion-linux-drivers/blob/763e5da2533f1e57b642b2987fe57c19f9dd8d6a/huion-tablet-driver.py#L498 when config looks like this:Workaround In config change
key
tokeydown
for button which need holdBut now it won't release so we need to modify driver to release that button in this case shift (couldn't find a general solution). I did it by calling
xdotool keyup
in this case using keypress function gives same result. So I added else statement for this if: https://github.com/joseluis/huion-linux-drivers/blob/763e5da2533f1e57b642b2987fe57c19f9dd8d6a/huion-tablet-driver.py#L389