$dialog() will open a custom dialog and won't let any other window retrieve focus until it's closed. In other words you'd have to make your own custom dialog like $input() with a 1 character limit editbox, it won't be done for you. It offers more control but means more work.