uterm_input_uxkb: update leds to match keyboard state
Upon device wakeup or led state changes, we update the keyboard LEDs to
match the new xkb state.
This means that every kmscon instance retains its own LED state, in the
users eyes. In other words, if you had Num Lock set on one kmscon, switched
to an X VT where it's off, and come back, then Num Lock will be set as
when you left. This is what X server, linux VT, etc. do.
Note that since we need to write the LED events to the evdev devices, we
need to open them RDWR. But since we don't really care what happens to
that write(), that's fine.
Also note that this means NumLock is off by default, which might be
annoying. We need to think how to get some 'setleds' or 'numlockx'
equivalent functionality.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>