Hacker News new | past | comments | ask | show | jobs | submit login

I'm curious, with a macbook do the right thing if you plug in a USB keyboard?

I'm not suggesting you just use a USB keyboard instead (although, now that I say it, that does seem like a solution).

What I'm actually wondering is how much work it would be just to create a single button that's an escape key on a USB stick that implements the USB keyboard protocol (but only ever reports that the escape key was hit).




> What I'm actually wondering is how much work it would be just to create a single button that's an escape key on a USB stick

If you have a suitable Arduino (or compatible) lying around probably not a lot of work: https://www.arduino.cc/reference/en/language/functions/usb/k...

It would depend if "Escape" requires a specific non-standardized scan code or not. (Even if it did you could also try sending the Ctrl-[ variety instead.)

(It's even possible to get away with not using USB-specific hardware, like I did in the "old days": http://code.rancidbacon.com/ProjectLogArduinoUSB :D )

Random piece of keyboard trivia: On Mac OS X (and I assume current variants) each keyboard is a separate "entity" with e.g. separate state which includes caps lock state. This means that the USB "Capslocker" gag USB dongles that randomly toggled Caps Lock state didn't actually affect Macs.)


If anyone is really looking for a single-key macropad... the Seeeduino Xiao is a small microcontroller development board which would suit the purpose. e.g. https://www.40percent.club/2020/08/wonky.html


Yes, it does. I do know that single-purpose keyboard extensions like this might be harder to integrate than you'd think. When I had my first Powerbook back in 2004, I bought a USB numeric keypad for entering grades into a spreadsheet quickly. One of the OS X upgrades in the following years rendered the keypad unrecognizable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: