euporie.core.widgets.menu.KeyBindings
- class euporie.core.widgets.menu.KeyBindings
A container for a set of key bindings.
Example usage:
kb = KeyBindings() @kb.add('c-t') def _(event): print('Control-T pressed') @kb.add('c-a', 'c-b') def _(event): print('Control-A pressed, followed by Control-B') @kb.add('c-x', filter=is_searching) def _(event): print('Control-X pressed') # Works only if we are searching.