How to use the ptpython.utils.if_mousedown function in ptpython

To help you get started, we’ve selected a few ptpython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prompt-toolkit / ptpython / ptpython / history_browser.py View on Github external
    @if_mousedown
    def tab(mouse_event):
        _select_other_window(history)
github prompt-toolkit / ptpython / ptpython / layout.py View on Github external
    @if_mousedown
    def toggle_sidebar(mouse_event):
        " Click handler for the menu. "
        python_input.show_sidebar = not python_input.show_sidebar
github prompt-toolkit / ptpython / ptpython / layout.py View on Github external
            @if_mousedown
            def select_item(mouse_event):
                python_input.selected_option_index = index
github prompt-toolkit / ptpython / ptpython / layout.py View on Github external
    @if_mousedown
    def toggle_paste_mode(mouse_event):
        python_input.paste_mode = not python_input.paste_mode
github prompt-toolkit / ptpython / ptpython / layout.py View on Github external
    @if_mousedown
    def enter_history(mouse_event):
        python_input.enter_history()
github prompt-toolkit / ptpython / ptpython / history_browser.py View on Github external
    @if_mousedown
    def f1(mouse_event):
        _toggle_help(history)
github prompt-toolkit / ptpython / ptpython / layout.py View on Github external
    @if_mousedown
    def toggle_vi_mode(mouse_event):
        python_input.vi_mode = not python_input.vi_mode
github prompt-toolkit / ptpython / ptpython / layout.py View on Github external
            @if_mousedown
            def goto_next(mouse_event):
                " Select item and go to next value. "
                python_input.selected_option_index = index
                option = python_input.selected_option
                option.activate_next()