Skip to content
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

"," is translated to "?" for russian-computer input method #6

Open
yantar92 opened this issue Feb 12, 2018 · 5 comments
Open

"," is translated to "?" for russian-computer input method #6

yantar92 opened this issue Feb 12, 2018 · 5 comments

Comments

@yantar92
Copy link

yantar92 commented Feb 12, 2018

"," in Russian correspond to Shift+"/" in English qwerty keyboard. As a result, "C-c C-," is translated into "C-c C-?" in English layout as well while it should not. Strangely, "C-c ," still works as expected in English layout.

@a13
Copy link
Owner

a13 commented Feb 12, 2018

do you use the translation from "russian-computer" input method?

@a13
Copy link
Owner

a13 commented Feb 12, 2018

could you please provide the results of calling M-x describe-key for all that bindings?

@yantar92
Copy link
Author

  1. Yes, I use "russian-computer" input method.

  2. "C-c ," is binded to org-priority command from org-mode. As for "C-c C-,", I just realized that it is undefined. However, I am using boon-mode, which translates "c ," key sequence into either "C-c C-," or "C-c ,". Normally, I get org-priority called after "c ," since only "C-c ," is defined. The problem is that boon-mode used read-key function to read the key sequence, and, when reverse-im-mode is active, I get function bound to "C-c ?" (org-table-field-info) called instead of org-priority.

  3. Of course, the previous issue is partially thanks to internal implementation of boon-mode. However, the described problem can shoot for other packages as well:
    which-key seems to use the same read-key approach resulting in "C-c ?" (which should show a summary of key bindings) to be translated into "C-c &-" (Russian "?" corresponds to English "&").

  4. I have "C-c C-," undefined in fundamental-mode. When reverse-im is active, it is translated into "C-c C-?". Guess what happen if "C-c C-?" is bound to something and you press "C-c C-,"?

In summary, it looks wrong to translate the symbols, which have same codes in both English and some other language input method, but correspond to different keys on actual keyboard.

P.S. It is a bit out of scope of this particular bug, but I did not manage to make reverse-im work with key-chord-mode. Any advice here?

@a13
Copy link
Owner

a13 commented Feb 13, 2018

In summary, it looks wrong to translate the symbols, which have same codes in both English and some other language input method, but correspond to different keys on actual keyboard.

Oh, I see, the thing is I use my own keyboard layout, which has punctuation marks on the same keys in both languages, so I didn't face the problem myself. I'll take a look, ok.

@a13
Copy link
Owner

a13 commented Feb 13, 2018

Well, there are several problems

  1. reverse-im translates key even if it is in English keyboard (I fixed this - , will be ,, not a ?)

  2. Emacs knows nothing about system layout, so there's no way to distinguish ? on 7/& key in Russian and ?// key in English, So this one can't be fixed at least using current approach.

  3. As for key-chord.el - it uses its own input-method-function, there's even a comment in the source code:

;; Key chord mode uses input-method-function. And so do internationalisation
;; packages (mule, quail, etc). Do not expect them to work well together.
;; The last one that gets the input-method-function rules.

So i think it's a key-chord issue (well, implementation specific feature).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants