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.
If I generate a custom keybinding profile on the Mac, all keybindings are hard-coded to Meta. I now have keybinding profile export-as-nbm in contrib/ EditorThemeSuite/export, but of course exporting such a non-portable profile is fairly useless. It should be perfectly safe to generate portable keybinding definitions for these files (D for Meta on Mac/Ctrl on PC, O for Ctrl on Mac, Alt on PC).
The keybindings storage uses Utilities.keyToString(KeyStroke).
Probably we need a keyToString() variant that produces portable keybindings by default; I suspect we will still need the non-portable ones in some places.
Feel free[1] to add keyToString(KeyStroke ks, boolean portable) if you need it. Or fix this problem in editor/options some different way. [1] With a one line test.
I've added the method to Utilities API (with a five-line test ;) and modified editor.settings.storage and keymap.options export functionality to use it. Marking as FIXED. --- http://hg.netbeans.org/main/rev/f37cf26e5b49
Integrated into 'main-golden', will be available in build *200901091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/f37cf26e5b49 User: Max Sauer <msauer@netbeans.org> Log: #110492: Custom keybinding profiles use non-portable accelerator definitions
So, new keybinding profiles will be portable, but if you imported settings from an old version of NetBeans, the keybindings will be non-portable, is that correct?
Currently: -------- - profiles are stored in portable form if possible (if you are on mac, keybindings containing alt have to be hardcoded) - keybindings exported through options/keybindings/manage profiles are stored in the same way - in case you will use keybindings from an older NB version and copy/import them inside userdir, hardcoded values will be used.
One more thing: If you export the old (imported from earlier version) profile through 'Manage profiles', the values will become portable.
> profiles are stored in portable form if possible (if you are on mac, keybindings containing alt have to be hardcoded) Not a big deal. > keybindings exported through options/keybindings/manage profiles are stored in the same way Fine > in case you will use keybindings from an older NB version and copy/import them inside userdir, hardcoded values will be used Unfortunate but I can live with it (I have a module that could export a keybinding profile as an NBM with the keybinding profile defined in its layer - it can look for hardcoded things and give a warning or something).