In older games, melee weapons were like any other weapons: if you wanted to use it, you had to switch to it. Recent games have it being a simple player action. With a press of a button, the player character will use the melee weapon (or the butt of the gun) and will immediately switch back to the original weapon he or she was holding.
If there are dedicated melee weapons, the developer may encourage their use by giving a Necessary Drawback to this, such as making the dedicated melee weapon's attack stronger. Halo comes to mind, where the Energy Sword and Gravity Hammer largely outperform the quick Pistol-Whipping.
A sub-trope of Emergency Weapon, although it is usually not a separate weapon per se.
This mostly lead to a Broken Base, with one camp thinking of it as just another game mechanic that streamlines unnecessary weapon switching, and another thinking it is just making the games rely more on twitch reflexes than actual skill, and that the ease it takes to melee an enemy removes the humiliation factor that dedicated melee weapons had; the latter, of course, required the player to equip them, leaving him or her vulnerable to ranged attacks.
See also Bayonet Ya.
- Aliens vs. Predator (2010) diversifies this in a rock paper scissors kind of fashion. It also includes blocking (by holding the melee button), even for the Marines. Blocking reduces damage from light attacks, but heavy attacks will also break blocks.
- Averted in BioShock, which was made before quick melee was common (coming out three months before Modern Warfare) and features a wrench as a distinct weapon to use in close quarters.
- BioShock 2 has Subject Delta use his gun or the drill as a melee weapon, whacking enemies with it when using the melee attack; each gun has a quasi-unique animation to it.
- BioShock Infinite starts you off with the Sky-Hook, and despite your left hand being needed throughout the game to use Vigors and two-handed weapons, pressing "V" at any time will allow you to pull it out of nowhere, unless you're on a skyline (since that's the primary purpose of the sky-hook).
- Banjo-Tooie has Beak Bayonet, a learnable melee attack that can only be used in First-Person Shooter mode, where it gets its own button. It does more damage than a normal egg shot, but it's primarily required for defusing the dynamite sticks in Ordnance Storage.
- Deep Rock Galactic gives you a trusty pickaxe for excavating the terrain, be it to navigate around or to mine valuable minerals. In a pinch, it also works as this, accessible no matter the weapon you have out.
- The oldest known example of such a key is Duke Nukem 3D, where Duke could kick with his left foot on the press of a button. As the kick does not stun most enemies, and being near enough to use it makes it impossible to dodge attacks, it's mostly used for breaking vent covers. Unpatched versions (including the shareware) had a bug that allowed both this key and the normal melee weapon (Duke's right foot) to be used at the same time, resulting in Duke presumably running around doing Hopak.
- DOOM (2016) allows you to perform a damaging Pistol Whip on any enemy within range. Pressing the melee button near a stunned enemy triggers a Glory Kill. DOOM Eternal replaces the pistol-whipping animation with a punch-though it's also far less powerful, until you unlock Blood Punch, which causes demons to explode once charged up.
- Brutal Doom has a button for kicking enemies like the Duke Nukem example above. If you've picked up a Berserk Pack, kicking a low-level enemy will send them flying backward with enough force to splatter them on the nearest wall or other object.
- Left 4 Dead: Players can do a shove with their firearms or whatever they're holding to push back zombies in close range, or even kill them on a shove from behind or after enough whacks. The sequel introduced dedicated melee weapons with far more power that require passing up on handguns.
- Halo: With a press of a single button, whatever weapon the player is holding will be used as a club. Damage output depends on the weapon used.
- Warface: The player can use their firearm as a club.
- Call of Duty: Before the Modern Warfare series, the player would use the butt of a gun to hit an enemy.
- Modern Warfare, World at War, and Black Ops use this and are arguably the ones who caused the trend of the second version, or "quick knife" in recent shooters. The first Modern Warfare brought it to the scene; World at War added the bayonet, which gave the user a longer melee range; Modern Warfare 2 slowed the knife speed but brought in both the tactical knife attachment for handguns, which allowed quicker melee, and the Commando perk, which gave players a longer melee range (and was arguably a Game-Breaker). 3 dropped Commando and removed the "lunge" from knifing, but kept the tactical knife.
- Call of Duty: Black Ops II allows a player to forgo a primary or a secondary weapon and replace it with a separately-equipped knife like in the old days; this obviously hampers your ability to shoot people, but in return you can sprint for a slightly-longer distance to get in range, your movement speed is faster while holding the knife, your knife slashes are faster, they don't result in your character loudly grunting, and they regain the slight lunge they had before MW3. The Black Ops games also have the Ballistic Knife, which can fire its blade out for one-hit kills at longer ranges (assuming you can compensate for the gravity-affected Painfully Slow Projectile) but is otherwise a separate melee weapon much like the Combat Knife - your character even holds his normal knife in his left hand while using the ballistic one in his right, and like the later Combat Knife gets noticeably faster melee with it.
- Call of Duty: Black Ops III keeps separate melee weapons (a combat knife like in Black Ops II, a pair of boxing gloves given in a free update, and other stuff like a crowbar available through supply drops), but makes them secondary weapons that have to be unlocked and equipped rather than being given to you for unequipping a gun. Quick melee otherwise goes back to the original game's system, where you bash people's faces in with the stock of your gun, and also makes that less powerful when hitting opponents from the front - it takes two swipes with your gun to kill someone at full health, while a separate melee weapon is still an instant kill. Later games continue using this system, with knives only available in Zombies mode in Black Ops games, if you wear specific sets of armor that actually have a knife equipped in the campaign of Infinite Warfare, and in some execution animations in the 2019 Modern Warfare reboot.
- The 2010 version of Medal of Honor had a quick knife for the US side, and a quick axe for the OpFor side.
- In the Road To Rome expansion pack for the original Battlefield 1942, the engineer had a bayonet, which when selected, would be used when the player hit the right mouse button, rather than the typical "zoom" feature their rifle would normally have.
- Battlefield: Bad Company 2 has it very similar to Call of Duty's "quick knife", albeit a bit slower. It's very useful for breaking weaker walls without wasting explosives.
- Battlefield Play4Free has it the same, though minus the destruction abilities.
- Battlefield 3 has it very similar to Bad Company 2, including the ability to break through thin, weak barricades if you need a faster route through an area, though it has an interesting variation for use against other players. The normal quick-knife only deals 50% damage and requires two swipes to kill, but using it on someone while you're behind them gives you a takedown animation instead. This takes a few seconds to do, during which other enemies can still kill you before you complete the animation, but it's otherwise a guaranteed kill that rewards the player with their victim's dogtags and a unique animation. The knife can otherwise be wielded separately like any other weapon as well, either by scrolling through all the other weapons and equipment or holding down the quick-knife button for the entire duration of the swipe.
- Battlefield 4 ups the ante, sort of, by allowing takedowns from in front of the the target as well if they have less than 50% health. The caveat is that, if they tap the melee button themselves at the right time, they can reverse the kill animation and kill you instead (though enemies in the campaign cannot do this). Knifing from behind is still otherwise unblockable except by hoping a teammate can kill your attacker before he stabs you.
- Homefront: Exactly like Call of Duty's knife.
- Shattered Horizon has a Quick Pickaxe. Early versions of the game had a retractable bayonet on the assault rifle.
- Singularity has the quick-knife in the first part of the game. After the player receives the TMD, it's replaced with the Impulse attack, a burst of energy that knocks enemies down at mid-range and dismembers them at close range.
- Metro 2033: Some weapons could be used as melee weapons, such as the shotgun. If the gun had a bayonet on it, the player would stab with the bayonet instead.
- Star Wars: Republic Commando: If you're using the default rifle (regardless of attachment), pressing the appropriate button will make you use a retractable wrist blade. Otherwise, you just hit the enemy with the gun, which is slower and weaker than the wrist blade.
- Red Orchestra: You can bash enemies with your gun with the press of a button. Some classes also come with either an attachable bayonet or a gun that always has a bayonet.
- Resistance has the quick gun-melee variation. The Gaiden Game Burning Skies replaces it with a touch-activated quick fire-axe.
- Return to Castle Wolfenstein has a quick kick. The 2009 sequel replaces it with a more traditional gun-bash attack, and two weapons, the Kar98 and Tesla Gun, have a bayonet or equivalent upgrade that turns melee attacks into a One-Hit Kill. The New Order and The Old Blood feature the more traditional quick-knife (or quick-pipe, in The Old Blood), though you can still select the knife as a separate weapon, and if you're far enough away from an enemy the quick-melee button will instead throw a knife at him if you have any extra knives.
- First Encounter Assault Recon also does the first variation, though notably combined with more useful kicks used by crouching or jumping when pressing the button, or, in the first game, the ability to put your guns away entirely and engage in Good Old Fisticuffs. The third game replaced gun-bashing with a genre-standard knife, though the kicks are still available and some enemies Fettel can possess in a few levels also get other dedicated melee weapons like crowbars.
- Day of Defeat: The original game allowed players to hit others with the butt of their gun. Source does away with this, but adds in a punch feature that players can perform when using an SMG.
- In Borderlands all the characters have a unique melee weapon - Lilith zaps them with some sort of energy, Mordekai uses a sword, Brick uses a lead pipe, or fists when berserking, and Roland uses a knife - plus some pistols have attached blades which do bonus melee damage when they're used.
- Borderlands 2 continues the tradition. Maya throws an energy-charged punch, Zer0 uses a katana, Salvador straight-up punches them, Axton swings a hatchet, Gaige uses a claw hammer and Krieg swings his signature Buzz Axe. Also, blade attachments are available for all gun types. There's even a class of shields that increase your melee damage when depleted.
- In Borderlands: The Pre-Sequel! Athena swings a sword, Nisha uses a bullwhip (which is slower and does slightly less damage but has longer range), Wilhelm will hit enemies with the butt of whatever gun he's using, Claptrap and the Doppelganger simply jab at the enemy while Aurelia has a bitchslap.
- In Borderlands 3 Zane hits enemies with Wolverine Claws, FL4K uses a pick made of bone, Amara has an energy-powered punch while Moze stabs with a knife.
- Bulletstorm has a quick-kick that sends enemies flying backwards in slow-motion, allowing the player to line up a shot or two.
- Killzone has a button to beat an enemy with the butt of your rifle, though it only inflicts a small amount of damage and some staggering. You do have an instant-kill knife, but you have to manually equip it.
- In Deus Ex: Human Revolution you can perform a melee takedown attack on an enemy at close range (tapping the button to choke them or deliver a Tap on the Head with your Artificial Limbs or holding it to stab them to death with your Blade Below the Shoulder). Two if you get a reflex booster aug.
- Gotham City Impostors has it, very similarly to Call of Duty's.
- A variation in Brink. If you have a two handed weapon out, like a rifle, your character will attack with the butt of it. However, if you have a one handed weapon out, like a pistol, you will attack with a knife. Knives do more damage, but don't stun, which two handed melees do.
- Postal 2 and III have, like Duke Nukem 3D, a quick-kick button in addition to regular dedicated melee weapons. Also like Duke 3D, its extremely low range and power make it more useful for quickly opening doors, kicking grenades away, or just generally messing around with people than for killing them. The Paradise Lost expansion for the second game adds one more use: kicking people in the nuts to stun them for a second.
- PlanetSide 2 features a quick-slash melee button - pressing it will cause you to slash with a knife then re-equip your gun, in the space of a second. Two slashes can kill any player aside from MAX suits and Heavy Assaults with shields. Speaking of MAX suits, they can perform a swipe with one arm, with the same result. Averted in the first game, where the knife was a separate weapon which did pathetic damage unless its obnoxiously loud powered mode (chainsaw/magnetic cutting/plasma cutting) was activated - making it largely a humiliation weapon
- Day of Infamy has both a separate bayonet and a quick-melee button to smash people with your gun's stock, with the bayonet being faster and slightly more powerful. It's also possible to attach the bayonet to your rifle, which sacrifices the ability to use it as a separate weapon, but extends the range of quick melee and makes it even more powerful, including the ability to charge up a stab while sprinting for an instant kill.
- Killing Floor 2 adds a melee bash with the stock or grip of your currently-equipped gun as an alternative to the dedicated melee weapons. It's mostly useful for saving a bullet on collectibles you can physically reach, or getting Clot variations to let go of you so you can get some distance from a horde - save for the bayonet attached to the DLC Mosin-Nagant rifle, it's weaker than using an actual melee weapon (though still strong enough, depending on the difficulty and weapon used, to punch off a Clot or Crawler's head in one hit), and while striking once with a gun, especially a pistol, is faster than pulling out a melee weapon to attack with it, repeated strikes with a gun are overall slower than with a knife. It's also available when using dedicated melee weapons, where pressing the quick-melee button will result in a quick stab.
- Each hero in Overwatch has a quick melee attack, useful for when distances are closed and that last bit of damage needs to be dealt. They vary from punches and kicks to pistol whips and stock strikes.
- Ashes 2063 has the boot knife, a melee attack faster than switching to the crowbar or pile bunker, although weaker than both. In earlier versions you couldn't use it with the junker musket, as the knife's bind was the same as the scope's.
- Splitgate: Be it your fist or the butt of your weapon, you can always make a quick strike for 50 HP (where players usually have 100); its swiftness and the fact it lets you dash often make it quicker at point blank than shooting. Even picking up the Oddball (which scores you points the longer you hold it in relevant game modes), which otherwise deprives you of offense, doesn't stop you from simply smacking an enemy with the thing.
- In Zone of the Enders, the "Attack" button fires a projectile shot by default, but if you lock on to an enemy and fight them at close range, it will automatically execute stronger melee attacks instead.
- In The Elder Scrolls V: Skyrim, when actively wielding a bow, you can perform a "bow bash" melee attack. It is rather weak, but has a slim chance to stagger foes and can buy you a precious second or two to knock another arrow (or switch to a proper melee weapon) when an enemy gets too close.
- All characters in Metal Slug will automatically stab instead of shooting if the enemy is too close. Unless that enemy is a vehicle.
- Same goes for Alien Hominid, a similarly styled game.
- Both games in the Guns, Gore & Cannoli series have a button assigned for a quick kick attack.
- In the first game, the player was required to kick levers in order to get past some obstacles. As the majority of the enemies encountered in the game were zombies, the stationary kick function was also intended to keep the zombies at bay, especially when the player was reloading a gun (the standard alternative to this was running away, but that wasn't always possible when a group of zombies ganged up on the player).
- The sequel took the kick attack further by allowing sliding kick tackles and flying kick tackles, also serving as the best way to side-step shield-bearing foes.
- Resident Evil 4 does this with the knife, a good thing since said knife is decently strong in this game and there's too many mooks around for you to be wasting ammo. It also had the "Action Command" system: if you stunned an enemy with a shot to the face or dropped them to their knees, a prompt would appear allowing you to perform a different move depending on the enemy type - starting out with roundhouse kicks to the face that are about as powerful as a bullet from a rifle for the standard Ganados, then moving onto a suplex for the Zealots that generally instantly smashes their head.
- The Dead Space games have an interesting take on this. You can't hip-fire your weapons, pressing the fire button without going into aim mode will cause Isaac to bludgeon an enemy with his weapon, while pressing the Secondary Fire button will cause him to stomp any enemy on the ground.
- In The Last of Us, pressing square will cause Joel to strike an enemy with either his fists or a scavenged melee weapon.
- Gears of War features this, and if you have out the Lancer chainsaw bayonet...
- Melee combat in WET is realized this way. Basically, Rubi's default weapons are her guns, but she can pull out her katana and slash the enemy in front in a single motion, which is triggered with a controller button.
- Max Payne games:
- In Max Payne 2, both characters have a "secondary weapon" button, offering the player a choice of throwing grenades, Molotov cocktails or simply striking enemies with the butt of their gun.
- In Max Payne 3, pressing the trigger button at close range will cause the player to melee an enemy, giving them a few seconds of Bullet Time to follow it up with a shot to the face.
- Syphon Filter: Dark Mirror & Logan's Shadow has the player character do this when the enemy is right in your face, or perform the move every single time you sneak up to an enemy from behind.
- In Second Sight, if one is close enough to an enemy and presses the attack button, the protagonist will strike the enemy with the butt of his gun (or kick them if they're prone).
- Shows up in all three Mass Effect games. The first simply has you whack your target with your gun if you press the fire button while you're at melee range. 2 adds a dedicated melee button. 3 slightly changes it up - tap the melee button for a quick pistolwhip/buttstroke, or hold down the button to unleash a powerful hit from your Blade Below the Shoulder, or a biotic-enhanced punch for an Adept or Vanguard.
- Spec Ops: The Line lets you do this. If the attack connects, the enemy is knocked down, allowing the player to perform a finishing move. One aspect of this is as the game goes on, and Walker's mental state falls apart, the finishing moves go from quick and "painless" to downright sadistic.
- Warhammer 40,000: Space Marine: Titus needs to switch to his melee weapon against most enemies. Against the puniest enemies like gretchin and rebel humans, he just backhands them and they explode in a shower of gore (and heals Titus).
- In Warframe, melee weapons can perform quick slashes at almost any time. The melee pulls out almost instantly and can be used to perform successive attacks, though after releasing the attack button there is a pause as the melee is holstered. Manually holstering your rifle and pulling out the melee allows for stronger attacks and combos. This was changed with an update; now, pressing the melee button instantly switches to the melee weapon as well as attacking, allowing you to perform full combos, and pressing the fire or aim buttons will likewise instantly switch back to your gun.
Wide Open Sandbox
- Grand Theft Auto:
- In Grand Theft Auto: San Andreas and Grand Theft Auto IV, getting extremely close to an enemy and pressing the fire button will instead have your character hit the enemy with the weapon, though there's no actual dedicated button to Quick Melee. The game also has normal melee weapons you have to switch to.
- The same happens with Red Dead Redemption - you might strike an enemy with your gun if you use the fire button when very close to them, knocking them down (or if slightly farther from them, you shove your gun's barrel into them and do a One-Hit Kill complete with a cinematic camera angle). You may also switch to your fists or a hunting knife.
- Grand Theft Auto V retains this system. Here, striking an enemy with a firearm is a one-hit kill.
- Saints Row has this in addition to "normal" melee weapons. There's a different animation for each weapon, and particularly in Saints Row: The Third most of them have you hitting the guy you're fighting in the nuts.
- In Sleeping Dogs, pressing X/Square when holding a gun will cause Wei to smack an enemy with it.