... could not resist to answer some misconceptions ...
1. "zero gravity" - FALSE
Objects in space do affected by gravity. There are plenty of massive objects still around - planets, stars ... even if we are FAR away from everything, we still going to orbit at least the galaxy.
Now, there is no -weight-, but still -mass-. Those two quantities are DIFFERENT physics things, describing completely different things.
Mass is a measure of matter, it is a coefficient in a Newton's famous equation: F=ma. This quantity does not depent on where you are. The units of "m" is kilograms [kg].
Now -weight- is a FORCE which object produces on a support, measured in newtons [N]. This quantity does depend on how you move. When you are standing still, your weight = your mass X gravity constant of the place you are standing. NOTE: scales are measuring WEIGHT but shows it to you in kilos or pounds. Spring scales shows your mass correctly only when they are standing still. Now imagine you and the scales are jumping from a building ... you and scales are accelerating with the same g and flying the same way. You not going to exert any force on the scale, and they will show zero.
Now back to space ... spacecraft, astronaughts and ALL objects inside are orbiting the planet, affected by the same gravity acceleration and in never-ending free-fall, thus the -weight- of all objects are zero, but they still have mass.
2. "Does the muzzle flip?"
It depends on the design. On a typical handgun - yes, it will spin it.
The reason is that the line of linear momentum (not force as people before write) are not lined up with -center of mass- (not gravity)
The off-center linear momentum means we have angular momentum which will result in angular acceleration. Note that a shot has finite time of interaction with a gun, and thus resulting with finite final angular speed of the gun (it will be rotating). Every additional shot will increase gun's angular speed.
3. "Does the gun travel straight back?"
The gun will travel straight back while rotating. If you manage to fire second shot at the moment gun will point back compared to first shot (and assuming all ammo is perfectly identical) ... and NO YOU GUESSED WRONG ... the gun will not stop, because at the point of 2nd shot (compared to 1st) the gun is lighter by the mass of one cartridge - so it will recoil with slightly faster speed.
(of course, here I am not considering the momentum of the cartridge expelled to the side - we are talking only about gun and a bullet as they are the main contributors)
3. "do both the gun and the bullet travel equal distances?"
The gun and the bullet acquire equal MOMENTUM (magnitude same, opposite directions), but since they have different masses, they will have different speeds. Considering same amount of time they will travel different distances.
Is it infinite? - It depends. The gun and the bullet are on elliptical orbits, you would need to see if those orbits are intersecting the surface of the planet. If yes - they will perform a fiery reentry, if not - they will orbit the Earth like other cosmic junk.
4. Gravity or not - your slide/bullet still under 3rd Newton's law - it will operate same way anywhere. Now on the practical side, if your gun jams if you holding it light or "not holding it at all" on the planet - it will jam same way in space. But you your gun can fire and not jam while being "free" on the Earth, it will do same in space.
5. "no resistance" - FALSE, space have plenty of resistence. There is still molecules and ions, solar radiation etc. In fact "space vacuum" is considered pretty dirty and filled with stuff compared to laboratory and even microelectronic production vacuum chambers.
So ...
Gun will fire as usual and fly back while rotating.
Initially gun is on one elliptical orbit. The act of firing will send a bullet on an elliptical orbit and gun will change its orbit to a different one. Momentums are same and in opposite directions, M_gun > m_bullet --> gun travel back slower than a bullet. Bu conservation of momentum, the center of mass of gun+bullet is travelling on the original orbit (like if never fired).
1. "zero gravity" - FALSE
Objects in space do affected by gravity. There are plenty of massive objects still around - planets, stars ... even if we are FAR away from everything, we still going to orbit at least the galaxy.
Now, there is no -weight-, but still -mass-. Those two quantities are DIFFERENT physics things, describing completely different things.
Mass is a measure of matter, it is a coefficient in a Newton's famous equation: F=ma. This quantity does not depent on where you are. The units of "m" is kilograms [kg].
Now -weight- is a FORCE which object produces on a support, measured in newtons [N]. This quantity does depend on how you move. When you are standing still, your weight = your mass X gravity constant of the place you are standing. NOTE: scales are measuring WEIGHT but shows it to you in kilos or pounds. Spring scales shows your mass correctly only when they are standing still. Now imagine you and the scales are jumping from a building ... you and scales are accelerating with the same g and flying the same way. You not going to exert any force on the scale, and they will show zero.
Now back to space ... spacecraft, astronaughts and ALL objects inside are orbiting the planet, affected by the same gravity acceleration and in never-ending free-fall, thus the -weight- of all objects are zero, but they still have mass.
2. "Does the muzzle flip?"
It depends on the design. On a typical handgun - yes, it will spin it.
The reason is that the line of linear momentum (not force as people before write) are not lined up with -center of mass- (not gravity)
The off-center linear momentum means we have angular momentum which will result in angular acceleration. Note that a shot has finite time of interaction with a gun, and thus resulting with finite final angular speed of the gun (it will be rotating). Every additional shot will increase gun's angular speed.
3. "Does the gun travel straight back?"
The gun will travel straight back while rotating. If you manage to fire second shot at the moment gun will point back compared to first shot (and assuming all ammo is perfectly identical) ... and NO YOU GUESSED WRONG ... the gun will not stop, because at the point of 2nd shot (compared to 1st) the gun is lighter by the mass of one cartridge - so it will recoil with slightly faster speed.
(of course, here I am not considering the momentum of the cartridge expelled to the side - we are talking only about gun and a bullet as they are the main contributors)
3. "do both the gun and the bullet travel equal distances?"
The gun and the bullet acquire equal MOMENTUM (magnitude same, opposite directions), but since they have different masses, they will have different speeds. Considering same amount of time they will travel different distances.
Is it infinite? - It depends. The gun and the bullet are on elliptical orbits, you would need to see if those orbits are intersecting the surface of the planet. If yes - they will perform a fiery reentry, if not - they will orbit the Earth like other cosmic junk.
4. Gravity or not - your slide/bullet still under 3rd Newton's law - it will operate same way anywhere. Now on the practical side, if your gun jams if you holding it light or "not holding it at all" on the planet - it will jam same way in space. But you your gun can fire and not jam while being "free" on the Earth, it will do same in space.
5. "no resistance" - FALSE, space have plenty of resistence. There is still molecules and ions, solar radiation etc. In fact "space vacuum" is considered pretty dirty and filled with stuff compared to laboratory and even microelectronic production vacuum chambers.
So ...
Gun will fire as usual and fly back while rotating.
Initially gun is on one elliptical orbit. The act of firing will send a bullet on an elliptical orbit and gun will change its orbit to a different one. Momentums are same and in opposite directions, M_gun > m_bullet --> gun travel back slower than a bullet. Bu conservation of momentum, the center of mass of gun+bullet is travelling on the original orbit (like if never fired).