Task:
Replace the n (n> 2) tab key with a few buttons on the webpage
Solution:
Mac:
1) install quicksilver;
2) write an applescript and input n tab keys to the browser;
3) Use quicksilver's shortcut key function to call scripts;
Windows:
1) install autohotkey;
Linux:
Write a C program and directly call/dev/uinput to simulate user input (no specific implementation is made. It is estimated that you have not used this system.
I need to implement it again =. =)
Specific solution:
Mac:
1) download the corresponding version of the system to the http://qsapp.com/download.php for installation;
2) Open the "applescript Editor" to edit the script and enter the following code:
------------------------------------------
Activate application "Google Chrome"
Repeat 12 times
Tell application "system events"
Key code 48
End tell
End repeat
------------------------------------------------------------------------------
PS: The above code is entered in Linux. If there is a problem after the copy and paste (it may be a problem with encoding), please be more independent.
Input it again
12 In the code indicates the number of times the tab key is simulated. key code 48 indicates the number of the tab key under the apple system. If necessary, you can
Change it by yourself ~
3) After compiling and running the above script, save it.
4) Open the triggers interface of quicksilver, go to the custom triggers panel, click the plus sign "+" below, and select
Hotkey: Find the saved script in the first page of the new Panel (press the left and right arrow keys to convert the directory ).
Run it. You do not need to change it. Press the Enter key or click Save to save it;
5) a new project is displayed on the blank panel, but the trigger on the right says none. Click and select
(It is not recommended that the shortcut key contain the CTRL or Mac Chinese knot key, because it is easy to conflict with the existing Shortcut Key ),
Save it!
PS: Steps 4 and 5 are the basic operations of quicksilver. There are related tutorials on the Internet. You can refer to Google ^_^.
PPS: My current script is written in Goole chrome. Safar I tried it. The Tab key itself cannot be issued to you in the safari environment.
Although I also wrote a script to switch the table unit, it is estimated that the Code will not be pasted if it is not used.
Pss: Quick Silver is very powerful. You can play with it if you are interested ~
Windwos:
Sleepy =. = You don't seem to use Windows either. If you need it, let me write it again...
Result:
Mac:
After pressing the shortcut key twice in chrome, why is it twice !? Forgive me for being lazy. I want to go to bed. = ...),
You can see the same effect as pressing the tab key 12 times. The effect is already in Sina.com, guokr.com, zhihu.com,
Baidu.com and Google.com have labs. Please accept them ~
Windows:
Omitted
Linux:
None
One-click replacement of multiple keys