keysnail
keysnail copied to clipboard
Firefox25: keysnail is not enabled when the focus is on the menu items
When the focus is on the menu items (e.g. by pressing Alt + B to pop up "Bookmarks" menu), keysnail keybindings are not enabled.
In my setting, extensions.keysnail.keyhandler.global_enabled = true extensions.keysnail.keyhandler.low_priority = false
Confirmed in Firefox 25.0, in Xubuntu 12.04 32bit and Windows XP 32bit.
I changed the C-n
key on the view mode in my .keysnail.js
to below:
key.setViewKey([['C-n'], ['j']], function (ev) {
// key.generateKey(ev.originalTarget, KeyEvent.DOM_VK_DOWN, true);
key.generateKey(ev.originalTarget, KeyEvent.DOM_VK_DOWN, true, 'keydown');
key.generateKey(ev.originalTarget, KeyEvent.DOM_VK_DOWN, true, 'keypress');
key.generateKey(ev.originalTarget, KeyEvent.DOM_VK_DOWN, true, 'keyup');
}, '一行スクロールダウン');
And I could use C-n
on the menu items.
The code is a part of internal code of command.nextLine
.
The reason why using it is that I can use C-n
and C-p
only while a textarea (e.g. the location bar) is focused.
command.nextLine
is assigned to C-n
on the edit mode, so I copied that.
I'm also using KKK. It seems that KKK also prevents key events on the menu bar, so I think that KKK needs to detect whether the menu items are focused. But I don't know how to detect it.
@HKey thanks for the tip! It works in my environment, too! (by the way my environment has been upgraded to Firefox42, Xubuntu 14.04 64bit)
@debug-ito My pleasure.