keyboard handling with dummy sendMessage function