Lua primitives: prompt_chars()
The bottom row of the lumail mail-client is designated as the message area, but it is also used to prompt for input.
The prompt_chars() function allows you to query a user for input. The function will keep reading keypresses, without the need for RETURN to be pressed, until one of the keys pressed matches a character given in the character string.
The return value will be the single character the user entered.
prompt_chars( "The prompt to display", "Valid characters to accept" );
entered = prompt_chars( "my prompt will accept A, B, or C", "ABC" ); msg( "You entered: " .. entered );
You'll notice that prompt_yn is just a special case of this function.
This function has been available since version 0.09.