This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Quoting http://www.nabble.com/Proposal%3A-address-carpel-tunnel-syndrome-in-Netbeans-td21265265.html#a21295194 A few years ago when Netbeans remapped all the keyboard shortcuts I pointed out that some of the most used shortcuts forced the user to do some serious hand-twisting that eventually led to painful carpel-tunnel symptoms. I initially got some responses from the Netbeans developers hinting that these shortcuts would get remapped, but in the end they were not. The two most obvious offenders in my view are Fix Imports (CTRL+SHIFT+I) and Format Code (SHIFT+ALT+F). I usually hit these combinations using one hand, twisting my thumb and entire hand in the process. Repeat this for a couple of months and you will end up with very serious hand pain. Granted I could fix this by using the mouse or two hands but productivity drops like a rock so it's hard for me to get used to doing things that way. One obvious suggestion is to swap CTRL+I (which I believe maps to "Search Help") and CTRL+SHIFT+I. I suspect the former is used *far* less often than the latter. Furthermore, I would suggest that no frequent shortcut should ever require the use of three keys on one side of the keyboard. The Netbeans staff has plenty of analytics information to work with. Simply locate any frequently-used keyboard shortcut that requires the use of three keys in one side of the keyboard.
Passing to proper component - please evaluate. Thanks.
- I scanned the default key mappings very quickly. Maybe I'm wrong, but I got the impression that the vast majority of the two-key combination pool was unused. Perhaps the authors wanted to use "F" twice in two different shortcuts so rather than use CTRL+F and CTRL+G they decided to use CTRL+F and CTRL+SHIFT+F. I personally favor the two-key shortcut because once I memorize the shortcut I will happily prefer two keys to three. Frankly, having the letter "F" in the "code format" shortcut doesn't really help me much. CTRL+H doesn't remind me of the word "replace" at all yet I picked it up quickly enough. - The key mappings could probably be simplified greatly if they were context-sensitive. For example, CTRL+SHIFT+F is bound to "find in projects". I don't see why you really need this action accessible globally. The way I see it, CTRL+F should trigger "find in projects" if the projects tab has focus. Users could then invoke CTRL+1 to shift focus to projects, then CTRL+F to "find". Breaking down shortcuts in this way would lead to more consistent, shorter shortcuts (only one way to invoke "find"). I don't know if this happens often enough to make a difference, but it's worth a thought.
I'm CCing our shortcuts guru Ondra.
Yes, I agree there are things to improve - swapping fix imports & quicksearch shortcuts (Ctrl+Shift+I & Ctrl+I) is a obvious one and simple to do. The problem is that each change (no matter whether for better or worse) affects existing users and raises many voices .. and consequently requires a lot of time and effort to discuss and argument. But I feel a need to address the note about a keymap created purely on ergonomics criteria. It's basically the ancient fight between ease of learn VS ease of use. The mnemonic clues used (ctrl+_F_ for _F_ind in projects) facilitate learning (in case of uncertainty, there are typically only 3 combinations with modifier keys to try) for new users and lower the (already high enough) cognitive load when learning to work with the new tool for newbies. Yes, it is easy to learn one shortcut even if it is non-mnemonic, but remember that for daily use by keyboard-based users, the IDE requires certainly over 10, for some people closer to several dozens! And once newbies become experienced and start reaching the point where efficiency comes first, it's *never* possible to satisfy them all since everyone has different experience, habits, IDE previously used and even the way they use it. These experienced users are much more likely than newbies to customize shortcuts anyway and there are tools for it for them (and export, so that this until 7.0 rather painful process doesn't have to be undergone repeatedly). As for the two-key shortcuts, I hate to admit, but vast majority of them is taken .. and honestly, I do not see much room for changes in these as they in most of them really are frequently used actions, often in the editor and wired to users' muscle memory. Don't see this as denial for changes, I certainly agree with fixing the two mentioned problems (Fix Imports & Format Code), but from HIEs perspective and after what we've gone through with the last profile redesign :-), I don't think that a whole new profile based purely on ergonomy & statistics would be a good default profile. If someone from the community is willing to create it, I can provide all data we have. The new ergonomics profile could be added as an alternative profile to choose from.
As for fixing the two: I believe the core problem is that the actions need to be invoked way too often, of course the finger-twisting shortcuts are an amplifier of this core problem. There is an old enhancement requesting re-format on save, which is a way to solve the problem without requiring existing users to re-learn shortcuts written in their muscle memory: Issue 14202 . For certain number of users, it would even lessen the number of shortcuts required to be remembered (save could be used instead to re-format and no Code Format action would be necessary to even know about).
Olangr, Great minds think alike. I was just about to suggest an automatic code-format feature :) I think part of the solution is exactly what you suggested: reduce the need for the keyboard shortcut in the first place. I'm fine with adding a new non-default profile. The name ergonomic profile also sounds nice to me ;)
Note - the other IDEs uses 3-key combination too for format and even for 'fix imports'. Personally I don't think anyone should be (re)formatting code every while or so, or even manage imports. During regular coding, using hints (Alt-Enter, Enter) to import a new type as you type is sufficiently productive.
sdedic, I disagree. Hints are much slower and more difficult to apply than the aforementioned keyboard shortcuts. Our target audience (power users who favor keyboard shortcuts, avoids the mouse) is unlikely to use them. Furthermore, there is no solution for code-formatting. I also disagree with you in that I find code-formatting must be applied quite frequently during the coarse of coding. Either the IDE needs to do a better job of formatting things right as we type (currently it does not) or you need to improve the ergonomics of the keyboard shortcuts. Either pick keyboard combinations that do not require one to twist the wrist, or ensure that the keys are so far apart that the user has no choice but to use two hands. Obviously, I prefer the former, but I'd rather force users to use two hands than cause them life-long damage. Please reopen this issue.