Skip to contentSkip to conversation

Extended scancodes and input filtering

DISCUSSION Matthew Garrett 1 participant 1 message May 17, 2010 HID

lore
Share & tools
lore
#0 lore raw

If an i8042 input filter returns false then the byte will be dropped. This is unfortunate if it's the second byte of an extended scancode. We'd like to be able to drop some events if a platform driver consumes them, but right now it looks like bad things will happen in that case. The filtering is done at the i8042 layer, which has no knowledge of extended scancodes - and teaching it would look like a layering violation.

The simplest approach would seem to be to pass the data byte by reference rather than by value and then let the filter code change it to something that would then be an invalid scancode, but that presupposes that there's such a thing as an invalid scancode. Is there anything suitable here?

Signature · 1 line
Matthew Garrett | [email protected]