Make cursor move to certain cell when "enter" key pressed?


I have a calc spreadsheet that contains cells created with the intention that they be filled out in a certain order.
However, due to other factors, these cells cannot be laid out in sequence/ one after another, they must remain “jumbled up”.

So I wonder, is there any way to set the selected cell to “jump” to another cell once the “enter” key is pressed?
For example, normally when the enter key is pressed in a spreadsheet, the cursor/highlighted cell moves down to the cell directly below it, e.g when the cell A1 is highlighted then the enter key is pressed, the selected cell becomes A2.

Instead, could I, for example, set A1 to become A5 when the enter key is pressed, or B2 to become F2 etc…?

You will have to resort to user code. One way to do it then is, to create cell styles for the cells from which to jump elsewhere by a relative address, and to assign a ‘Sub’ evaluating the styles to the ‘Sheet Event…’ ‘Content changed’ for sheets you want to perform the trick.
See this attached demo.

Of course, you may also code the explicit target address soemhow in the style name. I think the way I suggested is more flexible.

Nice trick, @Lupp. Perhaps you should add at the end the line ThisComponent.CurrentController.Select(ThisComponent.createInstance("")) to deselect active cell.

@JohnSUN: Thanks for trusting in my understanding so much. However, I am actually too dull and need additional explanation.
What is a NULL-initialised selection supposed to achieve?

After .Select(nextCell) we jump to this nextCell and fill it (like as Click - Shift+Click). NULL-initialised selection will deselect it

Thanks. I didn’t take this seriously and didn’t look thoroughly enough. As the only selected cell in this case, nextCell will nonetheless remain (the only) part of the .CurrentSelection. An empty .CurrentSelection seems to not be allowed.