Automatic keyboard detection

[endlessm/eos-shell#3425]
I'd avoid making unnecessary changes to the upstream code.