-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remapping keys for ido-mode #108
Comments
Hello spiderboit, I use here for example on doc-view: (with-eval-after-load 'doc-view This should also work for you. I haven't combined this with use-package jet but I think this could work there, too. |
hmm I wander what should I then use instead of doc-view ido-mode or what?... |
I don't how ido is named but ido-mode is a good guess. Most packages are called [name]-mode or just [name]. If not sure you can look into the source. |
do you know what ido is? It's a minibuffer completion framework basically, so it's no real major-mode it's active in minibuffer. There are hooks to it like ido-setup-hook or ido-minibuffer-setup-hook. I just searched with-eval-after-load and ido and found that: I will test out the solution there if that works for me, I use xah-fly-keys so I am not sure it will work but it should, will report back after testing their solution or a adaptation of it. |
Well just looked at the code and not created a new sparsemap as child map like in that solution but took the 'ido and ido-common-complition-map and it works:
So that stackexchange bug helped me to find the correct names. |
Everybody seems to be reinventing the wheel here. I found a different solution for making the pseudo-arrow keys in command-mode work everywhere (though not extensively tested yet, this may badly break your emacs). See also #137 . (defun dk-arrow-up ()
"Do what <Up> would do."
(interactive)
(call-interactively (key-binding [up])))
(defun dk-arrow-down ()
"Do what <Down> would do."
(interactive)
(call-interactively (key-binding [down])))
(defun dk-arrow-left ()
"Do what <Left> would do."
(interactive)
(call-interactively (key-binding [left])))
(defun dk-arrow-right ()
"Do what <Right> would do."
(interactive)
(call-interactively (key-binding [right])))
(xah-fly--define-keys xah-fly-command-map
'(
("t" . dk-arrow-down)
("c" . dk-arrow-up)
("h" . dk-arrow-left)
("n" . dk-arrow-right))) |
The problem with that solution is that in command mode generally this keybindings are active, but I use exwm and that would also translate this buttons in exwm buffers. For browser windows that wouldn't hurt, but for xterm window at least currently I can type this letters in command mode :) At least it has pros and cons. |
I haven't been bold enough to do the move to exwm yet, so this is beyond my current level of experience. But as stated in other comments here, I currently think about treating command mode like a sticker Hyper modifier key (using e.g. the |
I read in the project readme about remapping keys which seems a good idea, yet it seems to be focused more or major modes at least if we use the
with-eval-after-load
I got what I want work with a lambda based mapping with a condition:But this seems not very elegant to execute this code for every key-press of h and n and can lead to small lags.
But that seem to not work:
(define-key ido-completion-map [remap forward-char] #'ido-next-match)
Also with global-map it does not work, and if it would work I would need the correct hooks or whatever to make it remove it from global-map.
Any Idea what I do wrong. (btw that is with dvorak therefor h/n for forward/backward)
The text was updated successfully, but these errors were encountered: