summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-03-07 17:30:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-03-07 17:30:44 +0900
commitbbf4567dd884ec2d7ef22856aa50e337f9cca2cb (patch)
tree978ac9aa345d66ca87d2da74f30c862d313eaa1b
parent27d3b5284329fdb5330070d38094d078a342cd2d (diff)
Allow command/control-click/wheel
e.g. urxvt
-rw-r--r--README.md5
-rwxr-xr-xfzf10
2 files changed, 8 insertions, 7 deletions
diff --git a/README.md b/README.md
index 53f69c50..a2f3f6c1 100644
--- a/README.md
+++ b/README.md
@@ -102,8 +102,9 @@ The following readline key bindings should also work as expected.
If you enable multi-select mode with `-m` option, you can select multiple items
with TAB or Shift-TAB key.
-You can also use mouse. Double-click on an item to select it or shift-click to
-select multiple items. Use mouse wheel to move the cursor up and down.
+You can also use mouse. Double-click on an item to select it or shift-click (or
+ctrl-click) to select multiple items. Use mouse wheel to move the cursor up and
+down.
### Extended-search mode
diff --git a/fzf b/fzf
index 01af472c..f04900da 100755
--- a/fzf
+++ b/fzf
@@ -7,7 +7,7 @@
# / __/ / /_/ __/
# /_/ /___/_/ Fuzzy finder for your shell
#
-# Version: 0.8.0 (March 6, 2014)
+# Version: 0.8.0 (March 7, 2014)
#
# Author: Junegunn Choi
# URL: https://github.com/junegunn/fzf
@@ -754,14 +754,14 @@ class FZF
def get_mouse
case ord = read_nb
- when 32, 36, # mouse-down / shift-mouse-down
- 35, 39 # mouse-up / shift-mouse-up
+ when 32, 36, 40, 48, # mouse-down / shift / cmd / ctrl
+ 35, 39, 43, 51 # mouse-up / shift / cmd / ctrl
x = read_nb - 33
y = read_nb - 33
{ :event => (ord % 2 == 0 ? :click : :release),
:x => x, :y => y, :shift => ord >= 36 }
- when 96, 100, # scroll-up / shift-scroll-up
- 97, 101 # scroll-down / shift-scroll-down
+ when 96, 100, 104, 112, # scroll-up / shift / cmd / ctrl
+ 97, 101, 105, 113 # scroll-down / shift / cmd / ctrl
read_nb(2)
{ :event => :scroll, :diff => (ord % 2 == 0 ? -1 : 1), :shift => ord >= 100 }
else