makcu 0.1.4__py3-none-any.whl → 0.2.1__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=HyjxvhE5feNyh4ZMY5U0U_X-7BzltSh_gOsX_o5mSLA,1745
2
+ makcu/__main__.py,sha256=6D21UxHHEd1USLo5CLsGAm3i-HPmZ_j7BBjHbUer3Zg,11097
3
+ makcu/conftest.py,sha256=t4ZP5WeZv-lgfplgbwojiJWQXeuYASU9jNDRrsSX2V4,863
4
+ makcu/connection.py,sha256=Xz8KsfhPu2S3KfRnoeASM-6gmfRZklME5MQjaRawrjk,15193
5
+ makcu/controller.py,sha256=kxHGtGZTE4JHZozZeRaet_AXK-69LZG_ZP6ZPg8gqjw,13064
6
+ makcu/enums.py,sha256=VmvCLmpghVHuTAkvCGMfA14MgWTtFVMfsGQQNnJ58Ts,126
7
+ makcu/errors.py,sha256=X_eWPKkVgcyryT6-_7jjVkcHKtrAZAsarbfMRpIcz58,242
8
+ makcu/makcu.pyi,sha256=a8_vQ43MAqVxcASQiCHoYYG_LkfM5NEBAab5dgxcVK4,424
9
+ makcu/mouse.py,sha256=d-6wcRrNgfLE6QQ26YLbQj-u4EaGAMXn0bVsb0cncoM,8442
10
+ makcu/py.typed,sha256=lI_IPBO6A6a5eY5kRQDNsdSydUb3sFWtcC_ML8FNftU,111
11
+ makcu/test_suite.py,sha256=7Rsq5sKeR4zvCMTNZDv6TCYMKs7B3EVTuwyIDgHfdk8,4092
12
+ makcu-0.2.1.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
13
+ makcu-0.2.1.dist-info/METADATA,sha256=uHpFIqMrVUFtti2luLjVpH2mqSl2uwQ5a39FeAPJwRs,55161
14
+ makcu-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ makcu-0.2.1.dist-info/top_level.txt,sha256=IRO1UVb5LK_ovjau0g4oObyXQqy00tVEE-yF5lPgw1w,6
16
+ makcu-0.2.1.dist-info/RECORD,,
@@ -1,274 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: makcu
3
- Version: 0.1.4
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
- ---
54
-
55
- ## 🧠 Quickstart (Python)
56
-
57
- ```python
58
- from makcu import create_controller, MouseButton
59
-
60
- makcu = create_controller("COM1")
61
- makcu.click(MouseButton.LEFT)
62
- makcu.move(100, 50)
63
- makcu.scroll(-1)
64
- makcu.disconnect()
65
- ```
66
-
67
- ---
68
-
69
- ## 🧩 API Reference
70
-
71
- ### 🔧 Initialization
72
-
73
- ```python
74
- makcu = create_controller(fallback_com_port="COM1", debug=True, send_init=True)
75
- ```
76
-
77
- ---
78
-
79
- ### 🎮 Mouse Control
80
-
81
- #### Button Actions
82
-
83
- ```python
84
- makcu.click(MouseButton.LEFT)
85
- makcu.press(MouseButton.RIGHT)
86
- makcu.release(MouseButton.RIGHT)
87
- ```
88
-
89
- #### Movement
90
-
91
- ```python
92
- makcu.move(30, 20)
93
- makcu.move_smooth(100, 40, segments=10)
94
- makcu.move_bezier(50, 50, 15, ctrl_x=25, ctrl_y=25)
95
- ```
96
-
97
- #### Scroll Wheel
98
-
99
- ```python
100
- makcu.scroll(-3)
101
- makcu.scroll(3)
102
- ```
103
-
104
- ---
105
-
106
- ### 🔒 Locking
107
-
108
- ```python
109
- makcu.lock_left(True)
110
- makcu.lock_right(True)
111
- makcu.lock_middle(False)
112
- makcu.lock_side1(True)
113
- makcu.lock_side2(False)
114
- makcu.lock_mouse_x(True)
115
- makcu.lock_mouse_y(False)
116
- ```
117
-
118
- #### Lock State Query
119
-
120
- ```python
121
- makcu.is_locked(MouseButton.LEFT)
122
- makcu.get_all_lock_states()
123
- ```
124
-
125
- ---
126
-
127
- ### 👤 Human-like Click Simulation
128
-
129
- ```python
130
- makcu.click_human_like(
131
- button=MouseButton.LEFT,
132
- count=5,
133
- profile="normal", # or "fast", "slow"
134
- jitter=3
135
- )
136
- ```
137
-
138
- ---
139
-
140
- ### 🔍 Device Info & Firmware
141
-
142
- ```python
143
- info = makcu.get_device_info()
144
- version = makcu.get_firmware_version()
145
- ```
146
-
147
- ---
148
-
149
- ### 🔐 Serial Spoofing
150
-
151
- ```python
152
- makcu.spoof_serial("FAKE123456")
153
- makcu.reset_serial()
154
- ```
155
-
156
- ---
157
-
158
- ## 🧪 Button Monitoring
159
-
160
- ### Enable Monitoring
161
-
162
- ```python
163
- makcu.enable_button_monitoring(True)
164
- ```
165
-
166
- ### Set Event Callback
167
-
168
- ```python
169
- def on_button_event(button, pressed):
170
- print(f"{button.name} is {'pressed' if pressed else 'released'}")
171
-
172
- makcu.set_button_callback(on_button_event)
173
- ```
174
-
175
- ---
176
-
177
- ## ❌ Click Capturing (Pending Firmware Fix)
178
-
179
- ```python
180
- makcu.mouse.lock_right(True)
181
- makcu.mouse.begin_capture("RIGHT")
182
-
183
- # Simulated user input...
184
-
185
- makcu.mouse.lock_right(False)
186
- count = makcu.mouse.stop_capturing_clicks("RIGHT")
187
- print(f"Captured clicks: {count}")
188
- ```
189
-
190
- > ⚠️ Not fully supported yet — firmware must be updated to complete this feature.
191
-
192
- ---
193
-
194
- ## 🔢 Bitmask & Button States
195
-
196
- ```python
197
- mask = makcu.get_button_mask()
198
- states = makcu.get_button_states()
199
-
200
- if makcu.is_pressed(MouseButton.RIGHT):
201
- print("Right button is currently pressed")
202
- ```
203
-
204
- ---
205
-
206
- ## ⚙️ Low-Level Access
207
-
208
- ```python
209
- response = makcu.transport.send_command("km.version()", expect_response=True)
210
- ```
211
-
212
- ---
213
-
214
- ## 🧪 Test Suite
215
-
216
- Run full test suite and generate an HTML report:
217
-
218
- ```bash
219
- python -m makcu --runtest
220
- ```
221
-
222
- ---
223
-
224
- ## 📚 Enumerations
225
-
226
- ```python
227
- from makcu import MouseButton
228
-
229
- MouseButton.LEFT
230
- MouseButton.RIGHT
231
- MouseButton.MIDDLE
232
- MouseButton.MOUSE4
233
- MouseButton.MOUSE5
234
- ```
235
-
236
- ---
237
-
238
- ## 🧯 Exception Handling
239
-
240
- ```python
241
- from makcu import MakcuError, MakcuConnectionError
242
-
243
- try:
244
- makcu = create_controller()
245
- except MakcuConnectionError as e:
246
- print("Connection failed:", e)
247
- ```
248
-
249
- ---
250
-
251
- ## 🛠️ Developer Notes
252
-
253
- - Communicates via CH343 USB serial
254
- - Automatically finds correct port or uses fallback
255
- - Switches baud to 4M after initial connect
256
- - Enables `km.buttons(1)` on init if requested
257
- - Supports full button state tracking with events
258
-
259
- ---
260
-
261
- ## 📜 License
262
-
263
- GPL License © SleepyTotem
264
-
265
- ---
266
-
267
- ## 🙋 Support
268
-
269
- Open an issue on GitHub if you encounter bugs or need help.
270
-
271
- ## 🌐 Links
272
-
273
- - [GitHub Repo](https://github.com/SleepyTotem/makcu-py-lib)
274
- - [PyPI Package](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=NDo8cmAnsu_-Njc-CacLFTKXkALvSc7E2BXYOY5aljg,12030
5
- makcu/controller.py,sha256=wBrGlO_mivd7YFRQJ84BVXGIuu3G7ChRos9fucTYWzM,5115
6
- makcu/enums.py,sha256=VmvCLmpghVHuTAkvCGMfA14MgWTtFVMfsGQQNnJ58Ts,126
7
- makcu/errors.py,sha256=4CkQ4gKa7GL5-BO3yOAJMMsy3QlUDDL42S1P1clqV4A,562
8
- makcu/mouse.py,sha256=PkBowk--SSHo13gRwK3jnORSQVQV1YeIF4NWE_Cm4KU,6388
9
- makcu/test_suite.py,sha256=qHYklwhVCeZbpndlwUrSGnd2a5wQtJwefjlo_ZWXD-Y,2661
10
- makcu-0.1.4.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
11
- makcu-0.1.4.dist-info/METADATA,sha256=tZCMI-5J3s4Sp_zAVlrvKiLbGCcFGDCbRkDzzlilQWs,4828
12
- makcu-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- makcu-0.1.4.dist-info/top_level.txt,sha256=IRO1UVb5LK_ovjau0g4oObyXQqy00tVEE-yF5lPgw1w,6
14
- makcu-0.1.4.dist-info/RECORD,,
File without changes