This is a useful feature but there should be a general way to specify
ctrlKey, altKey, metaKey, and shiftKey without hard-coding them into
the module. Also, the module should support assigning an event to all
combinations of modifier keys and mouse buttons.
In essence, we need to either extend conkeror's key binding system to
support the mouse (which is an open feature request on the tracker),
or if that's infeasible, then create a separate binding system
specifically for the mouse.
Cheers,
- Nick
On Fri, Apr 17, 2009 at 2:28 PM, Michael Dagitses <
dagitses@...> wrote:
> Adding user variable to clicks-in-new-buffer to allow for control-clicking to
> open new buffers. This is to more closely mirror how firefox opens new tabs.
> ---
> modules/clicks-in-new-buffer.js | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/modules/clicks-in-new-buffer.js b/modules/clicks-in-new-buffer.js
> index afbd7f8..a8912c7 100644
> --- a/modules/clicks-in-new-buffer.js
> +++ b/modules/clicks-in-new-buffer.js
> @@ -9,6 +9,10 @@ define_variable("clicks_in_new_buffer_button", 1,
> "Which mouse button should open links in a new buffer. " +
> "0 = left, 1 = middle, 2 = right. Default is 1.");
>
> +define_variable('clicks_in_new_buffer_require_control', false,
> + 'Whether control must be held to open in new buffer. ' +
> + 'Default is false.');
> +
> define_variable("clicks_in_new_buffer_target", OPEN_NEW_BUFFER,
> "How to open links in a new buffer, in the foreground or " +
> "the background. Set to one the constants OPEN_NEW_BUFFER " +
> @@ -32,7 +36,8 @@ function find_tag_in_parents(tag, element) {
> }
>
> function open_link_in_new_buffer(event) {
> - if (event.button != clicks_in_new_buffer_button)
> + if (event.button != clicks_in_new_buffer_button ||
> + event.ctrlKey != clicks_in_new_buffer_require_control)
> return;
> let element = event.target;
> let anchor = null;
> --
> 1.5.4.3
>
> _______________________________________________
> Conkeror mailing list
>
Conkeror@...
>
https://www.mozdev.org/mailman/listinfo/conkeror>
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror