⌨Amazing, extendable, readable autohotkey scripts framework utilized by Capslock.
Amazing, extendable, readable autohotkey
scripts framework utilized by Capslock
.
Original core concept is to make your Capslock
key as a new fn
. You have to install AutoHotkey first.
New Features
win + left/right
in Win10, but support split horizontally)Notice
This project is updating very quickly. If you pulled the latest version, remember to delete the old ini
files in order to load new ones to gain new features.
However, I made a menu for you to do this quickly.
This project is in progress. Other fantastic functions will be joined.
Basic usage is according to the default settings. If you are not starter of AHK
, just ignore this. These settings are in HyperSettings.ini
.
In the following part, I will ignore capslock
in keyset.
key | function | description |
---|---|---|
` | toggle capslock | |
alt+1 | switch to virtual desktop 1 | win10 only |
alt+2 | switch to virtual desktop 2 | create desktop before you use it |
alt+3 | switch to virtual desktop 3 | |
h | move left | |
j | move down | |
k | move up | |
l | move right | |
u | page up | |
p | page down | |
i | move to start | |
o | move to end | |
c | copy | |
v | paste | |
↑ | volume up | invisible in win7, but visible in win10 |
↓ | volume down | |
← | prev virtual desktop | |
→ | next virtual desktop | |
space | toggle window always on top | |
1,2,3,4,5 | window bind | |
tab | hyper tab | |
s | hyper search | |
t | google translate | |
alt+r | reload script or settings | |
alt+t | enable double click translate | |
alt+w | move the window to the top | press this key again will move the window back |
alt+s | move the window to the bottom | |
alt+a | move the window to the left | |
alt+d | move the window to the right | |
alt+q | maximize/restore the window | |
alt+e | minimize the window |
By the way, you may want to suspend
| restart
the script when you play games. Press Alt + Esc
will help. And its icon will change.
Here follows the basic configuration in HyperSettings.ini
[Basic]
Admin=0 ;run as admin
Icon=hyper.ico
ScriptMonitor=1 ;notify you about the changes of the scripts
SettingMonitor=1 ;notify you about the changes of the setting
StartUp=1 ;start on windows start
New Feature
I have redesigned the default tray UI. Take a look.
Default action of double click the icon is to open the directory of Capslock++
. Now you can easily modify settings by right click the icon. Also, when your mouse is over the icon, there will be a status information.
More menu options will be joined later.
Default translation is triggered by Capslock + t
. You have to select a word or a sentence at first.
Here’s some examples for you to test.
hola
Olá
مرحبا
Here’s some pictures for demo.
Also, language support has been added to HyperSettings.ini
. Remember to use the language shortcut.
[Trans]
SourceLanguage=auto
TargetLanguage=zh ; for example, change this to es (spanish)
TransDoubleClickBackend=cgdict ; only support english to chinese. change this to google for more translation.
TransSelBackend=google
Surprising New Feature
Double Click To Translate
Capslock + Alt + t
to enable/disable it.cgdict
translation for single. You can also change this to google
HyperSwitch is designed for quick switch between multiple windows. Extremely good for those who need to work with multiple window applications.
I have implemented 2 types of window switch functions.
WindowA
can be used for most applications.WindowB
should be used for web browser
. There is little difference from WindowA
These two functions need to be configured before you use it.
Check default HyperWinSettings.ini
[Chrome]
exe=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
id=ahk_class Chrome_WidgetWin_1 ahk_exe chrome.exe
key=a
typ=B
Just put information of your application here, and assign a key
to it, then you can use it by press Capslock + key
.key
can also be alt_a
if you want Capslock + alt + a
.
About id
, you can figure it out by using windowspy
, which it installed by autohotkey
.
After you finish configuration, it will be auto loaded. The manner of Type 1
functions is:
WindowC
can dynamicly bind any window.Type 2
function does not require any configuration. But it need to be assigned to keymap.
Check Default HyperSettings.ini
[Keymap]
hyper_1=WindowC(1)
hyper_2=WindowC(2)
hyper_3=WindowC(3)
hyper_4=WindowC(4)
hyper_5=WindowC(5)
hyper_minus=WindowCClear
The manner is similar to Type 1
:
To clear a window bind, you got two ways.
Casplock + -
, then its binded keyI only assign 5 WindowC
by default. It supports at most 10 window. But I guess you will never use that much.
HyperTab helps you to auto complete some long strings with simple words, triggered by CapsLock + Tab
.
Take a look at default HyperSetting.ini, you will find this
[Tab]
sample=this is a Tab sample
date1=<GetDateTime>
date2=<GetDateTime(yyyy-M-d)>
Move your cursor after the word sample
, press CapsLock + Tab
, and it will be auto replaced by this is a TabHotString sample
However, I have implemented function support.
In lib/basicfunc.ahk
, you will find this function
GetDateTime(fmt := "yyyy/M/d")
{
FormatTime, CurrentDateTime,, %fmt%
return CurrentDateTime
}
And just use function between <>
, it will be automatically evaluated. What if I need to use <
or >
instead of a function call? Use <<
, >>
instead.
Example
[before] date1 -> [after] 2018/10/6
[before] date2 -> [after] 2018-10-6
Also multiple functions call is supported.
If you want to add your HotString into it, just change HyperSettings.ini. If you need other function, check UserScript
in Usage
.
Surprising New Feature
Autocomplete & suggestion has been added to HyperTab. Currently it will give you suggestions of the last word you input, with the backend of BaiduSuggest
. However I have implemented GoogleSuggest
, which is blocked from mainland. Check this.
Use tab
or enter
to autocomplete the word. Use up
, down
or Capslock + k
, Capslock + j
to choose item. You can also use your mouse to click.
HyperNotify is a notification UI. Here follows some example.
Configuration is simple.
[Notify]
Enable=1
MsgLevel=1
Style=slide
Max=5
About MsgLevel
, set 0
to show all notifications including DEBUG
. However, sometimes it is annoying. Set to 1
to show all necessary notifications including INFO
, SUCCESS
and WARNING
. Set to 2
to show only WARNING
. Higher number means no notification will show up (Same as setting Enable
to 0
).
About Style
, I have implemented three styles for you. slide
means the notification will slide in ane slide out. fade
means fade in and fade out. none
means no any effect.
About Max
, 5
is enough for you to use. It is useful when you need to use DEBUG
mode.
There is a simple tray menu for you to quickly change MsgLevel
.
HyperSearch is designed for intelligent search for the selected text, triggered by Capslock + s
.
Here’s some examples
www.baidu.com
c:\
c:\users
d:\test.txt
word
this is a sentence
For web url, HyperSearch will open it in your default web browser. For file or folder, it will open it by your default program (notepad for .txt file, for example). For word or sentence, it will trigger translation.
Further features are incoming.
Now if want to put your script into capslock++.ahk
, your have to follow these:
global
. If your global variable is important, put them into HyperSettings.RunTime
(check settings.ahk
). However, if you insist to use global
, there is little chance to get you into trouble. I suggest you use static
more.label
outside the function.basicfunc.ahk
. Also you can #include lib/basicfunc.ahk
, #include lib/Gui.ahk
.Then:
lib
or script
.HyperSettings.ini
.Capslock + Alt + r
to reload the script.Ignore Capslock++
on some applications. Edit this in HyperSettings.ini
.
[Ignore]
Code.exe=1
Just throw the execute file names into [ignore]
and set values to 1
. And 0
means nothing.
TODO
HyperSettings.ini
)IsDesktop
Ignore
cgdict
translation (more features of translation are incoming)runfunc
windowutil.ahk
refinedisable on full screen
option for notify
disable on full screen
option the whole scriptthis is a release version
next version will be a release version
TODO
still not a stable version due to new feature
TODO
TODO
this is not a stable version. i’m trying to make a better ui. next stable version will be 0.2.0
settings.ahk
HyperSettings.ini
this is a most bug-fix edition
mouseisover
function not foundwindowcclear
windowc
bind the desktopTODO:
httpget
, tooltip
to basicfuncsplashtext
, streq
..icon
, admin
in INI file#Include
)