-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAutoHotkey.ahk
67 lines (55 loc) · 1.56 KB
/
AutoHotkey.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
*Space::
SendInput {RShift Down}
If SandS_SpaceDown = 1
{
Return
}
SandS_SpaceDown := 1
SandS_SpaceDownTime := A_TickCount ; milliseconds after computer is booted http://www.autohotkey.com/docs/Variables.htm
SandS_AnyKeyPressed := 0
; watch for the next single key, http://www.autohotkey.com/docs/commands/Input.htm
Input, SandS_AnyKey, L1 V,{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}
SandS_AnyKeyPressed := 1
Return
*Space Up::
SendInput {RShift Up}
SandS_SpaceDown := 0
If SandS_AnyKeyPressed = 0
{
If A_TickCount - SandS_SpaceDownTime < 200
{
SendInput {Space}
}
; Send EndKey of the "Input" command above
; You must use Send here since SendInput is ignored by "Input"
Send {RShift}
}
Return
!q::!F4
#q::!F4
; Emacs風キーバインドを無効にしたいウィンドウ一覧
is_emacs()
{
IfWinActive,ahk_class Emacs ;NTEmacs
Return 1
IfWinActive,ahk_class XEmacs ;Cygwin上のXEmacs
Return 1
Return 0
}
;; Emacs では SKK を、Emacs 以外では SKKFEP を起動
;; 029 半角全角
;; 07B 無変換
;; 079 変換
;sc07B::
; If is_emacs()
; Send {%A_ThisHotkey%}
; Else
; Send {sc029}
; Return
;
;sc079::
; If is_emacs()
; Send {%A_ThisHotkey%}
; Else
; Send {sc029}
; Return