Code Templates in OS X

<oXygen/> general issues.
Posts: 1
Joined: Wed Oct 17, 2018 5:46 pm

Code Templates in OS X

Post by langeslag » Wed Oct 17, 2018 6:46 pm

For a project with users running oXygen XML Editor 20.1 on various platforms (Linux/Windows/OS X), I have specified code templates and bound them to key combinations using Alt (Mac Option) as a modifier, and sometimes shift as a second modifier. Having checked the box for "platform-independent shortcut keys" and stored the preferences as project preferences rather than global preferences, these macros have reached the user base via the xpr project file stored on our central repository. The macros variously serve either simply as keybindings for special characters or for longer code snippets we use repeatedly.

When I first defined these code templates, our users were running oXygen XML Editor 17, and they worked on all platforms. As of OS X High Sierra at the latest, this no longer works on OS X, which produces first our desired output, but immediately following this it produces a system-defined special character for that particular key combination if such a keybinding is defined in OS X for the keyboard layout in question. If the corresponding system-wide character to be output is defined as an empty string (in ~/Library/Keyboard Layouts/default.keyLayout) or if the line in question is omitted from the .keyLayout file, oXygen outputs neither the oXygen-defined code template nor the system-wide special character. Unfortunately, we had no active OS X users in the past two years or so, so it is difficult to determine the exact point at which it stopped working, but we have reproduced the issue across 3 Macs, including on OS X Mojave, and also with oXygen XML Editor 18, so odds are this is due to an OS X update rather than a change to the oXygen codebase.

I realize this may not strictly be an oXygen issue, and I wonder whether it extends to other Eclipse/JRE apps as well. I'd be grateful for any pointers to workarounds or solutions.

Posts: 163
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Code Templates in OS X

Post by martindholmes » Fri Oct 02, 2020 3:23 am

Did you ever find a solution to this? It's a real problem for our project.

Post Reply