yomichan icon indicating copy to clipboard operation
yomichan copied to clipboard

[Feature Request] LMB and RMB and side mouse button inputs for shortcut keys

Open ChubYee opened this issue 2 years ago • 1 comments

ChubYee avatar Jun 26 '22 23:06 ChubYee

As far as I know, side mouse buttons cannot be bound to anything but the default action navigating history in all major browsers supported by Yomichan. Main, auxiliary and secondary (usually LMB, MMB, RMB) [1] and mouse wheel [2] can.

Even setting mousebutton.4th.enabled and mousebutton.5th.enabled to false in Firefox doesn't make the MouseEvent fire with values 3 and 4 (indexing starts from 0) when side buttons are clicked.

However, binding just mouse buttons to Yomichan actions would also interfere with the default functionality of the website such as clicking links or scrolling. Would your use case involve a modifier key or just (a) mouse button(s)?

As a workaround, you can use free tools such as AutoHotkey on Windows [3] to bind mouse buttons to key events in different contexts such as having a browser window and a modifier key active.

  1. https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
  2. https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
  3. https://www.autohotkey.com/

siikamiika avatar Jul 14 '22 20:07 siikamiika