Python prompt_toolkit.keys.Keys.F9 Examples

The following are 2 code examples of prompt_toolkit.keys.Keys.F9(). 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: test_keys.py    From aws-shell with Apache License 2.0 5 votes vote down vote up
def test_F9(self):
        assert self.aws_shell.cli.current_buffer_name == u'DEFAULT_BUFFER'
        self.feed_key(Keys.F9)
        assert self.aws_shell.cli.current_buffer_name == u'clidocs'