hyperbole-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Action key with ivy


From: Mats Lidell
Subject: Re: Action key with ivy
Date: Fri, 03 Feb 2023 17:26:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Garjola,

Sorry for not responding sooner.

I'm not an expert on key bindings but I have two ideas here:

  - Since both Hyperbole and Ivy are minor modes they are competing on the what
    binding will take effect. Since it seems in your case Hyperbole's map is
    winning you can try to set M-o in hyperbole-mode-map instead of setting it
    in Ivy's maps. Hyperbole does not change any other modes key maps.

    Alternatively you can try to load Ivy before Hyperbole since the load order
    seems to matter in what gets picked up.

    (Take all of this as suggestions to explore since I have not tested it nor
    have any experience with it. Just read about this on Stack Overflow. Feel
    free to correct me!)

  - You can disable all Hyperboles key bindings with customizing `hkey-init` and
    setting it to nil. <customize-variable 'hkey-init> You are then free to
    setup the binding as you wish. With the down side of having to do that for
    all Hyperbole bindings you want to keep too. But this might make a cleaner
    setup.

%% Mats 

> Garjola Dindi writes:
> Hi,
>
> Not having had any answer, I was wondering if my question was clear!
>
> I think that it can be asked in a different way: 
>
> How can I unbind "M-o" and rebind the action key to another key?
>
> Thanks for your help
>
> G.
>
> On Sun 29-Jan-2023 at 19:11:30 +01, Garjola Dindi <garjola@garjola.net>
> wrote: 
> > Hi,
> >
> > I am learning to use hyperbole. Thanks for this wonderful package!
> >
> > I am an ivy user, and have issues when using "M-o" in the ivy completion
> > buffers. In ivy, "M-o" is bound to "ivy-dispatching-done" in 2 keymaps
> > (ivy-minibuffer-map and ivy-mode-map).
> >
> > When I press "M-o" inside an ivy completion buffer, hyperbole intercepts
> > the key and tells me:
> >
> > ,----
> > | Action Key depressed; go to release point and press {M-o}.
> > `----
> >
> > I have tried to rebind keys in the "hyperbole-init-hook" with this:
> >
> > ,----[ elisp ]
> > | (lambda () (hkey-set-key (kbd "s-O") 'hkey-operate)
> > |                             (hkey-set-key (kbd "s-<return>") 'hkey-either)
> > |                             (define-key ivy-minibuffer-map (kbd "M-o")
> > |                             'ivy-dispatching-done) 
> > |                             (define-key ivy-mode-map (kbd "M-o")
> > |                             'ivy-dispatching-done)) 
> > `----
> >
> >
> > Note that rebinding "hkey-either" to "s-<return>" works (I do this to
> > avoid conflicts in org-mode), but my ivy hack seems not to have any effect
> >
> > I suppose that I am doing something wrong, but I can't seem to find out
> > a solution.
> >
> > Thanks for your help.
> >
> > Garjola
> >
>
> -- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]