-
Notifications
You must be signed in to change notification settings - Fork 134
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
scroll-other-window for non-emacs windows #920
Comments
Hello @tarustdev, as you see, supporting (defun medranocalvo-exwm-scroll-up-command (&optional arg)
(interactive "^P")
(cond
((eq arg '-)
(medranocalvo-exwm-scroll-down-command nil))
((< (prefix-numeric-value arg) 0)
(medranocalvo-exwm-scroll-down-command (- (prefix-numeric-value arg))))
(t
(exwm-input--fake-key (pcase exwm-class-name
("XTerm" 'S-next)
(t 'next))))))
(defun medranocalvo-exwm-scroll-down-command (&optional arg)
(interactive "^P")
(cond
((eq arg '-)
(medranocalvo-exwm-scroll-up-command nil))
((< (prefix-numeric-value arg) 0)
(medranocalvo-exwm-scroll-up-command (- (prefix-numeric-value arg))))
(t
(exwm-input--fake-key (pcase exwm-class-name
("XTerm" 'S-prior)
(t 'prior))))))
(keymap-set exwm-mode-map "<remap> <scroll-up-command>" #'medranocalvo-exwm-scroll-up-command)
(keymap-set exwm-mode-map "<remap> <scroll-down-command>" #'medranocalvo-exwm-scroll-down-command) With the code above I was able to scroll an XTerm window (after enabling "Allow SendEvents"; via XTerm's C- menu). I wonder whether this functionality should be provided by EXWM by default. For me, EXWM extends Emacs concepts to X windows, so Another issue I'm wondering about is whether we should export the internal function |
@medranocalvo thanks a lot for the explanation and implementation example! It works correctly in my case. |
You are welcome. I would appreciate input on the thoughts above (from everyone):
|
I don't know about I don't have the time to commit to helping with this, but I think it is an interesting idea. |
Thank you for your thoughts @eval-on-point. The fact that the keybinding is not standard across applications suggests that it might indeed belong in such a collaborative configuration project and not in EXWM itself. I find the |
Hello!
Is it possible to scroll non-emacs window (Chromium browser for example) when emacs window is active?
With 2 emacs windows opened I can scroll other (non-active) window with commands
scroll-other-window
andscroll-other-window-down
.I added next code to
exwm-input-global-keys
and now I can scroll non-active emacs window when non-emacs window is active (for example scroll non-active text buffer when Chromium is active).Also I added next code to
exwm-input-simulation-keys
and now i can scroll non-emacs window when it is active.But this setup doesn't work for scrolling non-active non-emacs windows (Always getting "Beginning of buffer" or "End of buffer" even if this window scrolling correctly when it is active). Am I doing something wrong or are there any limitations for desired behavior?
Thanks!
The text was updated successfully, but these errors were encountered: