Skip to content

Creating a toggle to activate/deactivate keybindings #548

@fast-90

Description

@fast-90

Hi all, I have the following snippet in my config.

  (general-create-definer local-leader-keys
    :states '(normal visual emacs motion) ; 
    :keymaps 'override 
    :prefix ",")

  (local-leader-keys
    :keymaps 'org-mode-map
    "jc"    '(jupyter-org-clone-block                   :wk "Clone blocks")
    "jm"    '(jupyter-org-merge-blocks                  :wk "Merge blocks")
    "js"    '(jupyter-org-split-src-block               :wk "Split blocks")
    "jj"    '(jupyter-org-jump-to-visible-block         :wk "Jump to block"))

Is there any way to create another keybinding which acts like a toggle to activate/deactivate these four keybindings? I have tried things with :predicate and :prefix-map but couldn't quite figure out how to use them properly (not sure if these are even the solutions for my problems).

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions