dzirtusss / vifari

Vimium/Vimari for Safari without browser extension in pure Lua
MIT License
35 stars 1 forks source link

Commands like (Tab Left, Tab Right, Close Tab, New Tab) are slower than built-in shortcuts #7

Open johngkhs opened 2 weeks ago

johngkhs commented 2 weeks ago

I changed the double press delay to 0, but the tab related commands appear quite a bit slower than the built-in keyboard shortcuts on my machine. For example, command-T opens a new tab instantly, while t opens a new tab after ~500ms. In contrast, h/j/d/u are instantaneous through vifari. Is this a known limitation or is there a way to get t to open a tab as fast as command-T?

johngkhs commented 2 weeks ago

Found the fix for this one:

      hs.eventtap.keyStroke(foundMapping[1], foundMapping[2], 0)

http://www.hammerspoon.org/docs/hs.eventtap.html

hs.eventtap.keyStroke(modifiers, character[, delay, application])
delay - An optional delay (in microseconds) between key down and up event. Defaults to 200000 (i.e. 200ms)