Bug 227247 - Eclipse keymap : comments as example
Eclipse keymap : comments as example
Status: NEW
Product: editor
Classification: Unclassified
Component: Key bindings
PC Linux
: P3 with 1 vote (vote)
Assigned To: Svata Dedic
: 217279 231915 (view as bug list)
Depends on:
Blocks: 211167
  Show dependency treegraph
Reported: 2013-03-09 23:19 UTC by wadael
Modified: 2013-06-27 16:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description wadael 2013-03-09 23:19:20 UTC
Using eclipse keymap on linux, with locale FR-fr (azerty keyboard)

One of my most used shortcuts is for comments.
It is ctrl + / 
It does not work as intended because it is recognized as ctrl+shift+: (as per test field in the keymap pane).

On an azerty kbrd, the / is 'above' :  thus shift+:

Workaround is to add the recognized shortcut

I believe this is one of more.
Comment 1 wadael 2013-03-09 23:32:29 UTC
Ctrl+SLASH is perfectly  known in the keymap.
The 'bug' is that shift+COLON is not recognized as SLASH

And because I smell that the keymap was bulk imported somehow, I think there must be more 'bugs' like this one (that what I meant with "I believe this is one of more.")
Comment 2 Svata Dedic 2013-03-15 09:53:40 UTC
Yes, this is a general issue. 

We record shortcuts using the base keys, so instead of CTRL + ")", we record CTRL + SHIFT + "0". Naturally if a 'slash' key is not present on French keyboard (it' shift + ":"), the keystroke will not be recognized.

BTW I identified the same issue with e.g. IntelliJ Idea and Eclipse.

The trouble is that the JDK keystroke encoding scheme is not portable across keyboard layouts: pressing the same *character* + modifiers will result in different KeyStrokes on different keyboards. Also all the netbeans configuration is defined in JDK scheme, so:

I would recommend to close the defect as WONTFIX. It's however somewhat rude to non-english speaking countries :-/ 
You can find a 'slash' key just one position left from the right shift key, the trouble is that you have to learn and use physical locations (on English keyboard) of keys, although the characters you see are located elsewhere on national kbd.

It might be possible to NOT display shift for printable characters, so Ctrl+shift+slash would become Ctrl-?. That could effectively lead to another physical key combination on a natural keyboard than it used to be. KeyStrokes would have to be translated for display, naturally. 
However I fear the solution would be fragile cross-platform, especially considering Macs with Alt-char combinations.

Petre - do you consider the issue is so important from usability point of view that the workaround outlined above is not sufficient for users ?
Comment 3 Svata Dedic 2013-03-15 09:56:17 UTC
*** Bug 217279 has been marked as a duplicate of this bug. ***
Comment 4 Svata Dedic 2013-03-20 13:12:56 UTC
Please note there are issues on MacOS X (even with US keyboard) in JDK-7. Keyboard events seem to be changed in a way that it's not possible to decode the modifier + base key combination. See also defect #223818
Comment 5 Svata Dedic 2013-06-27 12:20:41 UTC
*** Bug 231915 has been marked as a duplicate of this bug. ***
Comment 6 skygo 2013-06-27 16:47:29 UTC
Thanks Svata for the triaging. 

 I was not aware of the keybinding export as HTML action, my entry point was shortcuts.pdf file.

 If possible, I would like to improve a bit the html export. (If no RFE in progress I will try that)


 As I have another setup (may not match eclipse keymap)
// The follwing is for Default Netbeans Keymap  
 this particular toggle comment action has a nice alternate:   CTRL-SHIFT-C 

   What happens in menu bar(see issue in previous comment #5) draw me to the idea that keybindings may not be ordered.
   If they where, it would be easier to apply the following rule:
     1rst: try to use alphanumerical based keybindings as the default
     2nd:  list the other keybindings.
    which in fact applies only once for toggle comment action

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo