;;; intelli-scroll.el --- scrolling commands for IntelliMouse sliding wheel ;; Copyright (C) 1999 Noah S. Friedman ;; Author: Noah Friedman ;; Maintainer: friedman@splode.com ;; Keywords: extensions ;; Created: 1999-11-01 ;; $Id: intelli-scroll.el,v 1.1 1999/11/02 07:36:39 friedman Exp $ ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, you can either send email to this ;; program's maintainer or write to: The Free Software Foundation, ;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA. ;;; Commentary: ;; This package defines some convenient scrolling commands bound to the ;; slider wheel of various IntelliMouse-compatible mice (e.g. the Logitech ;; TrackMan Mouse). ;;; Code: (defun intelli-scroll-down-1 () (interactive) (scroll-down 1)) (defun intelli-scroll-up-1 () (interactive) (scroll-up 1)) (defun intelli-scroll-down-5 () (interactive) (scroll-down 5)) (defun intelli-scroll-up-5 () (interactive) (scroll-up 5)) (defun intelli-scroll-down-screen () (interactive) (scroll-down (- (window-height) 1 next-screen-context-lines))) (defun intelli-scroll-up-screen () (interactive) (scroll-up (- (window-height) 1 next-screen-context-lines))) (defun intelli-scroll-install () (define-key global-map [mouse-4] 'intelli-scroll-down-1) (define-key global-map [mouse-5] 'intelli-scroll-up-1) (define-key global-map [S-mouse-4] 'intelli-scroll-down-5) (define-key global-map [S-mouse-5] 'intelli-scroll-up-5) (define-key global-map [C-mouse-4] 'intelli-scroll-down-screen) (define-key global-map [C-mouse-5] 'intelli-scroll-up-screen)) (intelli-scroll-install) (provide 'intelli-scroll) ;;; intelli-scroll.el ends here