Powerful tool (1): Capslock +

Capslock + utilizes the Capslock key, which is rarely used on the keyboard, to achieve many powerful operations.
Capslock + is open source, the source code is on Github, click here to view , no mandatory fees.
Official website: Capslock + official website

basic skills

  • Cursor movement

capslock + e cursor up
capslock + d cursor down
capslock + s cursor left
capslock + f cursor right
Insert picture description here

capslock + a The cursor skips a word to the left
capslock + g The cursor skips a word to the right
When using a and g Chinese characters may skip the entire sentence skip
capslock + y Cursor up 5 lines
capslock + b Cursor 5 lines down
Insert picture description here

capslock + = move the cursor down one page
capslock +-move the cursor up one page
capslock + p cursor to the
beginning of the line capslock +; cursor to the end of the line
Insert picture description here

  • Cursor selection

capslock + i cursor up selects
capslock + k cursor down selects
capslock + j cursor selects left selects
capslock + l (is lowercase letter L) cursor selects right selects

capslock + h The cursor selects a word to the left
capslock + n The cursor selects a word to the right The
same as a and g, h and n may choose the entire sentence for Chinese characters
Insert picture description here

capslock + 0 Cursor up to select 5 lines
capslock + m Cursor down to select 5 lines
capslock + u Cursor to line preferred
capslock + o Cursor to line end selected
Insert picture description here

  • Insert symbol

