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

on Linux keymap does not work with Chinese input method enabled #710

Closed
a3linux opened this issue Mar 23, 2017 · 4 comments
Closed

on Linux keymap does not work with Chinese input method enabled #710

a3linux opened this issue Mar 23, 2017 · 4 comments

Comments

@a3linux
Copy link

a3linux commented Mar 23, 2017

Check list

  • Atom version info(atom --version)
    tom : 1.16.0-beta0 | 1.15.0 (also tested and confirmed)
    Electron: 1.3.13
    Chrome : 52.0.2743.82
    Node : 6.5.0

  • vim-mode-plus version.
    Latest one tested and confirmed.

  • You disabled vim-mode? You cannot use both vim-mode and vim-mode-plus simultaneously.
    No vim-mode installed.

  • Tried to latest stable atom version with latest vim-mode-plus.
    Done already.

  • Restarting Atom itself solve your problem?
    It can be reproduced any time with multiple atom versions.

  • Keybinding issue? Read this.
    It is not simple keybinding issue.

  • If you follow Ideal issue reporting, it's great!

The actually issue is that if Chinese input method is enabled, on my Fedora 25, it is ibus input method with libpinyin. When I switch input source to Chinese and enable vim-mode-plus in Atom, then I can NOT use the editor at all. h,j,k,l ever can not move the cursor. At this point, if I switch to English input source, the editor can work again. Or if I still remain in Chinese input source but disable vim-mode-plus in ATom, the editor works as normal mode.
There should be some conflict between the Chinese input source and vim-mode-plus of Atom.
But up to now, I didn't find any hint yet.

I will update this bug if I find anything, but I hope other one can help to test and confirm this first.

@t9md
Copy link
Owner

t9md commented Mar 23, 2017

I don't thinks there is conflict in Chinese input source and vmp.
I think when Chinese input method is enabled, keystroke is not handled as user intended in atom's keybinding system.
So this issue is keybinding issue.

You can observe how your keystroke is handled in atom's keymap system by enableing keybinding-resolver by "Keybinding Resolver: Toggle" from command-palette.

Can you see hello! in chrome console.log?

  • With vimp-mode-plus disabled
  • Chinese input method enabled
  • Set following user:hello command in init.coffee.
  • Set keymap.cson to map user:hello from a key
  • And type a in normal text-editor.
    • Should print hello! in console.log in chrome-dev-tools-console if correctly keymapped.
  • init.coffee
atom.commands.add 'atom-workspace',
  'user:hello': ->
    console.log "hello!"
  • keymp.cson
'atom-text-editor:not([mini])':
  'a': 'user:hello'

@a3linux
Copy link
Author

a3linux commented Mar 23, 2017

I did a quick test with keybinding-resolver,

  1. Enabled keybinding-resolver in Atom with vim-mode-plus enabled
  2. Click h,j,k,l and I can got those keys in the resolver as vim-mode-plus:move-left/down/up/right
  3. Enabled Chinese input source and keep it in English input, click h,j,k,l in Atom.
    No key response in keybindings-resolver at all.

I will try your way later then.

@t9md
Copy link
Owner

t9md commented Mar 23, 2017

No need extra test, it's now clear.
Report to this repo.

https://github.com/atom/atom-keymap

You have to provide exact description of your platform, atom-version, how keybinding-resolver saying. It's not vmp issue, so using my snippet might better for them to understand it's NOT vim-mode-plus specific.

@a3linux
Copy link
Author

a3linux commented Mar 23, 2017

ok. With your test method, when Chinese input source is enabled, no "hello!' in the console when pressing 'a'.
I will go https://github.com/atom/atom-keymap then.
Thanks.

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

No branches or pull requests

2 participants