SetMouseDelay, 0
SendMode, InputThenPlay
;--------------------------------------------------------
; Google日本語入力
;--------------------------------------------------------
; "C:\Program Files (x86)\Google\Google Japanese Input\GoogleIMEJaTool.exe" -mode=config_dialog
; sc07b 無変換
; Muhenkan > IMEを無効化
; Shift Muhenkan > IMEを無効化
; sc070 ひらがな
; Hiragana > IMEを有効化
; sc079 変換
; Henkan > エントリー削除
; Shift Henkan > エントリー削除
;--------------------------------------------------------
; 無変換(Space左側)
;--------------------------------------------------------
~sc07b::
If (A_PriorHotkey = A_ThisHotkey && 500 > A_TimeSincePriorHotkey)
{
Send, {sc070}
}
Exit
;--------------------------------------------------------
; 変換(左上2段目)
;--------------------------------------------------------
sc079 & 1::Send, {F12}
sc079 & 2::Send, {F2}
sc079 & q::Send, {Esc}
sc079 & w::Send, {LWin}
sc079 & e::Send, #{e}
sc079 & r::Send, #{r}
;--------------------------------------------------------
; RShift(左上1段目)
;--------------------------------------------------------
>+h::Send, {Left}
>+j::Send, {Down}
>+k::Send, {Up}
>+l::Send, {Right}
>+q::Send, {&}
>+w::Send, {'}
>+e::Send, {``}
>+a::Send, {^}
>+s::Send, {$}
>+d::Send, {~}
>+u::Send, {|}
>+i::Send, {\}
>+o::Send, {@}
>+p::Send, {`%}
>+n::Send, {(}
>+m::Send, {)}
>+4::Send, {Enter}
>+7::Send, {Home}
>+8::Send, {End}
>+Enter::Send, {Tab}
>+Backspace::Send, {Delete}
;--------------------------------------------------------
; LControl
;--------------------------------------------------------
~<^c::
If (A_PriorHotkey = A_ThisHotkey && 500 > A_TimeSincePriorHotkey)
{
Send, {End}
Send, +{Home}
Send, ^{c}
}
Exit
;--------------------------------------------------------
; LAlt
;--------------------------------------------------------
; エクセル以外単独押下無効
LAlt::
If (WinActive("ahk_class XLMAIN"))
{
Send, {LAlt}
}
Exit
<!WheelUp::
If (WinActive("ahk_class illustrator"))
{
Send, !{WheelUp}
}
Else
{
Send, {PgUp}
}
Exit
<!WheelDown::
If (WinActive("ahk_class illustrator"))
{
Send, !{WheelDown}
}
Else
{
Send, {PgDn}
}
Exit
<!1::Send, {Home}
<!2::Send, {End}
<!q::Send, !{Left} ; 戻る
<!w::Send, !{Right} ; 進む
<!e::Send, ^{w} ; 閉じる
<!a::Send, ^{PgUp} ; 前のタブ
<!s::Send, ^{PgDn} ; 次のタブ
<!d::Send, ^+{t} ; 再び開く
<!f::Send, ^{F5} ; 更新
<!v::
If (A_PriorHotkey = A_ThisHotkey && 500 > A_TimeSincePriorHotkey)
{
keyDownCount += 1
If (keyDownCount >= 3)
{
keyDownCount = 0
}
}
Else
{
keyDownCount = 0
}
WinGet, min_max, MinMax, A
WinGet, this_id, ID, A
If (min_max = 1) ; 最大化
{
SendEvent, #{Down}
WinMove, ahk_id %this_id%, , , , 1100, 750
}
WinGetPos, x, y, w, h, ahk_id %this_id%
If (keyDownCount = 0)
{
MouseMove, w//2, 10
}
Else If (keyDownCount = 1)
{
MouseMove, w-5, h-5
}
Else If (keyDownCount = 2)
{
MouseMove, w-30, 15
}
Exit
~LAlt & MButton::Send, #{Tab}
;--------------------------------------------------------
; マウス
;--------------------------------------------------------
NumLock::
Menu, Tray, Icon
Reload
Exit
Pause::
WinGet, id, list
Loop, %id%
{
StringTrimRight, this_id, id%A_Index%, 0
WinGetTitle, this_title, ahk_id %this_id%
if(RegExMatch(this_title, "Google Chrome") > 0)
{
WinGet, min_max, MinMax, ahk_id %this_id%
if (min_max = 0)
{
WinClose, ahk_id %this_id%
}
}
}
Exit