| 512 | ) |
| 513 | |
| 514 | def _app_is_exitable(self): |
| 515 | # This needs to be used instead of app.done() because prompt toolkit |
| 516 | # sets the future to None when it finishes run_async. So it is |
| 517 | # indeterminable whether app.done() is actually done because |
| 518 | # the future being None results in a return value of False. |
| 519 | # So instead we have our own custom check to see if there is a future |
| 520 | # present on the app (meaning the run_async has not finished) and the |
| 521 | # result for that future has not been set. |
| 522 | return self.app.future and not self.app.future.done() |
| 523 | |
| 524 | def _convert_key_to_vt100_data(self, key): |
| 525 | return REVERSE_ANSI_SEQUENCES.get(key, key) |