dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
436 stars 81 forks source link

Properly fix the xkb_state on wakeup problem #51

Closed bluetech closed 12 years ago

bluetech commented 12 years ago

Hi David,

Here is my proposed fix for the problem, as we've discussed. I couldn't reproduce any bad behavior with this.

There may still be problems in some obscure cases, like a device having two physical keys mapping to the same keycode, and they were held simultaneously on VT-switch(!). Anyway, I wouldn't worry about it :)

But if the patch looks fine, please do try and break it, in case I missed something.

Ran

dvdhrm commented 12 years ago

Works like a charm! I picked up both patches and removed the update_led call when going asleep.

The only thing that bothers me is, that it reminds me of how bad xserver handles this. Oh well, someone needs to fix xserver.

And if two keys map to the same keycode, we should fix the kernel to not do that. keycodes are supposed to be unique among keys so we can rely on that.