Do You Know Which Key Technologies Are Used in the Shopify Platform?

Today we are going to talk about the key technologies used in the Shopify platform, but first, we have to talk about the Silk Road. The Silk Road was, and still is, a network of trade routes…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to make the NumLock LED work on OSX

If you are reading this article, the chances are that you just got yourself a shiny new TKL/Gaming/Mechanical keyboard and found out that the NumLock key is not working when using it with a Mac.

Unfortunately, little to no focus is given to the fact that some keyboards use the NumLock LED to toggle the input mode physically on certain key sets. I ran in to this exact problem with my CoolerMaster MasterKeys Pro M where it required the NumLock LED to toggling number input vs Arrow keys the shared number pad.

Cherry Brown ❤

While this tool worked as described it was not ideal for everyday use. I did not want to run a command every single time I wanted to toggle NumLock. There were solutions on StackOverflow and elsewhere suggesting to use AppleScript or another input listener software to run the command automatically on keypress events. Some of these workarounds even required using licensed software, but none of them were elegant and easy-to-use.

I already paid for my Mac and my keyboard. I shouldn’t have to pay to use the damn NumLock LED!

So one afternoon, I decided to sit down and hack the excellent SetLedsMac project to add support for a daemon mode. I wanted to simply run this process in the background, make it listen to any NumLock input and then trigger the LEDs automatically without any extra work.

So after few hours of reading ObjectiveC documentation and mucking around with `launchctl`, I produced this:

Key Benefits:
- No third party software.
- Minimal system footprint.
- Automatically runs once you log in. (please let me know if anyone knows how to run a LaunchDaemon at login screen)
- GNU Licensed. You can build it yourself!

Since this API listens to key events at a lower-level in the system, we can correctly capture unsupported key events like NumLock and other non-standard function keys your keyboard may have.

Sounds easy enough right? Wrong!

Thanks for reading and hope you learned something (I sure did!). Enjoy your new keyboard!

Add a comment

Related posts:

Seize The Good to Uplift Your Day

Stephanie Page started the Seize the Good in 2019 to share positive stories highlighting non-profit organizations, businesses doing good, social movements and success stories of people helping…

3 months into SugarKubes

I started a container marketplace called SugarKubes. The idea is you can buy and sell docker containers and code. People do this with website designs, assets, and full themes and charge around $10 —…

28. Smart pointers

28. Smart pointers. “[Note] More effective C++ (6)” is published by BD.