In the debug log, I found the following message for each input device:
debug <general>: libinput: event2 - skip unconfigured input device '/dev/input/event2'
Adding "lxc.mount.auto: sys:rw" to the LXC configuration fixed the issue - the keyboard now works properly.
Now I am going to try CEC over HDMI.