Calc Macro: Swap Enter with Ctrl+Enter

Because I am working with a Calc sheet in which I am regularly entering multiple lines of text in one cell, I wish to change the ‘new line’ keystroke from the default Ctrl+Enter to simply Enter.
Ratslinger has already created the keyhandler macro that I need for this, but I’m not getting it to work in LO 7.2.5.2 (running on Linux Mint 19.2.). I’ve also tried it in LO 6.4.7.2 on Linux Mint 20.2 with the same results.
I’m testing it in the attached file, downloaded from aforementioned post. When I attempt to run it, I get a BASIC runtime error, with Line 31 highlighted.

Unfortunately, I am not well-versed in macros, and unfamiliar with the keyhandler concept.

Thanks much in advance.

KeyHandler.ods (12.5 KB)

Hello,

That line is for MRI. It was not supposed to be there. Just delete the line and the line after it - 'Mri oEvent. Will change sample in linked post.
.
.
Edit:
Sample in link is repaired. Code posted in link is without the MRI lines.

Unbelievably quick! Thanks very much. That did indeed get me past the error. Unfortunately, it’s apparently creating a conflict with VibreOffice, another macro that I’m using that emulates Vi(m) bindings in Calc. The expected behavior is navigation with ‘hjkl’ to match arrow keys. This works in a file without the KeyHandler macro, but in the sample file, it changes the active cell as before, but it over-writes the cell contents, even when the XKeyHandler is stopped.

I tried adding the VibreOffice macro to the sample file, but I’m getting errors, so obviously I don’t know what I’m doing, and I’m out of time to investigate further today.

I’m pushing my luck, I know, but nothing ventured, nothing gained.

Thanks again.

Sorry, not going to get into investigating that software also. My initial opinion is that the two need to be combined into one for it to work as you want.
.
Unfortunately, not interested in that. Wasn’t even enthused about my post but did it as a proof of concept type thing.

I understand, and I’m grateful for the help you gave. Do you have any direction for me about where look for more help? I’m willing to pay a moderate(?) bounty to have the two features working, and especially in an extension that could be easily accessible to others.

Not really. There may be others here who may have other thoughts on this. Give it a day or two.

Will do. Thanks again.