Mir

Code review comment for lp:~andreas-pokorny/mir/combine-modifier-state-accross-devices

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> Hm. The addition of Seat is great, but it looks like this will remove the
> ability to do per-keyboard modifiers? This isn't super-useful for things like
> <alt> or <ctrl>, but it's super-annoying for things like <num lock>.
>
> Would it be possible to add the Seat interface, but still have keyboard
> devices handle their own modifiers? My understanding of the problem suggests
> that it is, but you've undoubtedly got a better understanding :)

I think we can achieve that in several ways.. and I think one of the options to do that looks robust: Have an additional keyboard device modifier property in MirEvent for keyboard events. The modifier which is currently stored per device in seat. After peeking into xkb_mapper. On the client side we would have to track the xkb state per keyboard device, and on every key event from a device inject potentially not experienced scan codes for caps lock and num lock (because it might have happened before the surface existed or when it was not focused) to ensure that the client has the right state..

We also discussed doing the xkb mapping on the server side.. and maybe per surface.. but thats would boil down to similar tasks.

Aaahnnd... we would have to find ways to tunnel that info through qt key events.. i believe..

Hmm why does this work at all right now?

« Back to merge proposal