iberianpig / fusuma-plugin-sendkey

Fusuma plugin that sending virtual keyboard events
MIT License
72 stars 2 forks source link

Send BTN_LEFT with sendkey for mouse buttons #36

Closed iberianpig closed 2 months ago

iberianpig commented 2 months ago

Overview

This pull request adds mouse button operations to the sendkey command. With this change, operating mouse buttons will be similar to operating keyboard keys.

Details of Changes

Notes

Usage Example

It is important to note that you need to specify the mouse button with the prefix BTN_ as shown below.

---
context:
  thumbsense: true

remap:
  F: BTN_LEFT # <- remaps to left click using fusuma-plugin-remap
              # fusuma-plugin-remap already supports mouse button operations.

  E: 
    sendkey: LEFTCTRL+BTN_LEFT # <- sends left click with left control key using fusuma-plugin-sendkey
                               # This PR adds mouse button operations to the `sendkey` command.

In command line, following command can be executed to test the feature.

$ fusuma-sendkey BTN_RIGHT
$ fusuma-sendkey -l | grep -i BTN_
BTN_0
BTN_1
BTN_2
BTN_3
BTN_4
BTN_5
BTN_6
BTN_7
BTN_8
BTN_9
BTN_LEFT
BTN_RIGHT
BTN_MIDDLE
BTN_SIDE
BTN_EXTRA
BTN_FORWARD
BTN_BACK
BTN_TASK