Python prompt_toolkit.keys.Keys.F3 Examples

The following are 3 code examples of prompt_toolkit.keys.Keys.F3(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module prompt_toolkit.keys.Keys , or try the search function .
Example #1
Source File: bindings.py    From kafka-shell with Apache License 2.0 6 votes vote down vote up
def get_bindings(settings):
    bindings = KeyBindings()

    @bindings.add(Keys.F2)
    def _(event):
        settings.set_next_cluster()

    @bindings.add(Keys.F3)
    def _(event):
        settings.set_enable_fuzzy_search(not settings.enable_fuzzy_search)

    @bindings.add(Keys.F9)
    def _(event):
        settings.set_enable_help(not settings.enable_help)

    @bindings.add(Keys.F10)
    def _(event):
        current.get_app().exit(exception=EOFError)

    return bindings 
Example #2
Source File: key_bindings.py    From azure-cli-shell with MIT License 5 votes vote down vote up
def toggle_symbols(event):
    """ shows the symbol bindings"""
    global SYMBOLS
    telemetry.track_key('F3')

    SYMBOLS = not SYMBOLS 
Example #3
Source File: test_keys.py    From aws-shell with Apache License 2.0 5 votes vote down vote up
def test_F3(self):
        enable_vi_bindings = self.aws_shell.enable_vi_bindings
        with self.assertRaises(InputInterrupt):
            self.feed_key(Keys.F3)
        assert enable_vi_bindings != self.aws_shell.enable_vi_bindings