aboutsummaryrefslogtreecommitdiff
path: root/tt.keyboard.ahk
blob: 5663ec12fd25197c8757f7f7badc15782b1c00c0 (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
;; General keyboard mappings --------------------------------------------------

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

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

#If Layout() = layouts.us ; see tt.layout.ahk

/*
§::<
½::>
<^>§::|
*<^>1::SendInput, §
*<^>!::SendInput, ½
¨::'
^::*
'::¨
<^>*::~
*/

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

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