Keystroke shortcuts in OSX

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
martindholmes
Posts: 164
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Keystroke shortcuts in OSX

Post by martindholmes » Wed Oct 07, 2020 9:38 pm

Hi all,

This previous topic was raised a couple of years ago, but no-one responded to it:

topic17685.html

I'm raising a fresh ticket because this is a consistent problem for us and I can't find a solution. We use a lot of code templates with keystroke shortcuts, and for a range of them, on OSX, the code template works, but then a system-defined keystroke shortcut also triggers, causing another character to be output in addition to the code template content. In other words, when Oxygen processes a keystroke shortcut, it doesn't prevent propagation of the event on to the OS level, so the OS shortcut also triggers.

Would it be possible to fix this, or at least provide a configuration option for code templates that enables suppression of event propagation to prevent it happening?

All help appreciated,
Martin

adrian
Posts: 2740
Joined: Tue May 17, 2005 4:01 pm

Re: Keystroke shortcuts in OSX

Post by adrian » Fri Oct 09, 2020 4:56 pm

Hi,

I'm not sure if it's possible for the application to intercept system defined keystrokes on OS X/macOS and prevent them from reaching the OS.
Could you please provide an example of such a keystroke, so we can test this?
Please also provide version information for Oxygen and macOS, so we can test with a similar setup.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

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

Re: Keystroke shortcuts in OSX

Post by martindholmes » Tue Oct 13, 2020 8:49 pm

These are two example:

Alt + Shift + 8 (M3 + M2 + 8) is configured to output this symbol: ȣ (U+0223), but it also outputs a degree sign: °.
Alt + Shift + 1 (M3 + M2 + 1) is configured to output this symbol: ɩ (U+0269), but it also outputs a slash: ⁄.

Thanks for looking into this!

Cheers,
Martin

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

Re: Keystroke shortcuts in OSX

Post by martindholmes » Wed Oct 21, 2020 8:58 pm

Does anyone have any ideas on this issue?

adrian
Posts: 2740
Joined: Tue May 17, 2005 4:01 pm

Re: Keystroke shortcuts in OSX

Post by adrian » Thu Oct 22, 2020 6:41 pm

Hi,

I can confirm the issue with specific input sources. We were able to reproduce the issue you are describing with the input source (keyboard) set to "Canadian French".
The problem when you bind a keystroke that already has a mapping in the input source, is that we also get a keyTyped event for the character mapped in the input source.
I've logged an issue to investigate if we can somehow identify that the key typed event should be ignored. The problem is that it's not feasible to verify if each typed character corresponds to a user defined keystroke, as it can affect performance significantly in some cases.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

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

Re: Keystroke shortcuts in OSX

Post by martindholmes » Thu Oct 29, 2020 5:44 pm

Thanks Adrian -- I hadn't figured out that it was the French Canadian keyboard which was the difficult factor. If you find a solution, we'll be very grateful, but in the meantime I can look closely at that keyboard and know what I need to avoid.

Post Reply