summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-01-02 10:03:35 -0600
committerCase Duckworth2021-01-02 10:03:35 -0600
commit546fa450ac048cdad9dd5c8fbf0b9fb6ea2bdb66 (patch)
tree54ffb7950086ea9365344d030d83ce03a8c03927
parentPreserve the point position on screen when scrolling (diff)
downloademacs-546fa450ac048cdad9dd5c8fbf0b9fb6ea2bdb66.tar.gz
emacs-546fa450ac048cdad9dd5c8fbf0b9fb6ea2bdb66.zip
Add mouse scrolling binds
-rw-r--r--config.org76
1 files changed, 40 insertions, 36 deletions
diff --git a/config.org b/config.org index d7b10f9..a0a354c 100644 --- a/config.org +++ b/config.org
@@ -955,42 +955,46 @@ For right now, I’m /just/ using Anzu – I don’t like parts of =isearch= but
955This has to be done /before/ loading the package. It's included in =visual-fill-column=, too, but for some reason isn't loaded there. 955This has to be done /before/ loading the package. It's included in =visual-fill-column=, too, but for some reason isn't loaded there.
956 956
957#+BEGIN_SRC emacs-lisp 957#+BEGIN_SRC emacs-lisp
958(global-set-key [right-margin mouse-1] (global-key-binding [mouse-1])) ; #'mouse-set-point 958 (global-set-key [right-margin mouse-1] (global-key-binding [mouse-1])) ; #'mouse-set-point
959(global-set-key [right-margin mouse-2] (global-key-binding [mouse-2])) ; #'mouse-yank-primary 959 (global-set-key [right-margin mouse-2] (global-key-binding [mouse-2])) ; #'mouse-yank-primary
960(global-set-key [right-margin mouse-3] (global-key-binding [mouse-3])) ; #'mouse-save-then-kill 960 (global-set-key [right-margin mouse-3] (global-key-binding [mouse-3])) ; #'mouse-save-then-kill
961(global-set-key [right-margin drag-mouse-1] #'ignore) 961 (global-set-key [right-margin drag-mouse-1] #'ignore)
962(global-set-key [right-margin drag-mouse-2] #'ignore) 962 (global-set-key [right-margin drag-mouse-2] #'ignore)
963(global-set-key [right-margin drag-mouse-3] #'ignore) 963 (global-set-key [right-margin drag-mouse-3] #'ignore)
964(global-set-key [right-margin double-mouse-1] #'ignore) 964 (global-set-key [right-margin double-mouse-1] #'ignore)
965(global-set-key [right-margin double-mouse-2] #'ignore) 965 (global-set-key [right-margin double-mouse-2] #'ignore)
966(global-set-key [right-margin double-mouse-3] #'ignore) 966 (global-set-key [right-margin double-mouse-3] #'ignore)
967(global-set-key [right-margin triple-mouse-1] #'ignore) 967 (global-set-key [right-margin triple-mouse-1] #'ignore)
968(global-set-key [right-margin triple-mouse-2] #'ignore) 968 (global-set-key [right-margin triple-mouse-2] #'ignore)
969(global-set-key [right-margin triple-mouse-3] #'ignore) 969 (global-set-key [right-margin triple-mouse-3] #'ignore)
970(global-set-key [left-margin mouse-1] (global-key-binding [mouse-1])) ; #'mouse-set-point 970 (global-set-key [left-margin mouse-1] (global-key-binding [mouse-1])) ; #'mouse-set-point
971(global-set-key [left-margin mouse-2] (global-key-binding [mouse-2])) ; #'mouse-yank-primary 971 (global-set-key [left-margin mouse-2] (global-key-binding [mouse-2])) ; #'mouse-yank-primary
972(global-set-key [left-margin mouse-3] (global-key-binding [mouse-3])) ; #'mouse-save-then-kill 972 (global-set-key [left-margin mouse-3] (global-key-binding [mouse-3])) ; #'mouse-save-then-kill
973(global-set-key [left-margin drag-mouse-1] #'ignore) 973 (global-set-key [left-margin drag-mouse-1] #'ignore)
974(global-set-key [left-margin drag-mouse-2] #'ignore) 974 (global-set-key [left-margin drag-mouse-2] #'ignore)
975(global-set-key [left-margin drag-mouse-3] #'ignore) 975 (global-set-key [left-margin drag-mouse-3] #'ignore)
976(global-set-key [left-margin double-mouse-1] #'ignore) 976 (global-set-key [left-margin double-mouse-1] #'ignore)
977(global-set-key [left-margin double-mouse-2] #'ignore) 977 (global-set-key [left-margin double-mouse-2] #'ignore)
978(global-set-key [left-margin double-mouse-3] #'ignore) 978 (global-set-key [left-margin double-mouse-3] #'ignore)
979(global-set-key [left-margin triple-mouse-1] #'ignore) 979 (global-set-key [left-margin triple-mouse-1] #'ignore)
980(global-set-key [left-margin triple-mouse-2] #'ignore) 980 (global-set-key [left-margin triple-mouse-2] #'ignore)
981(global-set-key [left-margin triple-mouse-3] #'ignore) 981 (global-set-key [left-margin triple-mouse-3] #'ignore)
982 982
983(mouse-wheel-mode +1) 983 (mouse-wheel-mode +1)
984 984
985(when (bound-and-true-p mouse-wheel-mode) 985 (when (bound-and-true-p mouse-wheel-mode)
986 (global-set-key [right-margin mouse-wheel-down-event] #'mwheel-scroll) 986 (global-set-key [right-margin mouse-wheel-down-event] #'mwheel-scroll)
987 (global-set-key [right-margin mouse-wheel-up-event] #'mwheel-scroll) 987 (global-set-key [right-margin mouse-wheel-up-event] #'mwheel-scroll)
988 (global-set-key [right-margin wheel-down] #'mwheel-scroll) 988 (global-set-key [right-margin wheel-down] #'mwheel-scroll)
989 (global-set-key [right-margin wheel-up] #'mwheel-scroll) 989 (global-set-key [right-margin wheel-up] #'mwheel-scroll)
990 (global-set-key [left-margin mouse-wheel-down-event] #'mwheel-scroll) 990 (global-set-key [left-margin mouse-wheel-down-event] #'mwheel-scroll)
991 (global-set-key [left-margin mouse-wheel-up-event] #'mwheel-scroll) 991 (global-set-key [left-margin mouse-wheel-up-event] #'mwheel-scroll)
992 (global-set-key [left-margin wheel-down] #'mwheel-scroll) 992 (global-set-key [left-margin wheel-down] #'mwheel-scroll)
993 (global-set-key [left-margin wheel-up] #'mwheel-scroll)) 993 (global-set-key [left-margin wheel-up] #'mwheel-scroll)
994 (global-set-key [right-margin mouse-4] #'mwheel-scroll)
995 (global-set-key [right-margin mouse-5] #'mwheel-scroll)
996 (global-set-key [left-margin mouse-4] #'mwheel-scroll)
997 (global-set-key [left-margin mouse-5] #'mwheel-scroll))
994#+END_SRC 998#+END_SRC
995 999
996*** Load the package 1000*** Load the package