iberianpig / fusuma-plugin-keypress

Keypress combination plugin for Fusuma
https://github.com/iberianpig/fusuma#available-plugins
MIT License
26 stars 4 forks source link

Trigger a command multiple times while keeping the key pressed #1

Closed foltri closed 4 years ago

foltri commented 4 years ago

If I want to trigger a command multiple times I have to release and press the key again. Otherwise the gesture triggers a different command that corresponds to the same gesture without the keypress. I was wondering if it's possible to trigger the same command by keeping the key pressed while performing the touchpad gesture multiple times.

4:
  left:
    command: 'xdotool key super+Tab'          # 1st command
    keypress:
      LEFTMETA:
        command: 'xdotool key super+Right'    # 2nd command

If I do the following:

[ ..... LEFTMETA pressed ..... ] [ gesture ][ gesture ][ gesture ]

Current behavior is: 2nd command, 1st command, 1st command Expected behavior is: 2nd command, 2nd command, 2nd command

iberianpig commented 4 years ago

Thanks for reporting. I reproduced this behavior.

Generally, fusuma clears all buffered events after the trigger command. The keypress event should remain in buffer even if triggering the command.

To fix this issue, I should implement hooks on the main unit side, not only this plugin.

iberianpig commented 4 years ago

@foltri I updated fusuma and fixed issue, and updated fusuma-plugin-keypress(only dependency versioning) Please check to fix with running the following command on the terminal. sudo gem update fusuma-plugin-keypress

foltri commented 4 years ago

It works perfectly. Thanks a lot.