Cyclic keyboard for uneven layout

Hi,
We have a custom keyboard for the Sign-in/Sign-up pages. As a requirement, we need to have a cyclic keyboard in all the direction (when the last key is focused in row/column, on next navigation need to focus on the first key in same row/column). It might be up, down, right and left.

Example of uneven keyboard layout:
‘#±’: [
[‘&’, ‘#’, ‘(’, ‘)’, ‘@’, ‘!’, ‘Space’],
[‘:’, ‘.’, ‘-’, ‘_’, ‘"’, “'”, ‘Remove’],
[‘$’, ‘%’, ‘^’, ‘+’, ‘=’, ‘{’, ‘Layout:abc’],
[‘}’, ‘[’, ‘]’, ‘;’, ‘<’, ‘>’, ‘Layout:ABC’],
[‘?’, ‘/’],
[‘Continue’]
]
In above same layout, we can see the uneven column values. In this up and down cyclic navigation, we are facing a issue.
Please provide the input for this cyclic navigation.