Only macros execute keys within 500ms of following a hint (mapped keys don't)

8 views
Skip to first unread message

Gordon Gustafson

unread,
Feb 18, 2015, 6:01:23 PM2/18/15
to dactyl-...@googlegroups.com
> hg log -l 1 -pv
changeset:   7142:4ad7b2a2f690
tag:         tip
user:        Gordon Gustafson <gordo...@gmail.com>
date:        Wed Feb 18 17:53:16 2015 -0500
files:       common/content/hints.js
description:
Only macros execute keys within 500ms of following a hint

The previous version also executed key-presses after a mapped key.
Assume I have the following map:

    map -b -m=input <A-e> é

If I typed <A-e>d in a hint, the d would be executed in normal mode,
closing the tab after following the hint. Using modes.replaying
instead of events.feedingKeys ensures that all keystrokes are ignored
for 500ms after following a hint, except during macro playback.


diff -r 5f4ed810d35a -r 4ad7b2a2f690 common/content/hints.js
--- a/common/content/hints.js    Wed Feb 18 13:01:07 2015 -0500
+++ b/common/content/hints.js    Wed Feb 18 17:53:16 2015 -0500
@@ -487,7 +487,7 @@
                 return;
         }
 
-        let timeout = followFirst || events.feedingKeys ? 0 : 500;
+        let timeout = followFirst || modes.replaying ? 0 : 500;
         let activeIndex = (this.hintNumber ? this.hintNumber - 1 : 0);
         let elem = this.validHints[activeIndex].elem;
         let top = this.top;

Reply all
Reply to author
Forward
0 new messages