Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Still, I wish there was a less creepy way.

There should be - there's three LEDs (capslock, numlock and I forget the third one) on standard keyboards which can all be set from the OS side... and at least caps lock (I think!) can be set from Javascript, so it's essentially an 1 bit wide communications bus, three bits if it's an ordinary OS tool.



I think the third is scroll lock [1].

That one feels quite legacy to me, every time I active it it's by accident and I don't understand why stuff is behaving weirdly.

[1]: https://en.wikipedia.org/wiki/Scroll_Lock


I love scroll lock still existing on keyboards. Some operating systems still use it to control text scroll for some reason (useful when you don't have `screen` installed maybe?), but I mostly use it for toggles in video games. It shows the toggle state on a physical interface, like one of those fancy programmable macro keyboards, but on commodity hardware!


I believe there are still a number of applications where Scroll Lock is useful, most notably Microsoft Excel.


how so?


With ScrLk off, the arrow keys move the cursor (active cell). With it on, the arrow keys scroll the window contents instead.

(I believe this is actually the original purpose of ScrLk, but most applications these days don’t use it.)


That functionality would actually be useful in all sorts of games, but that's probably a lost cause at this point. We've settled on other paradigms.


You can't manipulate capslock state from JS.


I can’t just set any key to output the unicode character I want. I know there are some Linux only hacks, but it would be nice to do in a standard way.




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

Search: