| 508 | return device_->side1_active.load(); |
| 509 | if (keyName == "X2MouseButton") |
| 510 | return device_->side2_active.load(); |
| 511 | return false; |
| 512 | } |
| 513 | // Button roles come from the configured hotkeys through keyPressed() above. |
| 514 | // Publishing raw device state here would bypass that config (e.g. mouse5 |
| 515 | // would always aim regardless of button_targeting). Same approach as KmboxNet. |
| 516 | bool aimingActive() const override { return false; } |
| 517 | bool shootingActive() const override { return false; } |
| 518 | bool zoomingActive() const override { return false; } |
| 519 | MakcuConnection* makcu() override { return device_.get(); } |
| 520 | |
| 521 | private: |
| 522 | std::unique_ptr<MakcuConnection> device_; |
| 523 | bool useButtonState_ = false; |
| 524 | }; |
| 525 | } |
| 526 | |
| 527 | std::optional<MouseInputMethod> ParseMouseInputMethod(const std::string& method) |
| 528 | { |
| 529 | if (method == "WIN32") |
| 530 | return MouseInputMethod::Win32; |
| 531 | if (method == "GHUB") |
| 532 | return MouseInputMethod::GHub; |
| 533 | if (method == "RAZER") |
| 534 | return MouseInputMethod::Razer; |
| 535 | if (method == "ARDUINO") |
| 536 | return MouseInputMethod::Arduino; |
no outgoing calls
no test coverage detected