Open schm0lle opened 3 years ago
Thanks for documenting your findings! You're right, current solution for this is far from perfect. It's only a quick workaround to have that functionality at all, so it is just mashed in there with the inline keyboards without differentiating at all.
It may take some time until someone takes a look at this, because it requires quite a bit more planning and implementation effort and our to do lists don't seem to get smaller for some reason. ;)
Also, good public example bots would be appreciated to get a good feel for it. I know Botfather does it, but don't know other good examples.
Contributions and/or further documentation of details are always welcome, of course.
The custom keyboards (ReplyKeyboardMarkup) provided by Telegram bots are displayed as inline keyboards at the moment. This is obviously not perfect, among other things this leads to the fact, that these keyboards scroll away by time or take way more screen space if sent with every message. I try to describe the behavior of the official apps in the following:
If sent with a message the Markup Keyboard opens and replaces the default text keyboard. The normal keyboard can be still accessed by the press of a button. With the same button one can change back. When the keyboard is not sent with
one_time_keyboard
enabled, the Markup Keyboard won't disappear until one closes it by hand or aReplyKeyboardRemove
is sent. Whenone_time_keyboard
ist set, the Markup Keyboard will be minimized after one interaction, but still can be accessed.ReplyKeyboardRemove
is the only option that really removes the Markup Keyboard, in all other cases it will be just minimized.