The configuration of cardiac action potentials varies considerably from one region of the heart to another. These differences are caused by differential cellular expression of several types of K(+) channel genes. The channels encoded by these genes can be grouped into several classes depending on the stimulus that permits the channels to open and conduct potassium ions. K(+) channels are activated by changes in transmembrane voltage or binding of ligands. Voltage-gated channels are normally the most important players in determining the shape and duration of action potentials and include the delayed rectifiers and the transient outward potassium channels. Ligand-gated channels include those that probably have only minor roles in shaping repolarization under normal conditions but, when activated by extracellular acetylcholine or a decrease in the intracellular concentration of ATP, can substantially shorten action potential duration. Inward rectifier K(+) channels are unique in that they are basically stuck in the open state but can be blocked in a voltage-dependent manner by intracellular Mg(2+), Ca(2+), and polyamines. Other K(+) channels have been described that provide a small background leak conductance. Many of these cardiac K(+) channels have been cloned in the past decade, permitting detailed studies of the molecular basis of their function and facilitating the discovery of the molecular basis of several forms of congenital arrhythmias. Drugs that block cardiac K(+) channels and prolong action potential duration have been developed as antiarrhythmic agents. However, many of these same drugs, as well as other common medications that are structurally unrelated, can also cause long QT syndrome and induce ventricular arrhythmia.