blob: ba539b8fc9a3cf99b190cff1a59b753c1f408d24 (
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
  | 
<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>DomeKey</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" href="assets/styles.css" />
</head>
<body>
	<header>
		<h1>DomeKey</h1>
		<img src="assets/logo.svg" alt="DomeKey" />
	</header>
	<div class="content">
		<p>
			DomeKey lets you customise headphone buttons 
		</p>
		<h2>Install</h2>
		<div class="code code-block">
			<span class="color-murky-pond">$</span> brew install teddywing/DomeKey/dome-key
		</div>
		<h2>Examples</h2>
		<p>Video controls:</p>
		<pre class="code code-block">
map <Up> <Left>
map <Play> <Space>
map <Down> <Right></pre>
		<p>Preserve volume buttons and include video controls in a mode:</p>
		<pre class="code code-block">
# Don't launch iTunes when pressing the middle button
map <Play> <Nop>
mode <Play><Play> {
    map <Up> <Left>
    map <Play> <Space>
    map <Down> <Right>
}</pre>
		<p>Application switcher:</p>
		<pre class="code code-block">
map <Up> <D-S-Tab>
map <Down> <D-Tab></pre>
		<p>Open frequently used applications:</p>
		<pre class="code code-block">
cmd <Up>   open -a Terminal
cmd <Play> open -a Xcode
cmd <Down> open -a Firefox</pre>
		<p>Open Terminal window #2:</p>
		<pre class="code code-block">
cmd <Play> osascript -e 'activate application "Terminal"' -e 'tell application "System Events" to keystroke "2" using command down'</pre>
	</div>
</body>
</html>
  |