←back to thread

10 points TravisPeacock | 1 comments | | HN request time: 0.4s | source

I was building a program that needed to allow a user to set a hotkey but the program lives in the taskbar so there's no UI. I decided what I would do is enable the caplock key when they click "Set Hotkey" and then they can disable the caplock key (or set it to its initial state, rather) to indicate they have finished.

That project is still going but I got sidetracked by the idea that I could just build a program to randomly enable the caplock key every once in a while.

This isn't a program designed to calculate child malnutrition or do anything to stop genocide etc but I was able to do it in a few hours and learn some new tricks.

I hope this isn't too stupid for HN.

1. jchw ◴[] No.42345799[source]
> Icons are converted into Go arrays using the 2goarray tool. Scripts (generate.bat and generate.sh) handle the conversion.

Barring any particular reason not to, I recommend switching to Go 1.16+'s native embed mechanism, which doesn't require code generation and should improve build times.

https://pkg.go.dev/embed