Automatic keyboard detection

[endlessm/eos-shell#3425]
No need to cast - `g_object_new()` returns a `gpointer`