##// END OF EJS Templates
reformat with darker
reformat with darker

File last commit:

r28076:7f8f8ea0
r28124:dfd08f48
Show More
shortcuts-config-traitlet.rst
20 lines | 761 B | text/x-rst | RstLexer
/ docs / source / whatsnew / pr / shortcuts-config-traitlet.rst

Terminal shortcuts customization

Previously modifying shortcuts was only possible by hooking into startup files and practically limited to adding new shortcuts or removing all shortcuts bound to a specific key. This release enables users to override existing terminal shortcuts, disable them or add new keybindings.

For example, to set the :kbd:`right` to accept a single character of auto-suggestion you could use:

my_shortcuts = [
    {
        "command": "IPython:auto_suggest.accept_character",
        "new_keys": ["right"]
    }
]
%config TerminalInteractiveShell.shortcuts = my_shortcuts

You can learn more in :std:configtrait:`TerminalInteractiveShell.shortcuts` configuration reference.