Bug 129419 - Macro Editor Basic IDE causes "s" characters to be inserted randomly into code when using Ctrl-S custom save key combination
Summary: Macro Editor Basic IDE causes "s" characters to be inserted randomly into cod...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: BASIC-IDE
  Show dependency treegraph
 
Reported: 2019-12-15 20:50 UTC by tfabris
Modified: 2020-01-16 17:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tfabris 2019-12-15 20:50:59 UTC
On Mac OS X, in the Macro Editor IDE when editing BASIC macro code, there is randomly the letter "s" is inserted into the code, causing the code to fail and break in odd ways. This problem does not exist in the main LibreOffice program where you edit real documents, it only exists in the Macro Editor IDE.


Root cause: The Macro Editor "SAVE" menu is grayed out if a save is not needed.

Only the macro editor grays out the save menu, the main document editors do not gray it out.

In my operating system, I have configured the OS X operating system to use a special shortcut key of CTRL-S for Save. This means that if the user reflexively presses CTRL-S  to save while in the LibreOffice macro editor, then if a save wasn't needed, the menu is grayed out and the user inserts and S instead of saving. 

On the next press of CTRL-S after having inserted the "s" into the code, then, the next CTRL-S works because the code has now had a change made to it, and it saves the syntax error of the extra added S into the code.

This is extremely annoying and I keep ruining my code, and it makes the macro editor very frustrating.

Note: I have not yet tried it with using Command-S (the OS X default) instead of Ctrl-S. I don't know if the same thing happens with Command-S.

To aolve the problem, allow the Save menu to stay ungrayed all the time, like the main document editor in the main product does.
Comment 1 Roman Kuznetsov 2019-12-17 12:56:12 UTC
PLease write here info from LibreOffice->About dialog
Comment 2 tfabris 2019-12-17 16:15:48 UTC
As RequestedL


Version: 6.3.4.2
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Alex Thurgood 2019-12-19 08:44:39 UTC
Sorry, why are you using Ctrl-S instead of the default Cmd-S ?
Comment 4 Alex Thurgood 2019-12-19 08:47:37 UTC
I don't find this behaviour surprising. You have attempted to subvert an OS keyboard shortcut that is recognized by LO and use a custom keyboard shortcut instead.

I would be inclined to mark this as NOTABUG.

Please test with the default and report back.
Comment 5 tfabris 2019-12-19 19:19:58 UTC
I use Ctrl-S because I am a software developer who needs to switch between Mac and Windows constantly during the day. Remapping common key shortcuts is the only way I can remain sane as I switch between the operating systems.

I'm trying to use LibreOffice on both platforms, so that I am not chained to Microsoft Office. This issue is one of the sticking points that makes it difficult to make the transition.

The ability to remap the keys is not a subversion of the operating system, it is a supported feature built into the Mac OS, designed specifically for situations like this. No other application on the Mac has this problem with Ctrl-S. I can remap Ctrl-S in every other application on the Mac OS, this is the only program that gave me this particular trouble.

Command-S doesn't have this issue, true. But even without any key remapping, CTRL-S shouldn't cause the letter S to be typed into the macro editor window no matter what.
Comment 6 Alex Thurgood 2019-12-26 11:57:46 UTC
I can certainly sympathise with your plight. Many personalised shortcuts are still broken with LO on macOS, unfortunately, and I'm pretty sure this one has come up before in bugzilla (typically I can't find the report now).
Comment 7 tfabris 2019-12-26 18:17:36 UTC
Thanks Alex!

To be clear, the root of the issue isn't so much about the key remapping. 

It's about how CTRL-S shouldn't be interpreted as trying to type the letter "S". The main "Writer" program doesn't interpret it this way, so the Macro Editor shouldn't either.
Comment 8 Roman Kuznetsov 2020-01-16 17:03:24 UTC
(In reply to tfabris from comment #7)
> Thanks Alex!
> 
> To be clear, the root of the issue isn't so much about the key remapping. 
> 
> It's about how CTRL-S shouldn't be interpreted as trying to type the letter
> "S". The main "Writer" program doesn't interpret it this way, so the Macro
> Editor shouldn't either.

I tried use Ctrl+S in Writer. It insert "S" letter into document. I think Alex is right.

And my opinion that it's notabug. 

Just use special key ⌘ in macOS instead Ctrl key for all shortcuts and you'll be happy.