added support for keyboard selection
do not send empty selection