之前就用 karabiner 搞过这套东西, 写过一篇简单的说明在这儿:
http://blog.xiaket.org/2015/karabiner.html当时就很纠结, 希望能让指示灯来指示输入法状态, 不过当时没搞定.
今天看的链接里的 maclight, 搞了半天, 又找来 keyboard_leds.c 编译测试了半天, 仍然没法让大写锁定的指示灯亮起来. 找到最后看到 maclight 的作者在 Issue 里面说的:
"Maclight still works on latest OSX, but only for external keyboards,
not for laptops. It has always been that way, I should clarify that in the README.
As far as I know OSX unfortunately doesn't expose an API to toggle the
LEDs on laptop keyboards."
于是放弃了... 希望这段经历能够避免后人在这上面花费太多时间.
另外, 要显示输入状态, 这个软件可以使用:
https://pqrs.org/osx/ShowyEdge/index.html.en