aboutsummaryrefslogtreecommitdiff
path: root/tt.keyboard.ahk
blob: 82d04692cc2450dffb379b45bf67ae4c8eb115e0 (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
;; 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") ; see tt.layout.ahk
+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 ; see tt.layout.ahk

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}
*/

;; -> 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
}
*/