議論 » 作成依頼

Button that simulates keyboard shortcut

§
投稿日: 2015/09/20

Button that simulates keyboard shortcut

Hi
Could any one help me with a script, that adds a button to a page, which after click will simulate:

- keyboard shortcut Alt+T
- write text, for example "A B C"
- and press Enter

or at least help me with the "Alt+T" part.
Might be weird but it would make my job a lot easier.

Thanks

woxxomMod
§
投稿日: 2015/09/20
編集日: 2015/09/20

This kind of task is performed usually with specialized utilities like iMacros, AutoHotkey, and dozens of others. Why do you want a userscript which is much more nontrivial to make than this example for Autohokey F1::send !tABC{Enter} that sends the specified keys when you press F1.

§
投稿日: 2015/09/20

This kind of task is performed usually with specialized utilities like iMacros, AutoHotkey, and dozens of others. Why do you want a userscript which is much more nontrivial to make than this example for Autohokey F1::send !tABC{Enter} that sends the specified keys when you press F1.

I am aware of Autohokey, but it wont work for me.
Need to create dozens of buttons that will do what i wrote above.
I would be vary grateful for help.

§
投稿日: 2015/09/20

Firefox 12 and later block certain "untrusted" key events. I haven't seen a clear definition of "untrusted" but I think script-generated keypresses that would take effect outside of the page definitely would be disregarded.

返信を投稿

返信を投稿するにはログインしてください

长期地址
遇到问题?请前往 GitHub 提 Issues。