Automatic keyboard detection

[endlessm/eos-shell#3425]
optional: GNOME style typically just uses `iter->next`