Make keyd command handling more consistent