Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to be able to use simultaneously key-chord and an input method such as rfc1345.

Presently I use

C-x RET C-M-\ rfc1234 RET

to activate the input method.

and

M-x key-chord-mode RET M-x key-chord-mode RET (yes, two times)

to re-activate key-chord.

This switch is rather cumbersome. Any idea about how to have them both ativated? Or maybe a way to switch more quickly?

share|improve this question
add comment

2 Answers

Does this function do what you want:

(defun my-whatever ()
  (interactive)
  "Doc string goes here."
  (activate-input-method "rfc1234")
  (key-chord-mode nil)
  (key-chord-mode nil))

I'm not sure what you have C-M-\ bound to, but if it's bound to activate-input-method, I think this does the equivalent of your key presses.

Obviously, you would bind this function to a key sequence of your choosing.

share|improve this answer
    
I tried it but I get an error message : > activate-input-method: Can't activate input method rfc1234' <kbd>C-x RET C-M-\</kbd> is the default for set-input-method`. Changing activate to set raises the same error message. Also I would like to be able to toggle between both mehtods (if they cannot work together). I can define a similar command doing the reverse action but then I will have to use another key. –  Alfred M. Jul 18 '12 at 12:27
add comment
up vote 0 down vote accepted

There is a built-in function toggle-inpu-method, bound to C-\ by default that conveniently allows to switch from the set input method and key-chord support.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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