capslock + 9 insert ()
capslock + [insert {}
capslock + 'insert ""
capslock +, insert <> The
above 4 items are inserted on both sides of the text when the text is selected
Insert picture description here

  • Other modification operations

capslock + w is equal to Backspace
capslock + r is equal to delete
capslock + Backspace Delete the line where the cursor is located
capslock + z Undo
Continuously pressing capslock + z will alternately cancel and redo
Insert picture description here

capslock + space is equal to Enter
capslock + Enter Whether the cursor is at the end of the line, directly wrap
Insert picture description here

capslock + c capslock + x capslock + v and ctrl + c independent set of clipboards
When text is selected, operate on the
selected text When text is not selected, operate on the text in the line where the cursor is located
Insert picture description here

  • translation

capslock + t translation, the default is Youdao translation, you can select or uncheck if the translation is
not selected, if the cursor is on the right side of the entire sentence or the entire word, or the cursor is in the middle of the sentence or word, you can translate the sentence or Word When the
cursor is on the left side of a sentence or word, the previous sentence or word will be translated. It is
recommended that English not be selected for translation, and Chinese is selected for translation.
Note
1. The translation panel can be modified, press Enter after re-entering to continue the translation
2. Get the word sent through ctrl + c implementation, please make sure that ctrl + c will not have additional operations when you press capslock + t
3. The translation function is implemented through Youdao API, and the request frequency is limited to 1000 times per hour, that is, everyone who uses the translation function The number of translations within one hour cannot exceed 1000, the method of breaking through the restrictions is introduced below

Insert picture description here

  • Combine with LAlt (Alt key on the left)
  • Temporarily change the mouse speed

Press and hold capslock + LAlt to temporarily change the speed of the mouse, press and hold capslock + LAlt and then use the scroll wheel to scroll up and down to increase or decrease the speed. Generally, you should first set the speed with the scroll wheel, release LAlt and capslock and then press together to temporarily change speed
Insert picture description here

  • Switch between different windows

capslock + LAlt + e Switch the window above the current window
capslock + LAlt + d Switch the window below the current window
capslock + LAlt + s Switch the window on the left of the current window
capslock + LAlt + f Switch the window on the right of the current window
capslock + LAlt + a Switch The leftmost window of the current window,
capslock + LAlt + g, switches the rightmost window
of the current window. The determination of the position of the window is based on the horizontal and vertical center line of the current window.
Insert picture description here

  • Quickly open / close windows

capslock + LAlt + j minimize the current window and record the current window as capslock + LAlt + l (lowercase L) the upcoming window
capslock + LAlt + k minimize the current window and record the current window as capslock + LAlt + l last Opened window
This is similar to the queue. Capslock + LAlt + j puts the window into the head of the team, capslock + LAlt + k puts the window into the tail of the team.
Capslock + LAlt + l opens the first window in the queue and moves it out of the queue
capslock + LAlt + h Clear the record of the window queue
Insert picture description here

  • Switch tab

capslock + LAlt + w equals ctrl + shift + tab
capslock + LAlt + r equals ctrl + tab
Insert picture description here

  • Simulate cursor scrolling

capslock + LAlt + y page moves up 5 lines, the cursor does not move
capslock + LAlt + b page moves down 5 lines, the cursor does not move
capslock + LAlt +-cursor moves to the top
capslock + LAlt + = cursor moves to the end of the page
Insert picture description here

  • The third set of shears
    ctrl + x / c / v is the first set, capslock + x / c / v is the second set, and capslock + LAlt + x / c / v is the third set
    . When the text is selected, the text is copied. When the text is not selected, the text
    capslock + F12 can be copied to close the function of the independent clipboard. After closing, capslock + x / c / v and capslock + LAlt + x / c / v are invalid, and capslock + F12 can be reopened

Insert picture description here

  • F1-F6 function

capslock + F1 Open the help document page
capslock + F2 pop up the calculation panel.
When the calculation panel is activated, if it is switched to uppercase, part of the main keyboard is replaced with a small keyboard, the corresponding relationship is as follows
u --------- --8 i ----------- 9 o ---------- 0 p ----------- * [-------- ------- /
j ------------ 4 k ---------- 5 l ---------- 6; --- --------- + '--------------- (minus sign)
m ---------- 1, ------- ---- 2 .----------- 3 space ---- 0 RAlt ----------.
Shift + Enter will output the calculation result to the next line, ctrl + Enter or capslock + space is a line break
Insert picture description here

capslock + F3 next song
capslock + F4 short-press to change the window to semi-transparent
Long- press to match the scroll wheel to change the transparency
If the current window's transparency is not completely opaque or semi-transparent, the window will be completely opaque first
Insert picture description here

capslock + F5 reload capslock +
capslock + F6 to top / untop a window, that is, if the window is not topped, the window is topped, if the window is topped, the window is topped
Insert picture description here

Advanced Features

  • [Global] global settings in CapsLock + settings.ini

loadScript: the JS file to be loaded (to be placed in the loadScript folder), separated by commas
allowClipboard: whether to allow the use of a separate clipboard, 1 is yes, 0 is no, the default 1
mouseSpeed: the mouse when pressing capslock + LAlt Speed, range 1-20, default 3
autostart: whether to boot, 1 is yes, 0 is no, default 0
loadingAnimation: whether to start the program to load animation, 1 is yes, 0 is no, default 1
Insert picture description here

  • capslock + Tab: completion + calculation

1. Completion
This completion actually replaces a certain string with your own custom string, which needs to be set in
CapsLock + settings.ini under the position of capslock + . There are three fields in CapsLock + settings.ini with strings Replacement functions are [TabHotString], [QRun] and [QWeb], the priority is [TabHotString]> [QRun]> [QWeb], that is, if all three fields have the same key name, they will be prioritized Replace in order, but it is best not to repeat the key name. The best replacement is set in [TabHotString]. The
format is: key name = string to be replaced
Insert picture description here

2. Calculation ( for more rigorous calculations, such as money calculation, use with caution )
calculation is actually running the corresponding JavaScript code, processing the character on the left of the cursor, until it encounters the first space or the beginning of the line, the string It will be considered as an expression.
When the expression does not have =, the original expression will be replaced. When the expression has =, the result will be output to the right of =.
If the result cannot be calculated, it will be returned. If the expression has spaces , You must first select the expression or add `to the head of the expression. If the expression spans multiple lines, you can only select
Insert picture description here

To use the JS custom function,
first write your own .js file, put it in the loadScript folder under the capslock + folder, and then in [Global] in CapsLock + settings.ini, add after loadScript = scriptDemo.js , Add your own js file name, save, capslock + F5 reload capslock +, then you can use
some defined functions and examples in scriptDemo.js, you can refer to
Insert picture description here

For example, I wrote it myself my.js contains the following two functions (JS ... I will not be the only imitate someone else to write)
Insert picture description here
then ...
Insert picture description here
If a direct hit, then the function name will appear in the source code function
can also be Use string functions for multi-line strings, but first select
Insert picture description here

  • Advanced settings for translation

Since Youdao API can only translate 1000 times per hour, please go to Youdao Zhiyun to apply for an independent key. After
applying, write the key to [TTranslate] under CapsLock + settings.ini in the installation directory of capslock + segment

The free version fills in apiType = 0 apiKey = xxxx (key you applied for) KeyFrom = xxxx the
Insert picture description here
paid version fills in apiType = 1 apiKey = xxxx (key you applied for)
Insert picture description here

  • Window binding

There are three modes of window binding: the
first one: directly bind
capslock + LAlt + 1-8, bind the current window to the corresponding button,
and then capslock + 1-8, will activate the window bound to the corresponding button
(1- 8, capslock + 9 is to insert parentheses, capslock + 0 is to select 5 lines upward)
If the current window is not a bound window, switch to the key binding window first, if the current window is a key binding window, it will be minimized The window, or recover from minimization

In addition, capslock + LAlt + anti-single quotes (`, left of the number 1 in the main keyboard area) can also be bound to the window, capslock + anti-single quotes when activated
Insert picture description here

The second type: bind multiple windows to the same button (press twice)
to select a certain window first, capslock + LAlt + 1 bind (press twice 1), after selecting another window, then capslock + LAlt + twice 1, then capslock + 1 will open the window in the order of binding. When it is pressed multiple times, it is similar to Alt + tab to switch the bound window. The most commonly used window will be opened first. The
Insert picture description here
third kind: put all the windows of the program to which the current window belongs Bind (press three times) For
example, if you open three txt, switch to one of the three txt, press capslock + LAlt + 1 (press three times 1), then all three txt are bound to capslock + 1, and then Press capslock + 1 to switch between these three txt. Similar to Alt + tab, the most commonly used windows will also be opened first.
Insert picture description here
Mode three is similar to mode two. Mode two can bind windows of different programs to the same key. Bind separately, mode three binds to all windows of the same program, only need to bind once

  • Qbar

Qbar is a box that pops up by pressing capslock + q, you can easily browse files, open files, and open web pages or search with the engine. Esc can be closed. Press capslock + q again to get the focus. After selecting the character, press capslock + q will automatically Fill in, select the file will fill in the path.

Insert picture description here

Enter cl set to set CapsLock + settings.ini file.
Qbar can also use wildcards,? Means single, means multiple, such as a? B matches aab, abb, acb, adb, etc.
a
b matches abb, abbb, accb, etc. (not distinguished Case)

Insert picture description here

You can press / or \ or tab to enter the next folder, press capslock + to return to the previous layer
Insert picture description here

  • QRun in Qbar

You can add the program you want to run quickly under [QRun] in CapsLock + settings.ini, just type the corresponding name in Qbar, or you can set it directly in Qbar using "-> run", the format is :
Xxx-> xxx
or
xxx-> run xxx
Note the first
type- > there are spaces on both sides, the second type- > there is a space in front, followed by run, and there is a space after run QRun can also set the program used to open the file , For example, under [QRun] there is aa = "xxxx / xxx.exe", bb = "xxx / xxxx", then bb will be opened with aa
Insert picture description here

  • QSearch in Qbar

This can be quickly searched with a search engine, built-in bd (Baidu), wk (Wiki), g (Google), m (MDN), tb (Taobao), the default is Baidu
Insert picture description here

Of course, it can be customized ...
For example, to change the default search engine, add [default = xxxxx] in [QSearch] in CapsLock + settings.ini
or directly in Qbar default-> xxxx.
This requires the search keywords to be located through the URL, Modify the keywords to {q} and
Insert picture description here
Insert picture description here
add your own search engine. Add it to [QSearch] in CapsLock + settings.ini, or use-> search in Qbar
Insert picture description here

  • QWeb in Qbar

Open the website and enter the URL directly. You can use-> web definition in Qbar or under [QWeb] in CapsLock + settings.ini. Xxx = xxxx
Insert picture description here
ctrl + Enter can add www. In the front and add in the back .com, such as typing taobao, ctrl + Enter will open www.taobao.com, for .net, .com, .org, www., http: //, https: // can be directly opened as a URL instead of The default engine to search , some specific websites can be opened with web xxxx

Insert picture description here

  • Customize the style of Qbar

The
color set under [QStyle] in CapsLock + settings.ini can be one of the 16 basic HTML colors or a 6-bit RGB color value (the 0x prefix can be omitted). For example: red, ffffaa, FFFFAA, 0xFFFFAA. The color settings below are the same.
borderBackgroundColor ----- background color, default red
borderRadius ------------------- degree of rounded corners of border, default 9
textBackgroundColor --------- text The background color of the input box, the default green
textColor ------------------------- The color of the input text, the default ffffff, white
editFontName ------ ------------ The font of the input text, the default Hiragino Sans GB W6
editFontSize -------------------- The size of the input text, the default 12
listFontName ------------------- Prompt list font, default consoals
listFontSize --------------------- Prompt list font Size, default 10
listBackgroundColor ---------- prompt list background color, default blue
listColor -------------------------- prompt List text color, default 0x000000
listCount ------------------------- Prompt list line number, default 5
lineHeight ----------------------- Height of each line in the prompt list, default 19
progressColor ----------------- -The color of the progress bar, the default is 0x00cc99. For
example, this is my Qbar (so ugly, right? It seems to be more than the default ...)
Insert picture description here

  • Customize some keys

Under [Keys] in CapsLock + settings.ini, you can change the function of some capslock + buttons, and you can also add some buttons. Capslock + supports the following buttons:
Capslock + (LALt +) F1 ~ F12
Capslock + (LALt +) 0 ~ 9
Capslock + (LALt +) a ~ z
Capslock + (LALt +)-= []; ',. /
Capslock + (LALt +) Backspace, Tab, Enter, Space, RAlt
keyFunc_volumeMute mute
keyFunc_volumeDown volume increase
keyFunc_volumeUp volume decrease
keyFunc_mediaPrev up A
keyFunc_mediaPlayPause play / pause
starts with caps_, the letters are expressed in lower case, F1-F12 is expressed in f1-f12, LALt is expressed in lalt, and the key position starts with keyFunc_, such as caps_j = keyFunc_selectLeft, specific use capslock + q input cl CapsLock View
in + settingsDemo.ini For example, if you add caps_lalt_9 = keyFunc_volumeMut under [Keys] in CapsLock + settings.ini, press capslock + LAlt + 9 to mute
Insert picture description here

------------------------------------------------ gone -------------------------------------------------- --------

This is basically all the features of capslock +. The author does n’t seem to update much. The latest version is 16 years old.

One problem is that in fact capslock + e / d / s / f cannot completely replace the up, down, left, and right arrow keys. For example, Alt + ← is backward, but Alt + capslcok + s does not react. When capslock is used in combination with other keys Cannot replace

Guess you like

Origin www.cnblogs.com/6b7b5fc3/p/12709853.html