diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2015-09-19 14:11:12 +0200 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2015-09-19 14:12:01 +0200 |
commit | f54588d97118c98498ad1a370b5e986b41b5c762 (patch) | |
tree | 8fe99d008f4b3e93a667b5d8213ced174e374056 /examples | |
parent | 5ea5daeddf34e95e608c3077a4687dbcf9d5c53d (diff) |
Added basic mouse support for vt100 terminals.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/mouse-support.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/mouse-support.py b/examples/mouse-support.py new file mode 100755 index 00000000..acb5595a --- /dev/null +++ b/examples/mouse-support.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +from __future__ import unicode_literals +from prompt_toolkit.shortcuts import get_input + + +if __name__ == '__main__': + print('This is multiline input. press [Meta+Enter] or [Esc] followed by [Enter] to accept input.') + print('You can click with the mouse in order to select text.') + answer = get_input('Multiline input: ', multiline=True, mouse_support=True) + print('You said: %s' % answer) |