autodetect keys for completion