Shifting the second row from h to \ by one character?

Hello I have the following config (just the important parts):

local M = {}

local utils = require "base.utils"

local maps = require("base.utils").get_mappings_template()

-- section 1

maps.n["j"] = {"h"}

maps.n["k"] = {"j"}

maps.n["l"] = {"k"}

maps.n[";"] = {"l"}

maps.n["'"] = {";"}

maps.n["\\"] = {"'"}

maps.n["h"] = {"\\"}

-- section 2

maps.n["J"] = {"H"}

maps.n["K"] = {"J"}

maps.n["L"] = {"K"}

maps.n[":"] = {"L"}

maps.n["\""] = {":"}

maps.n["|"] = {"\""}

maps.n["H"] = {"|"}


return M

It works for the most part but the last two rows of both of the sections don’t register and when I press either H or h or \ or | characters I get mark errors such as “mark not set” and “unknown mark”. I’m assuming some plugins causes this because for example with this script H and h supposed to do splits. How can I register these keys correctly?

As an extra issue this only works for normal mode, I can totally copy and paste the lines and make them nvo but is there a better way to do this? I tried maps.Space and maps.nvo instead of maps.n but those just gives errors.

Solved on Reddit, account was on hold in here because it was new. Can be closed.