2

I have the following configuration for keychord:

(key-chord-define evil-normal-state-map "fk" 'evil-window-up)`

With the timing option, I'm still able to do some operations with the original f function, like find character k with f, after waiting 0.4 seconds. If I do fk inside 0.4 seconds, then he will go the adjacent window up.

Now I want to bind the keysequence f and f9 to do something.

When I configure this:

(key-chord-define evil-normal-state-map "f<f9>" 'evil-window-up)`

Then I get an error: (error: "Key-chord key must have two elements").

Another suggestion, to let keychord accept these keys?

2
  • What kind of first argument does key-chord-define expect? How does it parse the string? E.g., how does it know you don't want a sequence of 4 keys, f, <, f, 9, and >? Perhaps you need to use kbd somewhere? What does C-h f key-chord-define` tell you?
    – Drew
    Oct 8, 2015 at 1:14
  • C-h f key-chord-define gives me the following: pastebin.com/LFQUdbVh so I propably need to find out what the ASCII code is for function F9 key?
    – ReneFroger
    Oct 8, 2015 at 7:40

1 Answer 1

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 involving function keys, control keys, or even your non-english
;; letters (on national keyboards) that otherwise are well positioned for
;; chording on your keyboard.
;; (I think chording left and right arrow keys would be useful, but cannot do.
;; I consider this a bug in Emacs. Input methods could happily return 
;; unmodified *any* key they don't know about.)
1
  • 1
    Well, that's bad to read it. I validated your answer, because it was an answer on my question, even it didn't solved up my case. Thanks for your reply.
    – ReneFroger
    Oct 8, 2015 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.