6 <perex>CLI tool, D-Bus service and a GUI application for configuring the CadMouse Pro.</perex> |
6 <perex>CLI tool, D-Bus service and a GUI application for configuring the CadMouse Pro.</perex> |
7 <pořadí>020</pořadí> |
7 <pořadí>020</pořadí> |
8 |
8 |
9 <text xmlns="http://www.w3.org/1999/xhtml"> |
9 <text xmlns="http://www.w3.org/1999/xhtml"> |
10 <p> |
10 <p> |
|
11 The cadMousePro is an independent free tool for configuring 3DConnexion CadMouse Pro. |
11 </p> |
12 </p> |
|
13 |
|
14 <h2>Architecture</h2> |
|
15 |
|
16 <p> |
|
17 The cadMousePro consists of two parts: |
|
18 </p> |
|
19 |
|
20 <p> |
|
21 The first one is a command line utility which sends configuration to the mouse as a USB HID message. |
|
22 This utility can also run in daemon mode and expose a D-Bus interface that could be called by other apllication. |
|
23 This tool must run under <code>root</code> or other user who has permissions to access the USB device. |
|
24 </p> |
|
25 |
|
26 <p> |
|
27 The second part is a simple GUI apllication which shows mouse status (name and battery level) and can configure the mouse. |
|
28 This GUI layer connects to the daemon using the D-Bus interface. |
|
29 Thus the GUI can run under any user (can be restricted using the D-Bus rules, if needed). |
|
30 The information about the battery level is provided by the UPower daemon (also over a D-Bus interface). |
|
31 </p> |
|
32 |
|
33 <m:diagram><![CDATA[ |
|
34 node [shape="box", fontname="Ubuntu,Sans"]; |
|
35 |
|
36 usb [label="USB HID"] |
|
37 daemon [label="cadMousePro Daemon"] |
|
38 cli [label="cadMousePro CLI"] |
|
39 gui [label="cadMousePro GUI"] |
|
40 other [label="Other D-Bus client"] |
|
41 upower [label="UPower"] |
|
42 |
|
43 other -> daemon; |
|
44 gui -> daemon; |
|
45 gui -> upower; |
|
46 |
|
47 cli -> usb; |
|
48 daemon -> usb; |
|
49 upower -> usb; |
|
50 ]]></m:diagram> |
|
51 |
|
52 <h2>Features</h2> |
|
53 |
|
54 <p>Mouse status:</p> |
|
55 <m:img src="img/cadMousePro-status-adwaita-v0.3.png"/> |
|
56 |
|
57 <p>Mouse configuration:</p> |
|
58 <m:img src="img/cadMousePro-configuration-adwaita-v0.3.png"/> |
|
59 |
|
60 <p>About:</p> |
|
61 <m:img src="img/cadMousePro-about-adwaita-v0.3.png"/> |
|
62 |
|
63 <h2>Disable Smart scrolling (free wheel)</h2> |
|
64 |
|
65 <p> |
|
66 The CadMouse Pro has a feature called „smart“ scrolling (also know as „free wheel“) |
|
67 which is actually not so smart and is rather an anti-feature and most users will probably want to disable it. |
|
68 </p> |
|
69 |
|
70 <p> |
|
71 This feature simulates the momentum – if you scroll bit faster, the mouse continue to send scroll events even if you have already stopped scrolling the wheel. |
|
72 So you scroll, stop scrolling, move cursor to another window… but the mouse still scrolls and you get angry |
|
73 (especially it that another window was a taskbar and your windows are now fiercely switching). |
|
74 </p> |
|
75 |
|
76 <h2>Build and installation</h2> |
|
77 |
|
78 <p>We use the CMake build system, so the steps are basically:</p> |
|
79 |
|
80 <pre><![CDATA[mkdir build && cd build && cmake .. && make]]></pre> |
|
81 |
|
82 <p>Required libraries:</p> |
|
83 |
|
84 <ul> |
|
85 <li>hidapi-hidraw</li> |
|
86 <li>Qt</li> |
|
87 </ul> |
|
88 |
|
89 <p> |
|
90 Old version <code>v0.1</code> requires only <code>hidapi-hidraw</code> and has no GUI nor D-Bus interface. |
|
91 </p> |
|
92 |
|
93 <p> |
|
94 The daemon mode requires instalation of the D-Bus policy (in order to expose the service on the system bus and allow others to use it). |
|
95 Template for policy is in file: |
|
96 </p> |
|
97 <pre>config/etc/dbus-1/system.d/info.globalcode.mouse.cadMousePro.conf</pre> |
|
98 |
|
99 <p> |
|
100 If we want to configure the mouse automatically when it is connected, we should install a udev rule. |
|
101 Template for udev rule is in file: |
|
102 </p> |
|
103 <pre>config/etc/udev/rules.d/99-cadMousePro.rules</pre> |
|
104 |
|
105 <h2>Usage</h2> |
|
106 |
|
107 <p> |
|
108 For ad-hoc configuration we just run: |
|
109 </p> |
|
110 |
|
111 <pre>sudo ./cadMousePro --frequency 250 --smart-scrolling false --lift-off-detection true</pre> |
|
112 |
|
113 <p> |
|
114 The daemon is started in this way: |
|
115 </p> |
|
116 |
|
117 <pre>sudo ./cadMousePro --daemon true</pre> |
|
118 |
|
119 <h2>3DConnexion CadMouse Pro Wireless</h2> |
|
120 <p>Our software works with this mouse:</p> |
|
121 <m:img src="img/3DConnexion-CadMouse-Pro-1.jpeg"/> |
|
122 <m:usb-id/> |
|
123 |
12 </text> |
124 </text> |
13 |
125 |
14 </stránka> |
126 </stránka> |
15 |
127 |