Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

ALT-TAB Action in Windowed Viewer

TXS - Help
NKW
2013-10-14
2013-10-20
  • NKW
    NKW
    2013-10-14

    After hitting F1, I try to toggle back from the viewer to the editor using ALT-TAB, but I end up having to cycle through all open windows before getting back to the editor. Is there no way of toggling back directly with just one ALT-TAB?

     
  • Tim Hoffmann
    Tim Hoffmann
    2013-10-14

    Alt+Tab is the OS shortcut for cycling all open windows.

    For the embedded viewer you can use Ctrl+Alt+Left/Right (View -> Focus Editor/Viewer to switch between Editor and viewer. From the windowed viewer there is currently only Go to Source (Ctrl+') which also moves the cursor in the editor to the position currently displayed in the viewer.

     
  • NKW
    NKW
    2013-10-15

    Thank you for the response. I really think you should consider this in future editions. I think people who are used to alt-tab find it very distracting that they don't go back to the editor directly. This is more pertinent in this case because of the frequent back and forth needed between the editor and viewer. I know I could use the embedded viewer but some, like me, find it too small.

    Thanks for all the good work.

     
  • Denis Bitouzé
    Denis Bitouzé
    2013-10-15

    I agree with NKW.

     
  • Tim Hoffmann
    Tim Hoffmann
    2013-10-15

    I'm not sure I understand your suggestion. Alt+Tab is an OS shortcut on many operating systems (including Windows and Ubuntu). It's not even propagated to the application. So the Alt+Tab behavior is totally defined by your OS, we cannot do anything about this. Moreover, the OS usually uses a stack of recently used windows, so if you open the viewer from TXS and hit Alt+Tab the OS should bring you back to the most recently used window, which is the TXS editor in this case (tested on Windows and Ubuntu).

     
    • NKW
      NKW
      2013-10-16

      "...so if you open the viewer from TXS and hit Alt+Tab the OS should bring you back to the most recently used window, which is the TXS editor in this case (tested on Windows and Ubuntu)."

      I use WinXP and when I hit Alt-Tab, it does not go back to the editor directly even when the editor was the most recently used window (specifically, after building with F1). That's the issue I've been trying to describe. But you say you tested it on Windows. Could it be an issue of the version of Windows?

       
  • Tim Hoffmann
    Tim Hoffmann
    2013-10-16

    Tested also on XP: works for me. The way it should work is described here:

    http://blogs.msdn.com/b/oldnewthing/archive/2003/10/20/55367.aspx

    Maybe you have some 'always on top' windows from other applications? Does it work as described in the link for other windows?

     
    • NKW
      NKW
      2013-10-16

      I think I figured it out! (and it's weird)

      I was trying to replicate the incident with a test file and record it off my PC, but Alt-Tab was now working correctly. After some tinkering, I realised that the Alt-Tab issue happens only when there are spaces in the file name. I don't know if this is interesting information to you guys. In any case, lesson learned on my part.

       
      Last edit: NKW 2013-10-16
  • Tim Hoffmann
    Tim Hoffmann
    2013-10-17

    Here it works also with spaces in the file name. (And I would be really surprised if that influenced window tabbing)

     
  • NKW
    NKW
    2013-10-17

    I am absolutely sure that that is the problem. I'm trying it right now with two identical files in the same folder, one with a space in the file name and one without. It does not happen at all with the file without spaces in the file name while it does with the other one. To be very specific, here's what happens with the file with spaces: I open the file afresh (with TexStudio closed), I hit F1, then Alt-Tab, and it goes back to the editor, but only that first time. I hit F1 again, then Alt-Tab, and not it doesn't go back to the editor. The issue persists on all subsequent build-and-views.

     
    Last edit: NKW 2013-10-17
  • Tim Hoffmann
    Tim Hoffmann
    2013-10-19

    Strange indeed. Following your description, I can reproduce it now but only on XP not on Win7. It appears that the window is brought up, but focus stays on the editor. Anyway, it's currently not recommended to use tex filenames containing spaces since synctex has some problems with that (Does syncing between editor and viewer work for you (Editor: Context menu: Go to PDF, Viewer: Ctrl+LeftClick)?

    Moreover, I've added Window -> Focus Editor (Ctrl+Alt+Left) to the Viewer. So from the next relase on, swichting focus works consistenly with Ctrl+Alt+Left/Right no matter if you use the embedded or windowed viewer.

     
    • NKW
      NKW
      2013-10-20

      Yep, Ctrl+LeftClick does work.

      I'd much rather keep using Alt-Tab and I'm more than happy to keep my filenames spaceless. Thanks for your help.