Most active commenters

    10 points TravisPeacock | 11 comments | | HN request time: 1.033s | source | bottom

    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. eternityforest ◴[] No.42345569[source]
    Oh boy I probably wouldn't notice for like two entire years since I am constantly accidentally turning on caps lock anyway!
    replies(1): >>42354881 #
    2. 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

    3. Rendello ◴[] No.42345822[source]
    I used to like r/AssHatHackers as a teenager:

    > You've heard of Black Hat and White Hat, now there's Ass Hat Hacking.

    > One day in Comp Sci class I created an infinite loop program that ran on my friend's computer while he was in the bathroom. He promptly called me an Ass Hat. Thus Ass Hat Hackers was born.

    > For hacking to have fun and mess with people.

    My buddy once pranked my other buddy with an infinite loop batch file that opened Chrome a thousand times and crashed the computer. I tried to do the same thing with calculator, but found that it wouldn't loop until the calculator window was closed. Thus the Calc.EXE Hydra was born. Every time you closed one, two would take its place ;)

    Beyond that, I loved talking to my friends while plugging in my mouse to their computer. I found if you maintained eye contact, they wouldn't notice even if you were being really obvious. Then you just wait and jiggle the mouse every few minutes.

    Lastly, I would put people's Chrome into "compatibility mode", which meant that whenever they opened the browser, the entire screen would posterize to 256 colours and it would look crazy. One time my classmate opened his browser and freaked out, and the school was going to call IT. I said "I'll fix it, looks like some idiot changed it to compatibility mode" while shaking my head. It was me who'd done it a week earlier.

    4. smitty1e ◴[] No.42346020[source]
    I hate the Caps Lock and want to nuke it from orbit.

    And its little dog Number Lock, too.

    replies(2): >>42346206 #>>42346726 #
    5. voxadam ◴[] No.42346206[source]
    I toggle Num Lock a few times in the rare event my workstation doesn't immediately respond, if the status light on my wired keyboard remains on things are likely good and borked. Though, I feel like this was more a more dependable test in the days of PS/2 (and PC/AT before that) than it is these days with USB because the former dumb serial interfaces were implemented at such a low level.

    As far as Caps Lock is concerned I've had that mapped to Ctrl for as long as I can remember.

    replies(1): >>42346716 #
    6. smitty1e ◴[] No.42346716{3}[source]
    Maybe I should just shop for a non-antiquated keyboard.
    7. beretguy ◴[] No.42346726[source]
    Convert caps lock to control key.
    8. smoyer ◴[] No.42346819[source]
    My keyboard has no caps-lock key ... I've been looking for a program that prompts me to walk around a bit!
    9. rrr_oh_man ◴[] No.42354881[source]
    Map delete to the capslock key! It’s so much more useful.
    10. nom ◴[] No.42357985[source]
    Makes me nostalgic for when we were getting into programming and sent ach other the .exes on ICQ to try out. I added some code so it stays in the background and ejects the CD tray randomly during the day.

    Fun times.