aboutsummaryrefslogtreecommitdiff
path: root/tt.keyboard.ahk
blob: 599f328cd0d03da9d41feb4502f921c8da9be411 (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
;; General keyboard mappings --------------------------------------------------

;; -> body

>!-::SendInput, {ASC 0150} ; 
<^>!-::SendInput, {ASC 0150}
>!s::SendInput, {ASC 0223} ; 
<^>!s::SendInput, {ASC 0223}

#If Layout() = layouts.sv && GetKeyState("NumLock", "T") && !WinActive("ahk_exe VirtualBoxVM.exe")
+SC00D::SendInput, ``{Space}
+SC01B::SendInput, {^}{Space}
<^>!SC01B::SendInput, ~{Space}
#If

#If Layout() = layouts.ru
>!SC030::SendInput, {U+0456}
>!+SC030::SendInput, {U+0406}
>!SC016::SendInput, {U+0453}
>!+SC016::SendInput, {U+0403}
>!SC014::SendInput, {U+0454}
>!+SC014::SendInput, {U+0404}
>!SC029::SendInput, {U+0457}
>!+SC029::SendInput, {U+0407}
>!SC02B::SendInput, '
#If

;; ANSI keyboard mappings -----------------------------------------------------

#If Layout() = layouts.us && !WinActive("ahk_exe VirtualBoxVM.exe") ; see tt.layout.ahk

>!a::SendInput, a
>!e::SendInput, e
>!+a::SendInput, A
>!+e::SendInput, E

:z*?:aa::
:z*?:ae::
:z*?:oe::
:z*?:AA::
:z*?:AE::
:z*?:OE::

:z*?:a``::
:z*?:e``::
:z*?:A``::
:z*?:E``::

/*
SC01A::
SC01B::
SC02B::
+SC01A::
+SC01B::
+SC02B::
>!SC01A::SendInput, [
>!SC01B::SendInput, ]
>!SC02B::SendInput, \
>!+SC01A::SendInput, {{}
>!+SC01B::SendInput, {}}
>!+SC02B::SendInput, |
>!SC027::SendInput, {{}
>!SC028::SendInput, {}}
>!SC035::SendInput, |

>!a::SendInput, {ASC 0224} ; 
>!+a::SendInput, {ASC 0192} ; 
>!e::SendInput, {ASC 0233} ; 
>!+e::SendInput, {ASC 0201} ; 
>!4::SendInput, {ASC 0164} ; 
>!+4::SendInput, {ASC 0128} ; 
*/

#If

;; Acer 6312-K mappings -------------------------------------------------------

;; -> body

^!F2::SendInput, {F1}
<^>!F2::F1 ; the F1 key doesn't work :-(

;; Fujitsu FKB8530 mappings ---------------------------------------------------

;; -> library

Modifiers() {
	s := ""
	if (GetKeyState("Shift"))
		s .= "{Shift down}"
	if (GetKeyState("Ctrl"))
		s .= "{Ctrl down}"
	if (GetKeyState("Alt"))
		s .= "{Alt down}"
	return s
}

;; -> body

/*
^<::^y
*#BackSpace::Delete
#F9::PrintScreen
#F12::Insert
<^>!<::|

*#h::SendInput, % Modifiers() "{Left down}"
#h Up::SendInput, {Left up}
*#j::SendInput, % Modifiers() "{Down down}"
#j Up::SendInput, {Down up}
*#k::SendInput, % Modifiers() "{Up down}"
#k Up::SendInput, {Up up}
*#l::SendInput, % Modifiers() "{Right down}"
#l Up::SendInput, {Right up}

*#y::SendInput, % Modifiers() "{Home down}"
#y Up::SendInput, {Home up}
*#u::SendInput, % Modifiers() "{PgDn down}"
#u Up::SendInput, {PgDn up}
*#i::SendInput, % Modifiers() "{PgUp down}"
#i Up::SendInput, {PgUp up}
*#o::SendInput, % Modifiers() "{End down}"
#o Up::SendInput, {End up}

#n::
SendInput, {NumLock}
if (!GetKeyState("NumLock", "T"))
  ToolTip, NumLock disabled
Sleep, 500
ToolTip
return
*/

;; -> init

/*
ToggleAltMode() ; disable alt mode
*/

;; -> body

/*
<^>!z::
  ToggleAltMode()
  InputBox, AltCode, Ange teckenkod,,, 150, 90, Locale
  ToggleAltMode()
  IfEqual, AltCode,, return
  Send, {LAlt down}
  Loop, PARSE, AltCode
  {
    X := A_LoopField
    Send, % "{Numpad" . SubStr(X, 0) . "}"
  }
  Send, {LAlt up}
  return

$m::Send, 0
$j::Send, 1
$k::Send, 2
$l::Send, 3
$u::Send, 4
$i::Send, 5
$o::Send, 6

ToggleAltMode()
{
  Hotkey, $m, Toggle
  Hotkey, $j, Toggle
  Hotkey, $k, Toggle
  Hotkey, $l, Toggle
  Hotkey, $u, Toggle
  Hotkey, $i, Toggle
  Hotkey, $o, Toggle
}
*/