I'm using split windows (LyX calls the shortcut view-split
), but to switch which one I'm typing in, I have to click it. Is there a way to do switch active windows by using a keyboard shortcut? I've checked Tools
> Preferences…
> Editing
> Shortcuts
, but can't find anything obvious.
1 Answer
This is not currently possible in LyX. I suggest you create an enhancement request at https://www.lyx.org/trac (I don't think I've seen it requested before).
If you have an idea for the LFUN name, feel free to mention it. For example, perhaps view-forward
and view-backward
.
Workaround:
If you happen to be on Linux, you can cook up some black magic with xdotool
. Just make an OS shortcut to simulate a click on the left-hand side of your screen, and a separate one to simulate a click on the right-hand side of the screen. For me (1368 x 768 resolution), the following works for switching to the left view:
mousemove 200 200 click 1
and to switch to the right:
mousemove 800 200 click 1
If you want your cursor position to be remembered in each view, we can increase the black magic by using xdotool combined with LyX's bookmarks. I didn't test, but I think it would work well.
-
-
@Sparhawk did you try using LyX's bookmarks? The idea is, if you are in the left pane, your shortcut would first save to bookmark position 1, then switch panes (using xdotool), then recall bookmark position 2. And for the other shortcut (when you are in the right pane and want to move to the left), you first save to bookmark position 2, switch panes (using xdotool), then recall bookmark position 1. Commented Mar 16, 2017 at 1:12
-
Yes, that worked perfectly for me. I was thinking more of coding the whole sequence into
xdotool
, but I should probably just use the mouse for now and do some work instead. :p I'll accept your answer for now, unless something more complete comes along. Thanks!– SparhawkCommented Mar 16, 2017 at 1:20 -
1@Sparhawk hopefully the feature request is addressed so in the future no workaround is needed. Commented Mar 16, 2017 at 1:33
-
For Mac users, [BetterTouchTool] (boastr.net) is useful to move between split windows. I use, for example,
Key Sequence
(e.g. @LL for the lower half) withMove Mouse to Position
+Left Click
to move from the upper half of the window to the lower half.– T_TCommented May 25, 2017 at 4:09