![]() The only code we'll change is we want to register the global shortcuts once the application is ready. A lot of the comments are generated from it as well. Our node.js code is mostly given to us by default when scaffolding a Electron Forge project. The preloader code, which serves as a bridge between node.js and the frontend.The renderer code, which is essentially just our frontend.The node.js code that communicates between our app and the operating system.Our project structure will be divided into 3 parts: ![]() What will change is our project structure and the added global shortcut functionality. Furthermore, our code is going to largely remain the same. I won't go over ever single code change, as that would make for an insanely long post. So through this migration, we can utilize global shortcuts and run our app on all major desktop platforms! Electron.js gives us a way to build cross-platform desktop applications in JavaScript. One of the reasons I chose to write the frontend for this project in Vue/JavaScript, is that if I needed to, I could easily migrate to an Electron application. In fact, I sort of accounted for this in the beginning. Oh boy, what do we do about this? Well fortunately, we're not out of options. So do you know what CAN'T perform global shortcuts? The browser. Too often can you accidentally leave another application open and completely mess up your split times or your entire run! It's not practical to make sure that your timer remains in the foreground while you're speed-running a game. If you're familiar with LiveSplit and you've been a speed-runner for a decent amount of time, you'll know that global shortcut keys are a lifesaver when it comes to tracking your splits. the windows key opening the app launcher). ![]() Global shortcuts are keys or key combinations that you can type on your keyboard to trigger some sort of functionality on your app or operating system (e.g. I overlooked one of the most crucial features to our speedrun timer, global shortcuts. When I first designed our app, I went down the PWA route, thinking that the browser had everything we needed for our app to function properly.īut I was wrong. What do I mean by that? Well it has to do with initial design considerations. Well after a few successful blog posts, we've finally hit our first big problem, and it's a show-stopper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |