In older games, [[EmergencyWeapon 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 ([[PistolWhipping 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 NecessaryDrawback to this, such as making the dedicated melee weapon's attack stronger. ''Franchise/{{Halo}}'' comes to mind, where the Energy Sword and Gravity Hammer largely outperform the quick PistolWhipping.

A sub-trope of EmergencyWeapon, although it is usually not a separate weapon per se.

This mostly lead to a BrokenBase, with one camp thinking of it as just another game mechanic, 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 [[WhyDontYaJustShootHim ranged attacks.]]

See also, BayonetYa.

----
!!Examples

[[AC: First-Person Shooter]]
* The oldest known example of such a key is ''VideoGame/DukeNukem3D'', 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 [[ThatRussianSquatDance Hopak]].
* ''VideoGame/Left4Dead'': Players could melee with their firearms or whatever they were holding to push back or even kill zombies. The sequel introduced dedicated melee weapons with far more power that required passing up on pistols.
* ''Franchise/{{Halo}}'': With a press of the B button (or RB, in ''VideoGame/HaloReach''), whatever weapon the player was holding would be used as a club. Damage output would depend on the weapon used.
* VideoGame/CallOfDuty: Before the ''Modern Warfare'' series, the player would use the butt of a gun to hit an enemy.
** ''VideoGame/ModernWarfare'', ''World at War'', and ''VideoGame/CallOfDutyBlackOps'' use this and are arguably the ones who [[TropeCodifier 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, which allowed quicker melee, and the Commando perk, which gave players a longer melee range (and was arguably a GameBreaker). ''3'' dropped Commando and removed the "lunge" from knifing, but kept the tactical knife.
** ''VideoGame/CallOfDutyBlackOps2'' 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 your knife slashes are faster, do not result in your character loudly grunting, and regain the slight lunge they had before ''[=MW3=]''.
* The 2010 version of ''VideoGame/MedalOfHonor'' had a quick knife for the US side, and a quick ''axe'' for the [=OpFor=] side.
* ''VideoGame/BattlefieldBadCompany 2'': Very similar to Call of Duty's "quick knife", albeit a bit slower. It's very useful for breaking weaker walls without wasting a grenade.
* ''VideoGame/{{Battlefield}} 1942'': In the ''Road To Rome'' expansion pack, 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.
* ''VideoGame/{{Battlefield 3}}'' has an interesting variation. There is the quick knife, which kills in two swipes, or the takedown, which takes a few seconds to do, but rewards the player with dogtags and a unique animation. The knife can be wielded like any other weapon.
** ''VideoGame/{{Battlefield 4}}'' ups the ante, sort of, by allowing instant melee kills from behind or in front. If the target has less than 50% health, knifing them from the front will initiate a melee kill animation. The caveat is that, if they react fast enough, they can reverse the kill animation and kill ''you'' instead. Knifing from behind is still an unblockable kill, though, unless [[TheDevTeamThinksOfEverything someone kills your attacker in the short period of time before he stabs you.]]
* ''VideoGame/BattlefieldPlay4Free'' has the player make a quick knife slash (which one-hit kills any enemy unlucky enough to be hit by it) when they press the button it's assigned to, then go back to whatever weapon they were using before.
* ''VideoGame/{{Homefront}}'': Exactly like ''Call of Duty'''s knife.
* ''VideoGame/ShatteredHorizon'' had a Quick Pickaxe. Early versions of the game had a retractable bayonet in the assault rifle.
* ''VideoGame/{{Singularity}}'' has the quick-knife in the first part of the game. After the player receives the [[MacGuffin TMD]], it's replaced with the Impulse attack, a burst of energy that knocks enemies down at mid-range and [[LudicrousGibs dismembers them]] at close range.
* ''VideoGame/{{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.
* ''VideoGame/StarWarsRepublicCommando'' If you have the default rifle (regardless of attachment), pressing the appropriate button will make you use a wrist blade. Otherwise, you just hit the enemy with the gun.
* ''VideoGame/RedOrchestra'': 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.
* ''VideoGame/{{Resistance}}'' has the quick gun-melee variation. The GaidenGame ''Burning Skies'' replaces it with a touch-activated quick fire-axe.
* ''ReturnToCastleWolfenstein'' has a quick kick. [[VideoGame/{{Wolfenstein}} The 2009 sequel]] replaces it with a more traditional gun-bash attack, and two weapons have an upgrade that turns melee attacks into a OneHitKill.
* ''VideoGame/FirstEncounterAssaultRecon'' also does the first variation, though notably combined with more useful kicks or the ability to put your guns away entirely and engage in GoodOldFisticuffs. The third game replaced it with the knife.
* ''DayOfDefeat'': 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 ''VideoGame/{{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.
** ''VideoGame/{{Borderlands 2}}'' continues the tradition. Maya throws an energy-charged punch, Zer0 uses a katana, Salvador throws a punch, and Axton swings a hatchet). Also, blade attachments are available for all gun types. There's even a class of shields that increase your melee damage when depleted.
* ''VideoGame/{{Bulletstorm}}'' has a quick-kick that sends enemies flying backwards in slow-motion, allowing the player to line up a shot ot two.
* ''VideoGame/{{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.
** The third game adds the "Brutal Melee" mechanic, which is triggered by a ''VideoGame/GodOfWar''-style [[ActionCommands Action Command]], that consists of the player performing a random insta-kill attack, ranging from a NeckSnap to [[EyeScream jabbing their thumbs into the enemy's eyes]].
* In ''VideoGame/DeusExHumanRevolution'' you can perform a melee takedown attack on an enemy at close range (tapping the button to choke them or deliver a TapOnTheHead with your ArtificialLimbs or holding it to stab them to death with your BladeBelowTheShoulder). Two if you get a reflex booster aug.
** WebAnimation/ZeroPunctuation complained about this trope in his column regarding the above, saying how he misses dedicated melee weapons and how different games had their own iconic melee weapon (e.g. the crowbar from ''VideoGame/{{Half-Life}}'').
* ''VideoGame/GothamCityImpostors'' has it, very similarly to ''Call of Duty'''s.
* A variation in ''VideoGame/{{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.
* ''VideoGame/{{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, [[GrenadeHotPotato kicking grenades away]], or just generally [[VideoGameCrueltyPotential messing around with people]] than for killing them.
* ''VideoGame/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 [[PoweredArmor MAX suits]] and Heavy Assaults with shields. Speaking of MAX suits, they can perform a swipe with [[PowerFist 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 ([[ChainsawGood chainsaw]]/magnetic cutting/plasma cutting) was activated - making it largely a [[CherryTapping humiliation weapon]]
* ''VideoGame/BioShock2'' has Subject Delta to 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.
* ''VideoGame/BioShockInfinite'' 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.
* ''[[VideoGame/BanjoKazooie Banjo-Tooie]]'' has Beak Bayonet, a learnable melee attack that can only be used in FirstPersonShooter 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.

[[AC: Mech Game]]
* In ''VideoGame/ZoneOfTheEnders'', 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.

[[AC: Shoot'em Up]]
* All characters in ''VideoGame/MetalSlug'' will automatically stab instead of shooting if the enemy is too close. Unless that enemy is a vehicle.
** Same goes for ''VideoGame/AlienHominid'', a similarly styled game.

[[AC: Survival Horror]]
* ''VideoGame/ResidentEvil4'' does this with the knife, a good thing since said knife is decently strong in this game and there's too many {{mook}}s 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 roundhouse kick them in the face. Said kick is about as powerful as a bullet from a rifle, for some reason.
* The ''Franchise/DeadSpace'' 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 SecondaryFire button will cause him to stomp any enemy on the ground.
* In ''VideoGame/TheLastOfUs'', pressing square will cause Joel to strike an enemy with either his fists or a scavenged melee weapon.

[[AC: Third-Person Shooter]]
* ''VideoGame/GearsOfWar'' features this, and if you have out the [[ChainsawGood Lancer chainsaw bayonet...]]
* Melee combat in ''VideoGame/{{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.
* In ''VideoGame/MaxPayne 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.
** ''Max Payne 3'', pressing the trigger button at close range will cause the player to melee an enemy, giving them a few seconds of BulletTime to follow it up with a shot to the face.
* In ''VideoGame/SecondSight'', 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 ''Franchise/MassEffect'' games. The [[VideoGame/MassEffect1 first]] simply has you whack your target with your gun if you press the fire button while you're at melee range. ''[[VideoGame/MassEffect2 2]]'' adds a dedicated melee button. ''[[VideoGame/MassEffect3 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 BladeBelowTheShoulder, or a [[MindOverMatter biotic]]-enhanced punch for an Adept or Vanguard.
* ''VideoGame/SpecOpsTheLine'' 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.

[[AC: Wide Open Sandbox]]
* In ''VideoGame/GrandTheftAutoIV'', 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 ''VideoGame/RedDeadRedemption'' - 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 OneHitKill complete with a cinematic camera angle). You may also switch to your fists or a hunting knife.
** ''VideoGame/GrandTheftAutoV'' retains this system. Here, striking an enemy with a firearm is a one-hit kill.
* ''VideoGame/SaintsRow'' has this in addition to "normal" melee weapons. There's a different animation for each weapon, and particularly in ''The Third'' most of them have you hitting the guy you're fighting in the [[GroinAttack nuts]].
* In ''VideoGame/SleepingDogs'', pressing X/Square when holding a gun will cause Wei to smack an enemy with it.
----