问题描述
我想向我的机器发送一个硬件事件,以便使我的大写锁定键变为启用状态.当我发送使能中断时,大写锁定键上的指示灯应亮起;当我发送使能中断时,大写锁定键上的指示灯应熄灭.
I want to Send my machine an hardware event so that my caps-lock key becomes enable. When I send enable interrupt, light on Caps-lock key should be on and when I send enable interrupt, light on Caps-lock key should be off.
我正在使用Qt,Mac,C ++,Carbon.
I am using Qt, Mac, C++, Carbon.
推荐答案
无需中断. Caps Lock,Num Lock和Scroll Lock灯是可编程控制的.
请注意,这实际上不会打开Caps Lock(使用户输入全大写文本),但是您不应该这样做.如果您需要以特定格式输入文本,则应自行进行任何必要的修复(可能包括大写).
Note that this won't actually turn the Caps Lock on (causing the user to enter all-capital text), but you shouldn't do that. If you need text input to be in a specific format, then you should make any needed repairs to it—which may include capitalizing it—yourself.
这篇关于生成硬件中断,以启用CapsLock的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!