Created
November 9, 2020 23:42
-
-
Save Kolenov/acee36f573576a2ea252bb5ad67b6137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; -------------------------------------------------------------- | |
; NOTES | |
; -------------------------------------------------------------- | |
; ! = ALT | |
; ^ = CTRL | |
; + = SHIFT | |
; # = WIN | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; #InstallKeybdHook | |
; KeyHistory | |
; Disable win + space shortcut | |
#space:: Exit | |
^space:: | |
SetFormat, Integer, H | |
Locale1=0x4090409 ; Английский (американский). | |
Locale2=0x4190419 ; Русский. | |
WinGet, WinID,, A | |
ThreadID:=DllCall("GetWindowThreadProcessId", "Int", WinID, "Int", "0") | |
InputLocaleID:=DllCall("GetKeyboardLayout", "Int", ThreadID) | |
if(InputLocaleID=Locale1) | |
SendMessage, 0x50,, % Locale2,, A | |
else if(InputLocaleID=Locale2) | |
SendMessage, 0x50,, % Locale1,, A | |
Exit | |
; $!Space::Send {Ctrl Down}{LWin Down}{Space}{LWin Up}{Ctrl Up} | |
; Universal shotcuts | |
$#x::Send ^x | |
$#c::Send ^c | |
$#v::Send ^v | |
$#s::Send ^s | |
$#a::Send ^a | |
$#z::Send ^z | |
$#+z::Send ^y | |
$#w::Send ^w | |
$#f::Send ^f | |
$#n::Send ^n | |
$#q::Send !{f4} | |
$#r::Send {f5} | |
$#m::Send {LWin Down}{Down}{LWin Up} | |
$^!Home::Send {LControl}{LAlt}{Delete} | |
$Home::Send {Delete} | |
$#Left::Send {Home} | |
$#Right::Send {End} | |
$#Up::Send {Lctrl down}{Home}{Lctrl up} | |
$#Down::Send {Lctrl down}{End}{Lctrl up} | |
$!Left::Send {ctrl down}{Left}{ctrl up} | |
$!Right::Send {ctrl down}{Right}{ctrl up} | |
$!+Left::Send {ctrl down}{shift down}{Left}{shift up}{ctrl up} | |
$!+Right::Send {ctrl down}{shift down}{Right}{shift up}{ctrl up} | |
$#+Left::Send {shift down}{Home}{shift up} | |
$#+Right::Send {shift down}{End}{shift up} | |
$#+Up::Send {Ctrl Down}{shift down}{Home}{shift up}{Ctrl Up} | |
$#+Down::Send {Ctrl Down}{shift down}{End}{shift up}{Ctrl Up} | |
; Press Alt+0 to send the degree symbol | |
!0:: Send, ° |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment