On Thu, Dec 13, 2012 at 2:54 AM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx> wrote: > > However, unless you've seen something that I haven't, I don't think > it's possible to suppress CapsLock with a filter. The thing is, all the > keymapping is handled straight in the KeyboardInputDevice, where > it keeps its own copy of the modifier state. The only input I see to > the device is directly from the ioctl to the driver -- no way to tell it to > change its state from a filter. > > The only way I can think of for a filter to handle this would be for it > to revert every shifted character that came through if CapsLock is on, > but that's *definitely* a hack! I guess I wasn't clear when I referred to that ticket. Toward the bottom of the ticket is a comment from myself where I suggest a theoretical idea for how to solve this. The filter can watch for B_MODIFIERS_CHANGED and check the mask for caps lock being on, and if it is (and wasn't already on, the state probably needs to be tracked) it can use the set_keyboard_locks function to turn it right back off. I'm not 100% sure this will work, but it sounds reasonable in theory. Though just adding this as a feature inside the input_server might be nice too. -- Regards, Ryan