0

For some reason I cannot set english, only british as the input method.

I am writing a function to switch language from spanish-postfix to english, but english is not working, only british.

I have tried (set-input-method nil) instead (set-input-method english) but it doesn't work. Only (set-input-method british) works but the # is replaced with £ and you have to press it two times to get #: that's not good at all.

Any advice how to be able to switch to default US keyboard? Because nil is not working when jumping from spanish or other language to nil.

4
  • The documentation of set-input-method says that (set-input-method nil) should work. What is the value of current-input-method after you do that? And how exactly does it not work? – NickD Nov 25 '20 at 14:22
  • BTW, if you say M-x describe-input-method RET TAB you will get all the possible completions. You will see that there is a british input method but no english input method. – NickD Nov 25 '20 at 14:27
  • It isn't working. When I am on Spanish or Esperanto or Greek keyboard input and press my keybinding that runs function that has (set-input-method nil) in it nothing happens. But when I replace nil in the same function with e.g. british or esperanto-postfix etc., it works) So the problem is the nil and nothing else. I have tried it with many combinations and the nil value is the problem. Try it yourself if you don't believe me. – HenryBwoii Nov 26 '20 at 17:05
  • I do ESC-ESC : (set-input-method 'greek), I can type greek letters into the buffer and the value of current-input-method is "greek". I then do ESC-ESC : (set-input-method nil) and I can type the normal characters associated with my US keyboard (including # and $) and the value of current-input-method is nil. Are you sure that your keybinding is correct? – NickD Nov 26 '20 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.