g13-linux 1.1.3__tar.gz

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.
Files changed (60) hide show
  1. g13_linux-1.1.3/CHANGELOG.md +93 -0
  2. g13_linux-1.1.3/CONTRIBUTING.md +356 -0
  3. g13_linux-1.1.3/LICENSE +21 -0
  4. g13_linux-1.1.3/MANIFEST.in +9 -0
  5. g13_linux-1.1.3/PKG-INFO +426 -0
  6. g13_linux-1.1.3/README.md +381 -0
  7. g13_linux-1.1.3/configs/macros/00ae3eb4-e7a0-471e-87ed-f8936a665fce.json +28 -0
  8. g13_linux-1.1.3/configs/macros/fa780ff2-13b8-47e9-baf8-301d5f92090d.json +40 -0
  9. g13_linux-1.1.3/configs/profiles/eve_online.json +206 -0
  10. g13_linux-1.1.3/configs/profiles/example.json +40 -0
  11. g13_linux-1.1.3/pyproject.toml +123 -0
  12. g13_linux-1.1.3/requirements.txt +3 -0
  13. g13_linux-1.1.3/setup.cfg +4 -0
  14. g13_linux-1.1.3/src/g13_linux/__init__.py +35 -0
  15. g13_linux-1.1.3/src/g13_linux/cli.py +24 -0
  16. g13_linux-1.1.3/src/g13_linux/device.py +253 -0
  17. g13_linux-1.1.3/src/g13_linux/gui/__init__.py +7 -0
  18. g13_linux-1.1.3/src/g13_linux/gui/controllers/__init__.py +7 -0
  19. g13_linux-1.1.3/src/g13_linux/gui/controllers/app_controller.py +399 -0
  20. g13_linux-1.1.3/src/g13_linux/gui/controllers/device_event_controller.py +44 -0
  21. g13_linux-1.1.3/src/g13_linux/gui/main.py +85 -0
  22. g13_linux-1.1.3/src/g13_linux/gui/models/__init__.py +7 -0
  23. g13_linux-1.1.3/src/g13_linux/gui/models/event_decoder.py +321 -0
  24. g13_linux-1.1.3/src/g13_linux/gui/models/g13_device.py +140 -0
  25. g13_linux-1.1.3/src/g13_linux/gui/models/global_hotkeys.py +284 -0
  26. g13_linux-1.1.3/src/g13_linux/gui/models/hardware_controller.py +87 -0
  27. g13_linux-1.1.3/src/g13_linux/gui/models/macro_manager.py +162 -0
  28. g13_linux-1.1.3/src/g13_linux/gui/models/macro_player.py +290 -0
  29. g13_linux-1.1.3/src/g13_linux/gui/models/macro_recorder.py +305 -0
  30. g13_linux-1.1.3/src/g13_linux/gui/models/macro_types.py +167 -0
  31. g13_linux-1.1.3/src/g13_linux/gui/models/profile_manager.py +153 -0
  32. g13_linux-1.1.3/src/g13_linux/gui/resources/__init__.py +7 -0
  33. g13_linux-1.1.3/src/g13_linux/gui/resources/g13_layout.py +59 -0
  34. g13_linux-1.1.3/src/g13_linux/gui/views/__init__.py +7 -0
  35. g13_linux-1.1.3/src/g13_linux/gui/views/button_mapper.py +246 -0
  36. g13_linux-1.1.3/src/g13_linux/gui/views/hardware_control.py +98 -0
  37. g13_linux-1.1.3/src/g13_linux/gui/views/live_monitor.py +97 -0
  38. g13_linux-1.1.3/src/g13_linux/gui/views/macro_editor.py +489 -0
  39. g13_linux-1.1.3/src/g13_linux/gui/views/main_window.py +72 -0
  40. g13_linux-1.1.3/src/g13_linux/gui/views/profile_manager.py +116 -0
  41. g13_linux-1.1.3/src/g13_linux/gui/widgets/__init__.py +7 -0
  42. g13_linux-1.1.3/src/g13_linux/gui/widgets/color_picker.py +72 -0
  43. g13_linux-1.1.3/src/g13_linux/gui/widgets/g13_button.py +139 -0
  44. g13_linux-1.1.3/src/g13_linux/gui/widgets/key_selector.py +130 -0
  45. g13_linux-1.1.3/src/g13_linux/gui/widgets/macro_record_dialog.py +272 -0
  46. g13_linux-1.1.3/src/g13_linux/hardware/__init__.py +7 -0
  47. g13_linux-1.1.3/src/g13_linux/hardware/backlight.py +107 -0
  48. g13_linux-1.1.3/src/g13_linux/hardware/lcd.py +327 -0
  49. g13_linux-1.1.3/src/g13_linux/mapper.py +109 -0
  50. g13_linux-1.1.3/src/g13_linux.egg-info/PKG-INFO +426 -0
  51. g13_linux-1.1.3/src/g13_linux.egg-info/SOURCES.txt +58 -0
  52. g13_linux-1.1.3/src/g13_linux.egg-info/dependency_links.txt +1 -0
  53. g13_linux-1.1.3/src/g13_linux.egg-info/entry_points.txt +3 -0
  54. g13_linux-1.1.3/src/g13_linux.egg-info/requires.txt +13 -0
  55. g13_linux-1.1.3/src/g13_linux.egg-info/top_level.txt +1 -0
  56. g13_linux-1.1.3/tests/test_lcd.py +200 -0
  57. g13_linux-1.1.3/tests/test_macro.py +424 -0
  58. g13_linux-1.1.3/tests/test_mapper.py +162 -0
  59. g13_linux-1.1.3/tests/test_profile_manager.py +170 -0
  60. g13_linux-1.1.3/udev/99-logitech-g13.rules +14 -0
