atom / atom-keymap

Atom's selector-based keymap system
MIT License
105 stars 57 forks source link

Cmd+backslash isn't working yet in JIS keyboard on Mac. #209

Open s-shin opened 7 years ago

s-shin commented 7 years ago

Prerequisites

Description

I created https://github.com/atom/atom-keymap/issues/165 previously, but Cmd+\ has not been able to toggle tree-view yet.

Steps to Reproduce

  1. Open atom with atom --safe ..
  2. Input Cmd-\.
    • ¥ is swapped to \ by Google Japanese Input (see the image).

fig1

FYI: ¥キーで入力する文字 means Which character to be input by '¥' key.

Expected behavior: Toggle tree-view.

Actual behavior: No effect. Key Binding Resolver shows Cmd-¥.

image

Reproduces how often: Always.

Versions

$ atom --version
Atom    : 1.13.0
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0

$ apm --version
apm  1.14.1
npm  3.10.5
node 4.4.5
python 2.7
git 2.10.1

Additional Information

Work Around

To wok around this issue, we can add the following in keymap.cson.

'.platform-darwin':
  'cmd-¥': 'tree-view:toggle'

image

IME layer is ignored?

¥ key seems to be always resolved ¥ character regardless of the setting of IME above.

nathansobo commented 7 years ago

cc @ungb

ungb commented 7 years ago

Hi @s-shin,

I am unable to repro on mac 10.12.2.

atom -version Atom : 1.13.1 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0

apm --version apm 1.14.1 npm 3.10.5 node 4.4.5 python 2.7.10 git 2.10.1

screenshot: image

Looking at the release notes, nothing changed from 1.13.0 -> 1.13.1 in this area.

I've also tried changing my system default language to japanese, but it was working for me.

s-shin commented 7 years ago

@ungb Thank you for trying to repro!

I'm wondering if your keyboard layout is US. If so, this issue might not be reproduced.

I can also give you one more screenshot below.

input_yen

When I pressed ¥ key, the keydown event by document.addEventListener('keydown', e => console.log(e), true); says key: "¥" in console, but \ is inputted in the editor area.

ungb commented 7 years ago

@s-shin What kind of keyboard/ keyboard layout are you using?

s-shin commented 7 years ago

@ungb I'm using japanese keyboard.

You can see the layout in http://www.apple.com/shop/product/MLA22LL/A/magic-keyboard-us-english by selecting "Japanese" in "Language" options.