makcu 0.1.3__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ makcu/__init__.py,sha256=_uWl1sH4M9_NFKUPZAeq3A9np-6nZwSUOX_hJVv9Wck,2111
2
+ makcu/__main__.py,sha256=kJu5wuuMrHxTcESUEEGxuDHcd71RdRygDSoydxfW9ug,12063
3
+ makcu/conftest.py,sha256=OsGIlt593H8AzY5BhCHHW8BmjD1yc1z2wqvyZvFiUdk,936
4
+ makcu/connection.py,sha256=57VerGwpGZVhuLlAgs2HAHl1RHI9hGa8OBImv2GmDr8,18331
5
+ makcu/controller.py,sha256=LeRxbPT69_rrS7C8moNXKy9AdCGq0Le9exM2g-Y3jmU,15758
6
+ makcu/enums.py,sha256=VmvCLmpghVHuTAkvCGMfA14MgWTtFVMfsGQQNnJ58Ts,126
7
+ makcu/errors.py,sha256=4CkQ4gKa7GL5-BO3yOAJMMsy3QlUDDL42S1P1clqV4A,562
8
+ makcu/makcu.pyi,sha256=a8_vQ43MAqVxcASQiCHoYYG_LkfM5NEBAab5dgxcVK4,424
9
+ makcu/mouse.py,sha256=pdHU4oqfmD1OzQLBbcIvJt9U9fLVQMYUBJKip_N8vPw,10083
10
+ makcu/py.typed,sha256=lI_IPBO6A6a5eY5kRQDNsdSydUb3sFWtcC_ML8FNftU,111
11
+ makcu/test_suite.py,sha256=cUhmP3_wniANiV1B5xGu7n3WHaBj3zsQBxcOW5LPRtY,5105
12
+ makcu-0.2.0.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
13
+ makcu-0.2.0.dist-info/METADATA,sha256=msDAfKdpsWtJO-WqPxg87GZds2Rgjct7wE0AkI_2dQg,55161
14
+ makcu-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ makcu-0.2.0.dist-info/top_level.txt,sha256=IRO1UVb5LK_ovjau0g4oObyXQqy00tVEE-yF5lPgw1w,6
16
+ makcu-0.2.0.dist-info/RECORD,,
@@ -1,310 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: makcu
3
- Version: 0.1.3
4
- Summary: Python library to interact with Makcu devices.
5
- Author: SleepyTotem
6
- License: GPL
7
- Project-URL: Homepage, https://github.com/SleepyTotem/makcu-py-lib
8
- Requires-Python: >=3.7
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Dynamic: license-file
12
-
13
- # 🖱️ Makcu Python Library
14
-
15
- Makcu Py Lib is a Python library for controlling Makcu devices — enabling software-driven mouse input, movement simulation, locking, monitoring, and more.
16
-
17
- ---
18
-
19
- ## 📦 Installation
20
-
21
- ### ✅ Recommended: PyPI
22
-
23
- ```bash
24
- pip install makcu
25
- ```
26
-
27
- ### 🧪 Alternative: Install from Source
28
-
29
- ```bash
30
- git clone https://github.com/SleepyTotem/makcu-py-lib
31
- cd makcu-py-lib
32
- pip install .
33
- ```
34
-
35
- ---
36
-
37
- ## 🚀 Command-Line Usage
38
-
39
- After installation, use:
40
-
41
- ```bash
42
- python -m makcu [command]
43
- ```
44
-
45
- ### Available Commands
46
-
47
- | Command | Description |
48
- |---------|-------------|
49
- | `--debug` | Opens interactive console to send raw `km.*` commands |
50
- | `--testPort COM3` | Tests a specific COM port for connectivity |
51
- | `--runtest` | Runs all automated tests and opens a test report |
52
-
53
- ### Examples
54
-
55
- ```bash
56
- python -m makcu --debug
57
- python -m makcu --testPort COM3
58
- python -m makcu --runtest
59
- ```
60
-
61
- ---
62
-
63
- ## 🧠 Quickstart (Python)
64
-
65
- ```python
66
- from makcu import create_controller, MouseButton
67
-
68
- makcu = create_controller("COM1") # Fallback port
69
- makcu.click(MouseButton.LEFT)
70
- makcu.move(100, 50)
71
- makcu.scroll(-1)
72
- makcu.disconnect()
73
- ```
74
-
75
- ---
76
-
77
- ## 🧩 API Reference
78
-
79
- ### 🔧 Initialization
80
-
81
- ```python
82
- makcu = create_controller(debug=True, send_init=True)
83
- ```
84
-
85
- #### Set fallback port manually
86
-
87
- ```python
88
- makcu = create_controller("COM4") # Optional fallback com port
89
- ```
90
-
91
- ---
92
-
93
- ### 🎮 Mouse Control
94
-
95
- #### Clicks
96
-
97
- ```python
98
- makcu.click(MouseButton.LEFT)
99
- makcu.press(MouseButton.RIGHT)
100
- makcu.release(MouseButton.RIGHT)
101
- ```
102
-
103
- #### Movement
104
-
105
- ```python
106
- makcu.move(dx=30, dy=20)
107
- makcu.move_smooth(100, 40, segments=10)
108
- makcu.move_bezier(50, 50, 15, ctrl_x=25, ctrl_y=25)
109
- ```
110
-
111
- #### Scrolling
112
-
113
- ```python
114
- makcu.scroll(-3) # Scroll down
115
- makcu.scroll(3) # Scroll up
116
- ```
117
-
118
- ---
119
-
120
- ### 🔒 Locking and Unlocking
121
-
122
- ```python
123
- makcu.lock_left(True)
124
- makcu.lock_right(True)
125
- makcu.lock_middle(False)
126
- makcu.lock_side1(True)
127
- makcu.lock_side2(False)
128
- makcu.lock_mouse_x(True)
129
- makcu.lock_mouse_y(False)
130
- ```
131
-
132
- #### Lock Status
133
-
134
- ```python
135
- makcu.is_button_locked(MouseButton.LEFT)
136
- makcu.get_all_lock_states()
137
- ```
138
-
139
- ---
140
-
141
- ### 👤 Human-like Click Simulation
142
-
143
- ```python
144
- makcu.click_human_like(
145
- button=MouseButton.LEFT,
146
- count=5,
147
- profile="normal", # "fast", "slow" also available
148
- jitter=3
149
- )
150
- ```
151
-
152
- ---
153
-
154
- ### 🔍 Device Info & Firmware
155
-
156
- ```python
157
- info = makcu.get_device_info()
158
- print(info)
159
-
160
- version = makcu.get_firmware_version()
161
- print(version)
162
- ```
163
-
164
- ---
165
-
166
- ### 🔐 Serial Spoofing
167
-
168
- ```python
169
- makcu.spoof_serial("FAKE123456")
170
- makcu.reset_serial()
171
- ```
172
-
173
- ---
174
-
175
- ## 🧪 Button Monitoring & Capture
176
-
177
- ### Enable Real-time Monitoring
178
-
179
- ```python
180
- makcu.enable_button_monitoring(True)
181
- ```
182
-
183
- ### Set Callback Function
184
-
185
- ```python
186
- def on_button_event(button, pressed):
187
- print(f"{button.name} is {'pressed' if pressed else 'released'}")
188
-
189
- makcu.set_button_callback(on_button_event)
190
- ```
191
-
192
- ---
193
-
194
- ## ❌ Click Capturing (Pending Firmware Update)
195
-
196
- Click capturing will allow you to detect and count click events in software.
197
-
198
- ```python
199
- makcu.mouse.lock_right(True)
200
- makcu.capture(MouseButton.RIGHT)
201
-
202
- # User clicks however many times
203
-
204
- makcu.mouse.lock_right(False)
205
- count = makcu.get_captured_clicks(MouseButton.RIGHT)
206
- print(f"Captured clicks: {count}")
207
- ```
208
-
209
- > ⚠️ This feature is currently broken in firmware. Do not rely on it yet.
210
-
211
- ---
212
-
213
- ## 🔢 Bitmask & Button States
214
-
215
- ### Get Bitmask of Active Buttons
216
-
217
- ```python
218
- mask = makcu.get_button_mask()
219
- print(f"Button mask: {mask}")
220
- ```
221
-
222
- ### Get Raw Button State Map
223
-
224
- ```python
225
- states = makcu.get_button_states()
226
- print(states) # {'left': False, 'right': True, ...}
227
- ```
228
-
229
- ### Check if a Specific Button Is Pressed
230
-
231
- ```python
232
- if makcu.is_button_pressed(MouseButton.RIGHT):
233
- print("Right button is pressed")
234
- ```
235
-
236
- ---
237
-
238
- ## ⚙️ Low-Level Command Access
239
-
240
- ### Send raw serial commands
241
-
242
- ```python
243
- from makcu import create_controller
244
- makcu = create_controller()
245
- response = makcu.transport.send_command("km.version()", expect_response=True)
246
- print(response)
247
- ```
248
-
249
- ---
250
-
251
- ## 🧪 Test Suite
252
-
253
- Run all tests and generate HTML report:
254
-
255
- ```bash
256
- python -m makcu --runtest
257
- ```
258
-
259
- ---
260
-
261
- ## 📚 Enumerations
262
-
263
- ```python
264
- from makcu import MouseButton
265
-
266
- MouseButton.LEFT
267
- MouseButton.RIGHT
268
- MouseButton.MIDDLE
269
- MouseButton.MOUSE4
270
- MouseButton.MOUSE5
271
- ```
272
-
273
- ---
274
-
275
- ## 🧯 Exception Handling
276
-
277
- ```python
278
- from makcu import MakcuError, MakcuConnectionError
279
-
280
- try:
281
- makcu = create_controller()
282
- except MakcuConnectionError as e:
283
- print("Connection failed:", e)
284
- ```
285
-
286
- ---
287
-
288
- ## 🛠️ Developer Notes
289
-
290
- - Uses CH343 USB Serial
291
- - Auto-connects to correct port or fallback
292
- - Supports baud rate switching to 4M
293
- - Automatically enables `km.buttons(1)` monitoring if `send_init=True`
294
- - Supports raw button state polling
295
-
296
- ---
297
-
298
- ## 📜 License
299
-
300
- GPL License © SleepyTotem
301
-
302
- ---
303
-
304
- ## Support
305
- Please open an issue on the project repository and I will get to it asap
306
-
307
- ## 🌐 Links
308
-
309
- - 🔗 [Project Homepage](https://github.com/SleepyTotem/makcu-py-lib)
310
- - 🔗 [PyPI Homepage](https://pypi.org/project/makcu/)
@@ -1,14 +0,0 @@
1
- makcu/__init__.py,sha256=hCP6COi14T4C0V35crnbBEzJPa9hnwGb-gDPoxs_H6E,459
2
- makcu/__main__.py,sha256=wjRtr7V6qd54w43lHmXQldlVffKMW27nkhKa4E5B9t8,2830
3
- makcu/conftest.py,sha256=TQibb01_1OfzDrDU5u3IDlrfehXyr7E7jx3g0VySZmU,560
4
- makcu/connection.py,sha256=QObUZ-iNH-LaC7hamgXDH5p2wH_VfJ6OEAv5qJ1RwVE,10208
5
- makcu/controller.py,sha256=u2BeScKqQI19nSXQzRZqNL9rIj7_AyGDRcawdHvQtxM,5776
6
- makcu/enums.py,sha256=VmvCLmpghVHuTAkvCGMfA14MgWTtFVMfsGQQNnJ58Ts,126
7
- makcu/errors.py,sha256=4CkQ4gKa7GL5-BO3yOAJMMsy3QlUDDL42S1P1clqV4A,562
8
- makcu/mouse.py,sha256=vvJ88r9tOLaGT6evHHx_K45wwTa_bxc9c0S6wj7gX6o,4686
9
- makcu/test_suite.py,sha256=kmsLRv00mWLu3cUW5iAWL3QAhdqOL-rUwAWn6Rs1_ME,3104
10
- makcu-0.1.3.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
11
- makcu-0.1.3.dist-info/METADATA,sha256=hIYmeM8Qd9IWNCEfE_tbZ4DHqe-ttU9uvE8247ih2w0,5588
12
- makcu-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- makcu-0.1.3.dist-info/top_level.txt,sha256=IRO1UVb5LK_ovjau0g4oObyXQqy00tVEE-yF5lPgw1w,6
14
- makcu-0.1.3.dist-info/RECORD,,
File without changes