@@ -0,0 +1,93 @@
1
+ # Changelog
2
+
3
+ All notable changes to G13LogitechOPS will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ---
11
+
12
+ ## [1.0.0] - 2025-12-30
13
+
14
+ ### Added
15
+ - **PyQt6 GUI Application** - Full graphical interface for G13 configuration
16
+ - Visual button mapper with clickable button layout
17
+ - Real-time button press visualization
18
+ - G13 layout background image support
19
+ - **Button Mapping Tools** - Hardware reverse engineering utilities
20
+ - `capture_buttons.py` - Interactive button capture script
21
+ - `debug_hid.py` - Raw HID debugging tool
22
+ - `find_g13_device.sh` - Device detection helper
23
+ - `test_direct_read.py` - Direct USB testing
24
+ - **Event Decoder** - Improved button detection and decoding
25
+ - 27 button position definitions
26
+ - Joystick position tracking
27
+ - Raw report analysis
28
+ - **Desktop Integration** - Ubuntu application launcher support
29
+ - `g13-linux.desktop` - Main application launcher
30
+ - `g13-capture.desktop` - Button capture launcher
31
+ - **Documentation** - Comprehensive setup and testing guides
32
+ - Button mapping status documentation
33
+ - Testing checklist for hardware verification
34
+ - Background image setup instructions
35
+
36
+ ### Changed
37
+ - Improved button layout positioning for visual mapper
38
+ - Enhanced G13 button widget rendering
39
+ - Updated desktop file configurations
40
+
41
+ ---
42
+
43
+ ## [0.2.0] - 2024-12-24
44
+
45
+ ### Added
46
+ - Initial project structure
47
+ - Basic USB HID communication with G13
48
+ - Virtual input device creation using evdev
49
+ - CLI interface for running the driver
50
+ - Button mapping framework (mappings TBD)
51
+ - Profile system structure
52
+
53
+ ---
54
+
55
+ ## [0.1.0] - 2024-12-24
56
+
57
+ ### Added
58
+ - Initial release
59
+ - Basic G13 device detection
60
+ - Raw HID report reading
61
+ - Virtual keyboard device creation
62
+ - Command-line interface
63
+ - Development environment setup
64
+ - Documentation (README, CONTRIBUTING)
65
+ - MIT License
66
+
67
+ ---
68
+
69
+ ## Future Versions
70
+
71
+ ### [1.1.0] - Planned
72
+ - Complete G1-G25 button mappings (hardware dependent)
73
+ - Profile loading and saving system
74
+ - Basic LCD text display
75
+
76
+ ### [1.2.0] - Planned
77
+ - Full joystick support and calibration
78
+ - RGB backlight control
79
+ - Systemd service for auto-start
80
+
81
+ ### [2.0.0] - Planned
82
+ - Full LCD graphics support with custom images
83
+ - Profile import/export
84
+ - Application-specific profile switching
85
+
86
+ ---
87
+
88
+ For detailed changes, see the [commit history](https://github.com/AreteDriver/G13LogitechOPS/commits/main).
89
+
90
+ [Unreleased]: https://github.com/AreteDriver/G13LogitechOPS/compare/v1.0.0...HEAD
91
+ [1.0.0]: https://github.com/AreteDriver/G13LogitechOPS/releases/tag/v1.0.0
92
+ [0.2.0]: https://github.com/AreteDriver/G13LogitechOPS/compare/v0.1.0...v0.2.0
93
+ [0.1.0]: https://github.com/AreteDriver/G13LogitechOPS/releases/tag/v0.1.0
@@ -0,0 +1,356 @@
1
+ # Contributing to G13LogitechOPS
2
+
3
+ Thank you for your interest in contributing to G13LogitechOPS! This project needs help from the community to bring full G13 support to Linux.
4
+
5
+ ## 🎯 **How You Can Help**
6
+
7
+ ### 1. Button Mapping (HIGH PRIORITY!)
8
+
9
+ The G13 has 25 programmable buttons that need to be mapped. We need help decoding the USB HID reports.
10
+
11
+ **What You Need:**
12
+ - A Logitech G13 keyboard
13
+ - Linux system
14
+ - Basic Python knowledge
15
+ - Patience for testing!
16
+
17
+ **How to Contribute:**
18
+
19
+ 1. **Run the driver**:
20
+ ```bash
21
+ python -m g13_linux.cli
22
+ ```
23
+
24
+ 2. **Press each button and record the output**:
25
+ - Press G1, note the RAW output
26
+ - Press G2, note the RAW output
27
+ - ... continue for all 25 buttons
28
+ - Include M1, M2, M3 mode keys
29
+ - Include joystick movements
30
+
31
+ 3. **Document your findings**:
32
+ Create a file `button_mappings.txt`:
33
+ ```
34
+ G1: RAW: [0, 1, 0, 0, ...]
35
+ G2: RAW: [0, 2, 0, 0, ...]
36
+ ...
37
+ ```
38
+
39
+ 4. **Submit a Pull Request** with your findings!
40
+
41
+ ### 2. LCD Display Support
42
+
43
+ The G13 has a 160x43 pixel LCD display. We need to:
44
+ - Figure out how to send data to the LCD
45
+ - Create a text display function
46
+ - Add graphics support
47
+ - Make it useful (show profiles, stats, etc.)
48
+
49
+ ### 3. Backlight Control
50
+
51
+ The G13 has RGB backlighting. We need to:
52
+ - Decode color control commands
53
+ - Create an API for setting colors
54
+ - Add profile-based color schemes
55
+
56
+ ### 4. Testing
57
+
58
+ Test on different Linux distributions and report issues:
59
+ - Ubuntu/Debian
60
+ - Fedora/RHEL
61
+ - Arch Linux
62
+ - Others!
63
+
64
+ ---
65
+
66
+ ## 📋 **Getting Started**
67
+
68
+ ### Development Setup
69
+
70
+ 1. **Fork the repository**:
71
+ - Go to https://github.com/AreteDriver/G13LogitechOPS
72
+ - Click "Fork"
73
+
74
+ 2. **Clone your fork**:
75
+ ```bash
76
+ git clone https://github.com/YOUR_USERNAME/G13LogitechOPS.git
77
+ cd G13LogitechOPS
78
+ ```
79
+
80
+ 3. **Create a virtual environment**:
81
+ ```bash
82
+ python3 -m venv .venv
83
+ source .venv/bin/activate
84
+ ```
85
+
86
+ 4. **Install in development mode**:
87
+ ```bash
88
+ pip install -e .[dev]
89
+ ```
90
+
91
+ 5. **Create a branch**:
92
+ ```bash
93
+ git checkout -b feature/your-feature-name
94
+ ```
95
+
96
+ ---
97
+
98
+ ## 💻 **Code Style**
99
+
100
+ ### Python Style Guidelines
101
+
102
+ - Follow PEP 8
103
+ - Use type hints where possible
104
+ - Maximum line length: 100 characters
105
+ - Use meaningful variable names
106
+ - Document functions with docstrings
107
+
108
+ **Example**:
109
+ ```python
110
+ def send_key(self, keycode: int) -> None:
111
+ """Send a single key press and release.
112
+
113
+ Args:
114
+ keycode: Linux evdev key code to send
115
+ """
116
+ self.ui.write(e.EV_KEY, keycode, 1)
117
+ self.ui.write(e.EV_KEY, keycode, 0)
118
+ self.ui.syn()
119
+ ```
120
+
121
+ ### Code Formatting
122
+
123
+ We use `black` for code formatting:
124
+
125
+ ```bash
126
+ # Format your code
127
+ black src/
128
+
129
+ # Check formatting
130
+ black --check src/
131
+ ```
132
+
133
+ ### Linting
134
+
135
+ We use `flake8` for linting:
136
+
137
+ ```bash
138
+ # Check code quality
139
+ flake8 src/
140
+ ```
141
+
142
+ ---
143
+
144
+ ## 🧪 **Testing**
145
+
146
+ ### Running Tests
147
+
148
+ ```bash
149
+ # Run all tests
150
+ pytest
151
+
152
+ # Run with coverage
153
+ pytest --cov=g13_linux
154
+
155
+ # Run specific test
156
+ pytest tests/test_device.py
157
+ ```
158
+
159
+ ### Writing Tests
160
+
161
+ - Add tests for new features
162
+ - Test edge cases
163
+ - Mock hardware interactions
164
+
165
+ **Example**:
166
+ ```python
167
+ def test_button_mapping():
168
+ mapper = G13Mapper()
169
+ # Test that G1 maps to KEY_1
170
+ assert mapper.BUTTON_TO_KEY[1] == e.KEY_1
171
+ ```
172
+
173
+ ---
174
+
175
+ ## 📝 **Commit Guidelines**
176
+
177
+ ### Commit Message Format
178
+
179
+ ```
180
+ type(scope): brief description
181
+
182
+ Detailed explanation if needed.
183
+
184
+ Fixes #123
185
+ ```
186
+
187
+ **Types**:
188
+ - `feat`: New feature
189
+ - `fix`: Bug fix
190
+ - `docs`: Documentation changes
191
+ - `style`: Code style changes (formatting)
192
+ - `refactor`: Code refactoring
193
+ - `test`: Adding tests
194
+ - `chore`: Maintenance tasks
195
+
196
+ **Examples**:
197
+ ```
198
+ feat(mapper): add G1-G5 button mappings
199
+
200
+ Implemented button mappings for the first 5 G-keys based
201
+ on USB HID report analysis.
202
+
203
+ Fixes #12
204
+ ```
205
+
206
+ ```
207
+ docs(readme): update installation instructions
208
+
209
+ Added udev rules setup for non-root access.
210
+ ```
211
+
212
+ ---
213
+
214
+ ## 🔄 **Pull Request Process**
215
+
216
+ 1. **Update your fork**:
217
+ ```bash
218
+ git fetch upstream
219
+ git rebase upstream/main
220
+ ```
221
+
222
+ 2. **Run tests**:
223
+ ```bash
224
+ pytest
225
+ black --check src/
226
+ flake8 src/
227
+ ```
228
+
229
+ 3. **Push your changes**:
230
+ ```bash
231
+ git push origin feature/your-feature-name
232
+ ```
233
+
234
+ 4. **Create Pull Request**:
235
+ - Go to GitHub
236
+ - Click "New Pull Request"
237
+ - Fill out the template
238
+ - Link related issues
239
+
240
+ 5. **Code Review**:
241
+ - Respond to feedback
242
+ - Make requested changes
243
+ - Keep the conversation professional and friendly
244
+
245
+ ---
246
+
247
+ ## 🐛 **Reporting Bugs**
248
+
249
+ ### Before Reporting
250
+
251
+ 1. Check existing issues
252
+ 2. Test on latest version
253
+ 3. Gather debug information
254
+
255
+ ### Bug Report Template
256
+
257
+ ```markdown
258
+ **Describe the bug**
259
+ A clear description of what's wrong.
260
+
261
+ **To Reproduce**
262
+ Steps to reproduce:
263
+ 1. Run '...'
264
+ 2. Press button '...'
265
+ 3. See error
266
+
267
+ **Expected behavior**
268
+ What should happen.
269
+
270
+ **Environment:**
271
+ - OS: [Ubuntu 22.04]
272
+ - Python version: [3.10]
273
+ - G13 firmware version: [if known]
274
+
275
+ **Debug output**
276
+ ```
277
+ [Paste debug output here]
278
+ ```
279
+
280
+ **Additional context**
281
+ Any other relevant information.
282
+ ```
283
+
284
+ ---
285
+
286
+ ## 💡 **Feature Requests**
287
+
288
+ We welcome feature suggestions! Please:
289
+
290
+ 1. Check if it's already requested
291
+ 2. Explain the use case
292
+ 3. Describe the desired behavior
293
+ 4. Consider implementation complexity
294
+
295
+ ---
296
+
297
+ ## 📖 **Documentation**
298
+
299
+ ### Improving Documentation
300
+
301
+ Documentation improvements are always welcome:
302
+ - Fix typos
303
+ - Clarify confusing sections
304
+ - Add examples
305
+ - Translate to other languages
306
+
307
+ ### Documentation Structure
308
+
309
+ - `README.md` - Main project documentation
310
+ - `CONTRIBUTING.md` - This file
311
+ - `docs/` - Detailed guides (planned)
312
+
313
+ ---
314
+
315
+ ## 🌟 **Recognition**
316
+
317
+ Contributors will be recognized in:
318
+ - CONTRIBUTORS.md file
319
+ - Release notes
320
+ - Project credits
321
+
322
+ ---
323
+
324
+ ## ❓ **Questions?**
325
+
326
+ - **General questions**: [GitHub Discussions](https://github.com/AreteDriver/G13LogitechOPS/discussions)
327
+ - **Bug reports**: [GitHub Issues](https://github.com/AreteDriver/G13LogitechOPS/issues)
328
+ - **Security issues**: Email maintainer (do not open public issue)
329
+
330
+ ---
331
+
332
+ ## 📜 **Code of Conduct**
333
+
334
+ ### Our Pledge
335
+
336
+ We are committed to providing a welcoming and inclusive environment for all contributors.
337
+
338
+ ### Expected Behavior
339
+
340
+ - Be respectful and constructive
341
+ - Welcome newcomers
342
+ - Accept constructive criticism
343
+ - Focus on what's best for the project
344
+
345
+ ### Unacceptable Behavior
346
+
347
+ - Harassment or discrimination
348
+ - Trolling or inflammatory comments
349
+ - Personal attacks
350
+ - Publishing others' private information
351
+
352
+ ---
353
+
354
+ **Thank you for contributing to G13LogitechOPS!**
355
+
356
+ Together, we can keep the G13 alive on Linux! 🎮
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 AreteDriver
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include CONTRIBUTING.md
5
+ include requirements.txt
6
+ recursive-include configs *.json
7
+ recursive-include udev *.rules
8
+ recursive-exclude * __pycache__
9
+ recursive-exclude * *.py[co]