On Sun, 18 Jul 2010, Bram Moolenaar wrote:
>
> Benjamin R. Haskell wrote:
>
> > This fixes the issue with mapping <C-MouseUp>/<C-MouseDown> for both
> > rxvt-unicode and uxterm. -- Ben
> >
> > ---
> > src/term.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/src/term.c b/src/term.c
> > index 2e0376c..205cd35 100644
> > --- a/src/term.c
> > +++ b/src/term.c
> > @@ -4763,6 +4763,8 @@ check_termcode(max_offset, buf, buflen)
> > modifiers |= MOD_MASK_SHIFT;
> > if (orig_mouse_code & MOUSE_CTRL)
> > modifiers |= MOD_MASK_CTRL;
> > + if (wheel_code & MOUSE_CTRL)
> > + modifiers |= MOD_MASK_CTRL;
> > if (orig_mouse_code & MOUSE_ALT)
> > modifiers |= MOD_MASK_ALT;
> > if (orig_num_clicks == 2)
>
> Thanks, I'll include this.
>
> Does this also work for ALT and SHIFT? In my xterm these events don't
> appear to arrive at all.
>
Shift probably can't ever work, because it (intentionally) disables
mouse reporting in both xterm and rxvt-unicode. (So that you can use
terminal mouse bindings even while an application is requesting mouse
info. E.g. it allows shift to choose xterm's selection instead of Vim
selection.)
Alt works in rxvt-unicode (updated patch below), but not in xterm. The
problem, though, is that most window managers use alt+mouse to mean 'grab and
move'. So, it won't work most of the time. (I had to disable wmii's keyboard
shortcuts to test it.) -- Ben
---
src/term.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/term.c b/src/term.c
index 2e0376c..102edd5 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4763,8 +4763,12 @@ check_termcode(max_offset, buf, buflen)
modifiers |= MOD_MASK_SHIFT;
if (orig_mouse_code & MOUSE_CTRL)
modifiers |= MOD_MASK_CTRL;
+ if (wheel_code & MOUSE_CTRL)
+ modifiers |= MOD_MASK_CTRL;
if (orig_mouse_code & MOUSE_ALT)
modifiers |= MOD_MASK_ALT;
+ if (wheel_code & MOUSE_ALT)
+ modifiers |= MOD_MASK_ALT;
if (orig_num_clicks == 2)
modifiers |= MOD_MASK_2CLICK;
else if (orig_num_clicks == 3)
--
1.7.1
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php