Python prompt_toolkit.keys.Keys.F2 Examples
The following are 3
code examples of prompt_toolkit.keys.Keys.F2().
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 |
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 |
def toggle_default(event): """ shows the defaults""" global SHOW_DEFAULT telemetry.track_key('F2') SHOW_DEFAULT = not SHOW_DEFAULT
Example #3
Source File: test_keys.py From aws-shell with Apache License 2.0 | 5 votes |
def test_F2(self): match_fuzzy = self.aws_shell.model_completer.match_fuzzy self.feed_key(Keys.F2) assert match_fuzzy != self.aws_shell.model_completer.match_fuzzy