The hotkey should be easy to disable and enable (with another shortcut).The text and keys to enter are string, and should be called by typing r. It should be used in a flash app for easier navigation.Is there a chrome extension that can do it? I've already googled and I haven't found anything.So I need something like Auto Hotkey (https://autohotkey.com/), but for Linux.
How to insert text by hitting a key in chrome?
keyboard shortcuts;chrome
This can be done by use of xbindkeys+xdotool.One has to be careful: if your string, say my-string, contains the letter r, binding xdotool type string to r would cause a loop! To avoid this, I disable xbindkeys, then call xdotool, then enable xbindkeys back. Suppose your string is my-string, you want key F1 to enable the shortcut, and F2 to disable it.Create file ~/.xbindkeysrc to contain:killall xbindkeys && xdotool key Return type my-string && xdotool key Return && xbindkeysrkillall xbindkeysF2Then use your Desktop environment's Settings manager to bind F1 to launching xbindkeys.You can now type F1 { r | <other_keys> }... F2.