Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 432820

Summary: [KeyBindings] DBCS4.4: Split Editor (Horizontal) key binding does not correct in JP keymap
Product: [Eclipse Project] Platform Reporter: Akihiko Takajo <takajo>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: camle, daniel_megert, emoffatt, john.arthorne, pwebster
Version: 4.4Flags: emoffatt: review+
Target Milestone: 4.4.1   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=438562
Whiteboard:
Attachments:
Description Flags
JP keymap none

Description Akihiko Takajo CLA 2014-04-15 09:08:59 EDT
Created attachment 242005 [details]
JP keymap

To toggle Split Editor (Horizontal) with Japanese keymap, need to enter "Ctrl+=" not "Ctrl+_". Please see an attached screenshot for JP keymap.

1. set japanese keymap on Windows7
2. Open a editor and type "Ctrl+_" ("_" is Shift and \ key in JP keymap)
=> Editor is not split
3. type "Ctrl+=" ("=" is Shift and - key in JP keymap)
=> Editor is split Horizontal

Environment:
OS: Windows 7 Japanese
Build: IES4.4 I20140411-1600
JRE 1.7.0 IBM J9 2.6 Windows 7 amd64-64 Compressed References 20140106_181350
Comment 1 Paul Webster CLA 2014-04-15 09:34:28 EDT
What would be good keys to use when in a JP locale?

PW
Comment 2 Akihiko Takajo CLA 2014-04-15 10:02:11 EDT
It seems that in JP keymap "Ctrl+Shift+¥" equals "Ctrl+_".

"Ctrl+Shift+¥" is used for "Remove Block Comment".
After removing the biding of that, Split Editor (Horizontal) works by "Ctrl+_" with JP keymap.
Comment 3 Paul Webster CLA 2014-04-29 11:11:50 EDT
The suggestion was to set it to CTRL+SHIFT+- for jp locale.  Is that acceptable?

PW
Comment 4 Akihiko Takajo CLA 2014-04-30 00:03:23 EDT
yes, I confirmed that "Ctrl+Shift+-" does not conflict with the default bindings and works in Luna on Japanese Windows.
Comment 5 Paul Webster CLA 2014-05-02 16:50:01 EDT
Fix in https://git.eclipse.org/r/25893

To test before the fix comes, create a simple plugin and add this to the org.eclipse.ui.bindings extension point in its plugin.xml


      <key
            locale="jp"
            contextId="org.eclipse.ui.contexts.window"
            sequence="M1+_"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </key>
      <key
      		locale="jp"
            commandId="org.eclipse.ui.window.splitEditor"
            contextId="org.eclipse.ui.contexts.window"
            sequence="M1+M2+-"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
         <parameter
               id="Splitter.isHorizontal"
               value="true">
         </parameter>
      </key>
Comment 6 Akihiko Takajo CLA 2014-05-04 23:17:40 EDT
verified with the simple plugin. Thanks.
Comment 8 Akihiko Takajo CLA 2014-05-16 04:03:21 EDT
verified with I20140515-1230
Comment 9 Toshihiro Izumi CLA 2014-07-06 23:02:12 EDT
This bugfix is not working because locale="jp" is wrong. It must be locale="ja".

BTW, Ctrl+Shift+- is working on Windows indeed, but it is because of
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.generatePossibleKeyStrokes(Event)
This method creates [CTRL+SHIFT+-, CTRL+_, CTRL+SHIFT+_] when Ctrl+Shift+- is pressed(on Windows(8.1) + 109 keyboard).
And CTRL+_ is matched in
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(List<KeyStroke>, Event)
Not Ctrl+Shift+-.
Ctrl+Shift+- is not assigned to Toggle Split Editor command, so Window>Editor>Toggle Split Editor (Horizontal) menu shows 'Ctrl+_', Preferences>General>Keys>Toggle Split Editor (Horizontal) as well.

Eclipse SDK
Version: Luna (4.4)
Build id: I20140606-1215
Comment 10 Paul Webster CLA 2014-07-07 05:39:08 EDT
Change to locale="ja".

PW
Comment 12 Wojciech Sudol CLA 2014-08-28 11:12:28 EDT
Verified in 4.4.1 RC2 (M20140827-1200).
Comment 13 Akihiko Takajo CLA 2014-08-28 23:06:28 EDT
Verified on Japanese Windows. 
Thanks,
Comment 14 Wojciech Sudol CLA 2014-09-16 06:32:02 EDT
Verified in 4.5 M2 candidate (I20140915-2000).