-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.json
More file actions
280 lines (254 loc) · 11 KB
/
Copy pathdocs.json
File metadata and controls
280 lines (254 loc) · 11 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
[
{
"Constant" : [
],
"submodules" : [
],
"Function" : [
],
"Variable" : [
{
"doc" : "The keyboard layout name to switch to when the left Command key is tapped\non its own. Set directly or pass as leftLayout to start().\nSee hs.keycodes.layouts().",
"stripped_doc" : [
"The keyboard layout name to switch to when the left Command key is tapped",
"on its own. Set directly or pass as leftLayout to start().",
"See hs.keycodes.layouts()."
],
"def" : "CMDLayoutSwitcher.leftLayout",
"desc" : "The keyboard layout name to switch to when the left Command key is tapped",
"notes" : [
],
"signature" : "CMDLayoutSwitcher.leftLayout",
"type" : "Variable",
"returns" : [
],
"name" : "leftLayout",
"parameters" : [
]
},
{
"doc" : "The keyboard layout name to switch to when the right Command key is tapped\non its own. Set directly or pass as rightLayout to start().\nSee hs.keycodes.layouts().",
"stripped_doc" : [
"The keyboard layout name to switch to when the right Command key is tapped",
"on its own. Set directly or pass as rightLayout to start().",
"See hs.keycodes.layouts()."
],
"def" : "CMDLayoutSwitcher.rightLayout",
"desc" : "The keyboard layout name to switch to when the right Command key is tapped",
"notes" : [
],
"signature" : "CMDLayoutSwitcher.rightLayout",
"type" : "Variable",
"returns" : [
],
"name" : "rightLayout",
"parameters" : [
]
}
],
"stripped_doc" : [
],
"Deprecated" : [
],
"type" : "Module",
"desc" : "Select the keyboard layout based on a lone tap of a Command key.",
"Constructor" : [
],
"doc" : "Select the keyboard layout based on a lone tap of a Command key.\n\nLeft Command tap (press & release without any other key) -> leftLayout\nRight Command tap (press & release without any other key) -> rightLayout\n\nCommand-key combinations such as CMD+A, CMD+C, CMD+Tab, CMD+Shift+3, etc.\ndo not switch the layout — the tap only counts when Command is pressed and\nreleased on its own.\n\nSwitching is purely event-driven (no timers \/ intervals) and every event is\nobserved read-only and passed through unchanged, so all normal Command usage\nkeeps working.\n\nUsage:\n```lua\nhs.loadSpoon(\"CMDLayoutSwitcher\")\nspoon.CMDLayoutSwitcher:start({\n leftLayout = \"ABC\",\n rightLayout = \"Russian\",\n})\n```\n\nDownload: https:\/\/github.com\/343dev\/hammerspoon",
"Method" : [
{
"doc" : "Prepares the Spoon. Called automatically by hs.loadSpoon().\n\nDoes not start any watchers (per Spoon conventions); use start() to begin.\n\nParameters:\n * None\n\nReturns:\n * The CMDLayoutSwitcher object",
"stripped_doc" : [
"Prepares the Spoon. Called automatically by hs.loadSpoon().",
"",
"Does not start any watchers (per Spoon conventions); use start() to begin.",
""
],
"def" : "CMDLayoutSwitcher:init()",
"desc" : "Prepares the Spoon. Called automatically by hs.loadSpoon().",
"notes" : [
],
"signature" : "CMDLayoutSwitcher:init()",
"type" : "Method",
"returns" : [
" * The CMDLayoutSwitcher object"
],
"name" : "init",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Configures the target layouts, starts observing Command keys, and switches\nlayout on a lone Command tap.\n\nA tap counts as \"lone\" only when Command is pressed and released with no other\nkey in between. Command+key combinations (CMD+A, …) are ignored. Safe to call\nmultiple times; only one observer is ever active. If called again while\nrunning, a valid config updates the layouts immediately without restarting\nthe observer.\n\nParameters:\n * config - An optional table with leftLayout and\/or rightLayout string\n values. These override CMDLayoutSwitcher.leftLayout and\n CMDLayoutSwitcher.rightLayout for this and future starts.\n\nReturns:\n * The CMDLayoutSwitcher object",
"stripped_doc" : [
"Configures the target layouts, starts observing Command keys, and switches",
"layout on a lone Command tap.",
"",
"A tap counts as \"lone\" only when Command is pressed and released with no other",
"key in between. Command+key combinations (CMD+A, …) are ignored. Safe to call",
"multiple times; only one observer is ever active. If called again while",
"running, a valid config updates the layouts immediately without restarting",
"the observer.",
""
],
"def" : "CMDLayoutSwitcher:start([config])",
"desc" : "Configures the target layouts, starts observing Command keys, and switches",
"notes" : [
],
"signature" : "CMDLayoutSwitcher:start([config])",
"type" : "Method",
"returns" : [
" * The CMDLayoutSwitcher object"
],
"name" : "start",
"parameters" : [
" * config - An optional table with leftLayout and\/or rightLayout string",
" values. These override CMDLayoutSwitcher.leftLayout and",
" CMDLayoutSwitcher.rightLayout for this and future starts.",
""
]
},
{
"doc" : "Stops observing Command keys.\n\nParameters:\n * None\n\nReturns:\n * The CMDLayoutSwitcher object",
"stripped_doc" : [
"Stops observing Command keys.",
""
],
"def" : "CMDLayoutSwitcher:stop()",
"desc" : "Stops observing Command keys.",
"notes" : [
],
"signature" : "CMDLayoutSwitcher:stop()",
"type" : "Method",
"returns" : [
" * The CMDLayoutSwitcher object"
],
"name" : "stop",
"parameters" : [
" * None",
""
]
}
],
"Command" : [
],
"Field" : [
],
"items" : [
{
"doc" : "The keyboard layout name to switch to when the left Command key is tapped\non its own. Set directly or pass as leftLayout to start().\nSee hs.keycodes.layouts().",
"stripped_doc" : [
"The keyboard layout name to switch to when the left Command key is tapped",
"on its own. Set directly or pass as leftLayout to start().",
"See hs.keycodes.layouts()."
],
"def" : "CMDLayoutSwitcher.leftLayout",
"desc" : "The keyboard layout name to switch to when the left Command key is tapped",
"notes" : [
],
"signature" : "CMDLayoutSwitcher.leftLayout",
"type" : "Variable",
"returns" : [
],
"name" : "leftLayout",
"parameters" : [
]
},
{
"doc" : "The keyboard layout name to switch to when the right Command key is tapped\non its own. Set directly or pass as rightLayout to start().\nSee hs.keycodes.layouts().",
"stripped_doc" : [
"The keyboard layout name to switch to when the right Command key is tapped",
"on its own. Set directly or pass as rightLayout to start().",
"See hs.keycodes.layouts()."
],
"def" : "CMDLayoutSwitcher.rightLayout",
"desc" : "The keyboard layout name to switch to when the right Command key is tapped",
"notes" : [
],
"signature" : "CMDLayoutSwitcher.rightLayout",
"type" : "Variable",
"returns" : [
],
"name" : "rightLayout",
"parameters" : [
]
},
{
"doc" : "Prepares the Spoon. Called automatically by hs.loadSpoon().\n\nDoes not start any watchers (per Spoon conventions); use start() to begin.\n\nParameters:\n * None\n\nReturns:\n * The CMDLayoutSwitcher object",
"stripped_doc" : [
"Prepares the Spoon. Called automatically by hs.loadSpoon().",
"",
"Does not start any watchers (per Spoon conventions); use start() to begin.",
""
],
"def" : "CMDLayoutSwitcher:init()",
"desc" : "Prepares the Spoon. Called automatically by hs.loadSpoon().",
"notes" : [
],
"signature" : "CMDLayoutSwitcher:init()",
"type" : "Method",
"returns" : [
" * The CMDLayoutSwitcher object"
],
"name" : "init",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Configures the target layouts, starts observing Command keys, and switches\nlayout on a lone Command tap.\n\nA tap counts as \"lone\" only when Command is pressed and released with no other\nkey in between. Command+key combinations (CMD+A, …) are ignored. Safe to call\nmultiple times; only one observer is ever active. If called again while\nrunning, a valid config updates the layouts immediately without restarting\nthe observer.\n\nParameters:\n * config - An optional table with leftLayout and\/or rightLayout string\n values. These override CMDLayoutSwitcher.leftLayout and\n CMDLayoutSwitcher.rightLayout for this and future starts.\n\nReturns:\n * The CMDLayoutSwitcher object",
"stripped_doc" : [
"Configures the target layouts, starts observing Command keys, and switches",
"layout on a lone Command tap.",
"",
"A tap counts as \"lone\" only when Command is pressed and released with no other",
"key in between. Command+key combinations (CMD+A, …) are ignored. Safe to call",
"multiple times; only one observer is ever active. If called again while",
"running, a valid config updates the layouts immediately without restarting",
"the observer.",
""
],
"def" : "CMDLayoutSwitcher:start([config])",
"desc" : "Configures the target layouts, starts observing Command keys, and switches",
"notes" : [
],
"signature" : "CMDLayoutSwitcher:start([config])",
"type" : "Method",
"returns" : [
" * The CMDLayoutSwitcher object"
],
"name" : "start",
"parameters" : [
" * config - An optional table with leftLayout and\/or rightLayout string",
" values. These override CMDLayoutSwitcher.leftLayout and",
" CMDLayoutSwitcher.rightLayout for this and future starts.",
""
]
},
{
"doc" : "Stops observing Command keys.\n\nParameters:\n * None\n\nReturns:\n * The CMDLayoutSwitcher object",
"stripped_doc" : [
"Stops observing Command keys.",
""
],
"def" : "CMDLayoutSwitcher:stop()",
"desc" : "Stops observing Command keys.",
"notes" : [
],
"signature" : "CMDLayoutSwitcher:stop()",
"type" : "Method",
"returns" : [
" * The CMDLayoutSwitcher object"
],
"name" : "stop",
"parameters" : [
" * None",
""
]
}
],
"name" : "CMDLayoutSwitcher"
}
]