You are browsing as a guest. Sign up (or log in) to start making projects!

10h 23m 50s logged

Devlog 6

  • My this session was so exciting that i only stopped because I reached the 10 hour limit of the hackclub.
  • Well, I think throughout this project, I have been doing things which I don’t understand, things which were boring
  • but right now this is the point when everything clicked, finally got the hang of RUST

Its gonna be long Devlog read at your own risk(10 hours dump. Note: the maximum limit is 4000 characters so I cannot write everything here just this much)

1. Crazy things this time

So if you may know that in this project, one of the things is to simulate the actual keyboard through the application

Here is a interesting thing i found about special fucniton keys

  • those special functionalities keys work strangly, on MacBook, we press F1 to decrease brightness, so i coded my applicaiton to to press the F1 but nothing happened
  • in reality, most OS do not registers the F1 and F2 key for changing the brightness but it actually uses some code tied to hardware to trigger the special fucitionality

How did i solve this?

  • well, I read about how actually a Operating systems register the keys, and trigger those special functions.
    And this was the reason pressing the shortcuts were not triggering those special functionalities into the computer. As the OS was not looking for me to press F1. it looks for a special code which is tied with the keyboard itself, which was not in virtual keyboard,
  • solution is simple. You have to find out what code is used by a particular operating system to increase or decrease the brightness, and then you will have to trigger that code when the key is pressed.

2. Macros

I implemented macros, you can basically press a sequence of keys with control delay. Just on a single click. It is spamming a key running some keyboard shortcuts on a single click.

  • I created different thread to run this macro so that it does not freeze my main application
  • this is the point which like frustrated me for very long as it is been like three years when I learned concurrency and threading in Python and I did it again in rust this time. I used MPSC (Multi-Producer, Single-Consumer) here. I don’t fully understand it, though, but yeah, I know why I used it and how I used it

3. App Lanucher

So I just liked a button, which upon clicking will open up any application on your computer

  • but the main thing was not actually opening the application, it was which application to open, Open an application by running a command on operating system, you have to know their exact official names, and a normal user does not know that
  • so, I scanned the whole application folder onto the operating system and found out the official names of each application. Then I showed the list in a dropdown to user, from where user can select the names of applications.
    -well, it took me a lot of time because this was my third approach which worked my initial implementaion were like I would force the user to open up that application and then my application can register it, but obviously, the above approach is better than this, so I dropped it.

Jupiter (idk, maybe because its big, and who doesnt like sloar system?)

4. Context Aware Layouts

This is it. The big one. This was the most important, most time-consuming, and absolute flagship feature of the entire project.

  • so, what is context aware layouts? So in the application, one of the parts is to create layouts, which helps with your work aespecially in the productivity/professional applications
  • so lets say you are coding or working, constantly shuffling between multiple desktop apps, with your phone sitting on your desk acting as your custom macro pad. This feature actively extracts the currently focused application on your computer and instantly switches the layout on your phone to match it.
0
2

Comments 0

No comments yet. Be the first!