after turning on xterm-mouse-mode, any click on the in the screen returns "mouse-1 is undefined". What should I be defining "mouse-1" as? Is there some reason my mouse clicks are returning this event, and not others its suspecting?
Mouse-1 is the left button, Mouse-2 is the middle button, and Mouse-3 is the right button. If you mouse only has two buttons and no scroll wheel, you can simulate the middle button by pressing the left and right buttons simultaneously.
Select Session > Edit Session to modify properties of the current session. The preference window will open, and at the bottom of the General tab is a field where you can set a hotkey that opens iTerm2 to reveal that session.
How do I open iTerm2 on Mac? To open iTerm 2, you simply need to double-click its icon – the one that you downloaded. If you go through the process of setting up hotkeys for the app, you will also be able to open iTerm2 through a specified by you keyboard combination.
The primary use of the mouse in iTerm2 is to select text, and (by default) text is copied to the clipboard immediately upon being selected. You can click and drag to perform a normal selection. Double-clicking selects a whole word. Triple-clicking selects an entire line.
For Emacs in iTerm 2, I've found that the following bit in my ~/.emacs
file works very well, providing the ability to insert the character at an arbitrary location, mark a region, and use the scroll wheel:
;; Enable mouse support (unless window-system (require 'mouse) (xterm-mouse-mode t) (global-set-key [mouse-4] (lambda () (interactive) (scroll-down 1))) (global-set-key [mouse-5] (lambda () (interactive) (scroll-up 1))) (defun track-mouse (e)) (setq mouse-sel-mode t) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With