-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use mouse wheel in terminal ? #4591
Comments
I've faced this issue (or misconfiguration) as well. I am using vim mode and emacs in terminal inside tmux. |
I just tested |
Hi @StreakyCobra, thanks for the quick reply. I've just opened the default terminal on Mac (before I was using iTerm2) and I got the same result. No tmux or iTerm2 involved in this test. I have the latest spacemacs and I am using emacs This is my conf file in case it helps, pretty standard:
|
Ok, so I don't really know, maybe it's my terminal that is smarter to deal with the mouse 😄 Joke aside, I probably can't help you more as I'm not on OS X, sorry. What I could suggest you is to try with a raw emacs (without spacemacs at all) and see how it behaves. If it works, then it means we have a bug in spacemacs. If it dosen't, it means that there is a problem or configuration to do somewhere between your emacs/terminal/system :-) |
Removing Do you think that it's a problem with the underlying emacs? |
I tried the same and it does not work here either. So it means Spacemacs is doing some configurations to make it work, and that these configurations are working on some setups but not for all. You probably will have to find how to make it work by yourself (except if you are lucky and someone here has a solution). If you find a way to make it works let us know, we probably can make it part of Spacemacs for other users :-) |
Hi, I got it working with this:
Perhaps it's not the best way, but I don't know how the default scroll looks like either. |
@agonzalezro thank you code. I use it, it works, but it perform badly(delay and not smooth). But if I use it whit emacs barely(not use spacemacs config),it perfrom well,just like vim or tmux. |
Jsut disable (xterm-mouse-mode -1) |
@tuhdo |
@mushanshitiancai I can scroll up, but not scroll down. Maybe if you use terminal, better use PgUp/PgDown since you can't use the scroll bar to jump to a specific point anyway. |
@mushanshitiancai yes,it's not smooth at all this is why I said that it's not the best way. I am pretty sure that there is a simple solution in front of our eyes but I have no idea what it can be yet. In the meantime I am scrolling with keys, but it's always nice to have proper mouse scrolling. |
Thanks much! I got it working in OS X with iTerm2 with this ;; Enable mouse support
(unless window-system
(global-set-key (kbd "<mouse-4>") 'scroll-down-line)
(global-set-key (kbd "<mouse-5>") 'scroll-up-line)) |
I am closing this issue since solution is proposed. Thanks all. |
some changes between emacs 24.3 and emacs24.4 about mouse-4/5 event ? |
Can we please reopen this issue: I think this should be shipped per default, right? |
disabling |
Well, neither of these are perfect solutions as disabling Has anyone improved on these two solutions? |
In my .spacemacs -> dotspacemacs/user-config function. Not sure if that's where it belongs but it works for me. |
I have found the root cause of this issue, and found one almost perfect solution to it.
So change the values of "mouse-wheel-up-event" and "mouse-wheel-down-event" directly like below can't make emacs GUI and terminal clients work well at the same time when they connect to the same emacs daemon.
So finally I come to below method, i.e., just map the key "mouse-4" and "mouse-5" to "wheel-up" and "wheel-down" on Mac OSX, note that on Linux and Windows nothing need to do. If you want you can add below code in your "dotspacemacs/user-config" and try it, I hope you can enjoy it, thanks.
|
The solutions offered here do indeed work but I've found that |
iterm2 3.4.19 and emacs 28.2:
|
I use spacemacs in terminal. And when I use mouse wheel, it show:
How to config?Thank.
The text was updated successfully, but these errors were encountered: