Ingress keys - if I put a key in a capsule can I get another
Yes, you can. In fact, it does not even matter, if you put your keys in a normal capsule or a quantum capsule.
Another method if hacking keys is entering the "more" glyph during the command phase of you glyph hack as specified here.