1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:42:27 +01:00

Allow <C-c> in recorded macros.

This commit is contained in:
Kris Maglione
2008-09-15 21:27:57 +00:00
parent 7c19363383
commit e1cbf43661

View File

@@ -843,6 +843,7 @@ liberator.Events = function () //{{{
var evt = doc.createEvent("KeyEvents");
evt.initKeyEvent("keypress", true, true, view, ctrl, alt, shift, meta, keyCode, charCode);
evt.noremap = noremap;
evt.ismacro = true;
elem.dispatchEvent(evt);
// stop feeding keys if page loading failed
if (!liberator.modes.isReplaying)
@@ -1143,7 +1144,7 @@ liberator.Events = function () //{{{
if (liberator.modes.isReplaying)
{
// XXX: Prevents using <C-c> in a macro.
if (key == "<C-c>")
if (key == "<C-c>" && !event.ismacro)
{
liberator.modes.isReplaying = false;
liberator.echo("Canceled playback of macro '" + lastMacro + "'");