gmertes / NflxMultiSubs

Bilingual Subtitles for the Netflix Web App. An actively maintained fork with various bugfixes and improvements to the original NflxMultiSubs.
MIT License
172 stars 23 forks source link

Change Speed Shortcut #40

Closed HalBenHB closed 1 year ago

HalBenHB commented 1 year ago

I'm using your Chrome extension and have a Turkish Q Keyboard. So, I need to press "ğ" and "ü" to change speed. I want to control it via my mouse. I checked your code and what the extension actually waits is KeyCode.219 and KeyCode.221. I want to key these codes to my mouse by AutoHotkey and X-Mouse Button Control, but cannot. I would really like to see a way to remap these keys from your plugin.

gmertes commented 1 year ago

@HalBenHB Thanks for the suggestion, but I don't have any immediate plans to make the keys configurable.

AutoHotkey and X-Mouse Button Control

In principle you should be able to achieve what you want to do with these. Is the problem that you're unable to map the Turkish ğ and ü to a button on the mouse? Are you able to bind the keys [ and ] to a mouse button? Those are the intended keybinds, but the keyCode interface is mapping it to the physical keys rather than the characters (so that correspond to ğ and ü on your keyboard). If you're able to use [ and ] on your mouse, I should be able to fix your problem by using the key character values.

gmertes commented 1 year ago

@HalBenHB

I updated the keyboard event handler so that it now listens to both the physical keys and the character values. So in your case, the playback controller will work with both ğ/ü and [/].

I created a test release here: https://github.com/gmertes/NflxMultiSubs/releases/tag/v2.3.4-alpha

Can you test this for me? Download the zip for chrome or firefox from the release page. You can follow the install instructions here (click on manual install at the bottom). If you bind the keys [ and ] on your mouse it should work now.

HalBenHB commented 1 year ago

I uninstall current version from my Chrome and installed your test release. It gives this error "Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details."

image image

However, it works on Netflix by "ğ" and "ü" on my keyboard. Also, it now supports X-Mouse Button Control when I remap "[" and "]" (not ğ and ü)

image

For your notice, I double checked with these programs before uninstall the current version. X-Mouse Button Control didn't work again for both "ğ/ü" or "[ / ]". However, remapping "ğ/ü" worked fine with AutoHotkey.

#IfWinActive Netflix
XButton1::ğ
XButton2::ü

Still, I will continue from your test version because I don't want to run an AutoHotkey script. XMBC is always on and it automatically change its mapping when I'm on a Window called Netflix. So, thanks for your update.

gmertes commented 1 year ago

Glad to hear it works now, and thanks for testing! That manifest error is normal.

I will push this release (v2.3.4) to the store soon, when that's done I suggest to uninstall the test version and install from the Chrome store again so that you get automatic updates in the future.