Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebind script toggle key w to something else? #71

Closed
Zren opened this issue Apr 19, 2022 · 3 comments
Closed

Rebind script toggle key w to something else? #71

Zren opened this issue Apr 19, 2022 · 3 comments

Comments

@Zren
Copy link
Owner

Zren commented Apr 19, 2022

Hmm, I just noticed that w appears to change the caption display style. The rectangle box around text goes from 0% 50% 90% 100% opacity.

@leadra
Copy link

leadra commented Apr 20, 2022

不好意思我不知道是不是我關鍵字問題
google代碼
都沒看到哪個正確
Escape不行
ESC不行

@Zren
Copy link
Owner Author

Zren commented Apr 20, 2022

keyup { key: "4", keyCode: 52 }
keyup { key: "ArrowUp", keyCode: 38 }
keyup { key: "Escape", keyCode: 27 }
scriptToggleKey = 'Escape'

Hmmm, that does not work. Looks like you also need to change from the keypress event to the keyup event. At the bottom of the script, change

    scriptToggleKey = 'w'
    ...
    window.addEventListener('keypress', function(e){
        var isKey = e.key === scriptToggleKey
        var validTarget = (
        ...
    scriptToggleKey = 'Escape'
    ...
    window.addEventListener('keyup', function(e){
        var isKey = e.key === scriptToggleKey
        var validTarget = (

@leadra
Copy link

leadra commented Apr 20, 2022

成功了!!
原來按鍵的屬性也不同啊..學到了
感謝你也不好意思因為之前用的腳本Maximize Video導致習慣,H5通用的
但是您的專用腳本,速度快又順,有針對性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants