Honour and fill $key, set keyboard-transmit-mode if possible