6 readonly property alias mice: priv.miceCount
7 readonly property alias keyboards: priv.keyboardCount
12 property var mice: new Array()
13 property var keyboards: new Array()
15 property int miceCount: 0
16 property int keyboardCount: 0
18 function addMouse(devicePath) {
19 mice.push(devicePath);
23 function addKeyboard(devicePath) {
24 keyboards.push(devicePath);
28 function removeDevice(devicePath) {
29 for (var i = 0; i < priv.mice.length; i++) {
30 if (priv.mice[i] == devicePath) {
31 priv.mice.splice(i, 1);
35 for (var i = 0; i < priv.keyboards.length; i++) {
36 if (priv.keyboards[i] == devicePath) {
37 priv.keyboards.splice(i, 1);
48 var device = inputInfo.get(inputInfo.indexOf(devicePath));
49 if (device === null) {
53 var hasMouse = (device.types & InputInfo.Mouse) == InputInfo.Mouse
54 var hasTouchpad = (device.types & InputInfo.TouchPad) == InputInfo.TouchPad
55 var hasKeyboard = (device.types & InputInfo.Keyboard) == InputInfo.Keyboard
57 if (hasMouse || hasTouchpad) {
58 priv.addMouse(devicePath);
59 } else if (hasKeyboard) {
60 // Only accepting keyboards that do not claim to be a mouse too
61 // This will be a bit buggy for real hybrid devices, but doesn't
62 // fall for Microsoft mice that claim to be Keyboards too.
63 priv.addKeyboard(devicePath)
67 priv.removeDevice(devicePath)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list