It's not 'or', it's both. There is a semicolon between the two clauses indicating they are independent clauses, not either being dependent on each other.
There's no semicolon in any historical copy of the Second Amendment that I've ever seen. Some have one comma, some appear to have 3. Remember they were hand copied, and sometimes the scribes got a little creative with punctuation, which was not so formally defined in those days in any event.
But they are still independent clauses, with the second one being the operative one, "the right of the people to keep and bear arms shall not be infringed". (some versions have a comma between "arms" and "shall", which makes no sense grammatically, but commas need not, they can just be a place to take a breath.