(define-key map [?\C-j] 'tty-menu-select)
(define-key map [return] 'tty-menu-select)
(define-key map [linefeed] 'tty-menu-select)
- (define-key map [down-mouse-1] 'tty-menu-select)
+ (define-key map [mouse-1] 'tty-menu-select)
(define-key map [drag-mouse-1] 'tty-menu-select)
+ (define-key map [mouse-2] 'tty-menu-select)
+ (define-key map [drag-mouse-2] 'tty-menu-select)
+ (define-key map [mouse-3] 'tty-menu-select)
+ (define-key map [drag-mouse-3] 'tty-menu-select)
(define-key map [wheel-down] 'tty-menu-next-item)
(define-key map [wheel-up] 'tty-menu-prev-item)
(define-key map [wheel-left] 'tty-menu-prev-menu)
(define-key map [wheel-right] 'tty-menu-next-menu)
;; The following 4 bindings are for those whose text-mode mouse
;; lack the wheel.
- (define-key map [S-down-mouse-1] 'tty-menu-next-item)
+ (define-key map [S-mouse-1] 'tty-menu-next-item)
(define-key map [S-drag-mouse-1] 'tty-menu-next-item)
- (define-key map [S-down-mouse-2] 'tty-menu-prev-item)
+ (define-key map [S-mouse-2] 'tty-menu-prev-item)
(define-key map [S-drag-mouse-2] 'tty-menu-prev-item)
- (define-key map [mode-line drag-mouse-1] 'tty-menu-select)
- (define-key map [mode-line down-mouse-1] 'tty-menu-select)
+ (define-key map [S-mouse-3] 'tty-menu-prev-item)
+ (define-key map [S-drag-mouse-3] 'tty-menu-prev-item)
(define-key map [header-line mouse-1] 'tty-menu-select)
(define-key map [header-line drag-mouse-1] 'tty-menu-select)
- (define-key map [header-line down-mouse-1] 'tty-menu-select)
- ;; The mouse events must be bound to tty-menu-ignore, otherwise
- ;; the initial mouse click will select and immediately pop down
- ;; the menu.
- (define-key map [mode-line mouse-1] 'tty-menu-ignore)
- (define-key map [mode-line mouse-2] 'tty-menu-ignore)
- (define-key map [mode-line mouse-3] 'tty-menu-ignore)
- (define-key map [mode-line C-mouse-1] 'tty-menu-ignore)
- (define-key map [mode-line C-mouse-2] 'tty-menu-ignore)
- (define-key map [mode-line C-mouse-3] 'tty-menu-ignore)
- (define-key map [mouse-1] 'tty-menu-ignore)
- (define-key map [C-mouse-1] 'tty-menu-ignore)
- (define-key map [C-mouse-2] 'tty-menu-ignore)
- (define-key map [C-mouse-3] 'tty-menu-ignore)
+ ;; The down-mouse events must be bound to tty-menu-ignore, so that
+ ;; only releasing the mouse button pops up the menu.
+ (define-key map [mode-line down-mouse-1] 'tty-menu-ignore)
+ (define-key map [mode-line down-mouse-2] 'tty-menu-ignore)
+ (define-key map [mode-line down-mouse-3] 'tty-menu-ignore)
+ (define-key map [mode-line C-down-mouse-1] 'tty-menu-ignore)
+ (define-key map [mode-line C-down-mouse-2] 'tty-menu-ignore)
+ (define-key map [mode-line C-down-mouse-3] 'tty-menu-ignore)
+ (define-key map [down-mouse-1] 'tty-menu-ignore)
+ (define-key map [C-down-mouse-1] 'tty-menu-ignore)
+ (define-key map [C-down-mouse-2] 'tty-menu-ignore)
+ (define-key map [C-down-mouse-3] 'tty-menu-ignore)
(define-key map [mouse-movement] 'tty-menu-mouse-movement)
map)
"Keymap used while processing TTY menus.")