Developers around the world prefer to use keyboard exclusively, and always forget about such an amazing input device as a mouse. With a new MX Master 3 mouse from Logitech it is now possible to achieve never-seen before levels of productivity by utilizing all input devices you have on your desk.
What it does
Our intelligent assistant works in a background on developers machine and analyses keyboard patterns. It checks and counts every keyboard combination developer uses, including longer and more complex ones (e.g. ctrl+c -> ctrl+v -> ctrl+s pressed sequentially). Then, the assistant notices the most used patterns of developers activity and suggests easier, quicker way to call that combination: mouse gestures.
Developer has an ability to bind a shortcut, key combination or combination sequence on a mouse gestures, which feel easier and more fluid.
How we built it
We used new, freshly release "Master" series input device from Logitech: MX Master 3 mouse and MX Keys keyboard. We use provided API to track key-presses, mouse movements and mouse touches. That data is processed by node backend application, which analyzes and saves data to mongo database. Data is nicely displayed with electron application, running react.
Challenges we ran into
Even though it does not look that complex, it was actually a very challenging task to build what we imagined. There are many layers of code needed, from the frontend application, which need to look and feel good, to the low-level system events. which we need to read and invoke to monitor/emulate a keyboard. We had to use many technologies at the same time, working together to achieve what we envisioned.
We also had technical problems with some of the technologies we chose to use. First of all, the SDK provided by logitech is nowhere near a production-ready product and we had to work around its quirks and features. Secondly, some of the Electron parts aren't actually meant to be used like we used it, so we spent a lot of time tuning it for out needs.
Accomplishments that we're proud of
Ended up with a finished and stable product, which we actually used even during development of itself. As soon as we had some of the basic features we started to use it, eventually finding bugs and areas of improvements. The latest iteration definitely looks and feels like a production product.
What we learned
We learned a lot about new MX Master series products, which have never-seen before features. We learned a lot about pair-programming (without hurting each other), as we have been doing it for tens of hours straight. We improved our knowledge in system events and low level input device management.
We definitely learned a lot about our development patterns using our own application, because it gave us some fun insights on what and how we use.
What's next for Logi intelligent assistant
First of all - radical refactoring and code optimization. Sleep deprivation, highly-caffeinated brain, inability to spend precious time by finding the best solution; it all doesn't play well on the code quality. If we decide to work on this application in the future, the first thing to do is code refactoring.
Secondly, such product is already insanely helpful for development process, so we plan to keep using it in the future, gradually improving it.