13

Just add this code in your init file: (defun disable-key-chord-mode () (set (make-local-variable 'input-method-function) nil)) (add-hook 'minibuffer-setup-hook #'disable-key-chord-mode)


8

If you look at the source for key-chord.el, when you add a binding for xf it is explicitly creating two bindings, one for xf and one for fx. Just because this is the standard doesn't mean you have to adhere to it. You can modify the code that does this to only do one binding. You'll just need to take a line out of key-chord-define. Here is the function, ...


7

As mentioned in the comments, you may be able to achieve what you want using a different package like hydra. Here is an example that binds find-file to the key sequence x f with no modifiers. (require 'hydra) (defun x-hydra-pre () (insert "x") (hydra-timeout 0.5)) (defhydra x-hydra (:body-pre x-hydra-pre :color blue ...


6

Applications written with/for GUI frameworks such as X11 can generally receive individual key-up/key-down events, so it would be possible if only Emacs exposed that functionality to the land of Elisp, but it doesn't. For a surprise though, in e.g. an X11 frame, hit C-h k, then click down with your mouse, drag it around, and release it somewhere. The up/down ...


5

To get help with a function in emacs, type C-h f <function name>. In your case, e.g. key-chord-mode. This doesn't give you much info regarding your specific question, but the help buffer will contain a link to the file where the function is defined, in this case key-chord.el. In this file there is documentation in the comments at the beginning of the ...


4

key-chord-mode seems to be an older piece of source code. It works without the define-minor-mode facilities. Those things happen with the introduction of new features, and if the author does not change its code. To check if key-chord-mode is active, check if variable key-chord-mode is set. Have a look at the packages source code and search for key-chord-...


3

key-chord does not support binding Function keys as a part of key chords. Below is the information regarding that from the "Limitations" section in that package's documentation header. ;; Emacs will not call input-method-function for keys that have non numeric ;; codes or whos code is outside the range 32..126. Thus you cannot define ;; key chords ...


2

Something might have changed recently.. This is the offending code in key-chord-mode: (when eldoc-mode (eldoc-pre-command-refresh-echo-area)) You can work around it my requireing eldoc in your init.el (require 'eldoc) What needs to be fixed in key-chord is to check if the variable eldoc-mode is defined before checking it's value.


2

Thanks to Kaushalmodi for the reference, the package key-seq solved my question! I set it up as following: (key-seq-define evil-normal-state-map "fl" 'evil-window-right) (key-seq-define evil-normal-state-map "fh" 'evil-window-left) (key-seq-define evil-normal-state-map "fj" 'evil-window-down) (key-seq-define evil-normal-state-map "fk" 'evil-window-up) ...


2

See https://stackoverflow.com/questions/26500567/can-i-bind-something-to-alt-meta I admit to being surprised that IntelliJ can do that, as I was under the impression that all applications would be in the same boat when it came to receiving input from modifier keys alone. If someone can provide some details, I'd be interested. My initial guess is that it's ...


2

First of all, I presume you're aware of key-chord (see also this SO thread). I've never used it, and have hazy memories that it doesn't always interact well with evil. This answer is 95% of the way there. The last snag looks like it's in the actual binding of the key, but I don't know how to fix it because I don't know how Korean input methods work. Here'...


2

I believe I found the solution: (key-chord-define-global "cc" 'null) (define-key key-translation-map (kbd "<key-chord> cc") (kbd "C-c"))


1

Recall that for nearly any package what keys trigger what action is resolved by looking it up in the active keymap, falling back to less specific ones if the key couldn't be looked up. key-chord.el sets up a custom input method which triggers for self-inserting keys while Evil sets up a keymap with high specificity for every known state (we don't call them ...


1

You may not be installing it using Spacemacs conventions. You should add key-chord to dotspacemacs-additional-packages in dotspacemacs/layers. dotspacemacs-additional-packages may already be present in your .spacemacs file, but if not, add it like: dotspacemacs-additional-packages '(key-chord) Here's an example of a .spacemacs file that includes ...


1

Is ss bounded to other-window? Then there is a hook inside other-window function, that hooks up with eldoc-mode? If so, you need to initialize eldoc-mode first.


Only top voted, non community-wiki answers of a minimum length are eligible