What is the correct (easiest) way to toggle the text screen?

On Windows you can use the F2 key to toggle to text screen. On Linux the F2 key can only be used to switch the text screen on. And you have to (?) then use the [x] button to close the screen. Is there a way to toggle the text screen on Linux?
Ubuntu 12.04
BricsCAD 13.1.19

Comments

  •  I know this doesn't answer the question, but if you click the mouse in the graphics window, it will send the text window to the back. Then you can F2 to being it to the front again, when you want it. F2, open the text window or bring it to the front. Mouse-click, bring the graphics window to the front. No need to actually close (X) the text window. - At least that's how it works for me.
  • Thanks, I'll give it a try. I guess it is a matter of habit more than anything else.
  •  The two commands that you are looking for should be TEXTSCR and GRAPHSCR, TEXTSCR shows the history window and GRAPHSCR will close it and bring you back to BricsCAD.

    I noticed the same thing in the Linux release, so I came up with this, type KK to dismiss the prompt history window and return to BricsCAD...

    [code](defun c:kk ()
      (command ".graphscr")
      (princ)
    )[/code]

  • @ Scott:
    It's not a bad idea, although I would prefer F2 toggle functionality (2 less key strokes).
    But why not use the appropriate Lisp functions: (textscr) and (graphscr)?

    One problem that I have noticed only today is that the text screen does not 'remember' that it was full screen in the previous session. So for the past few days I was wondering why the command input field was missing from the text screen on Linux...
    SR has been sent.

  • Roy,

    Perhaps raise a support request. You would expect F2 would operate the same in both environments, at least it should switch window focus.

    The following code toggles between screens.

    [code](defun C:ToggleScreeens ()
    (setq *ScreenState* (if (= (car *ScreenState*) 'TEXTSCR) '(graphscr) '(textscr)))
    (eval *ScreenState*)
    )[/code]

    You could create a partial .cui, placing the code above in an accompanying .mnl. In the partial .cui you can assign F2 to use this function, which will override the default. Seems a lot of work though, hence suggestion on support request.

    In windows I've used AutoHotKey to assign keyboard macros for BricsCAD. Provides key press options that the CUI doesn't. In Linux looks like Autokey provides similar functionality

    Regards,

    Jason Bourhill

    CAD Concepts

  • @Roy
    Thanks for raising this here - I use Bricscad mainly on a small netbook, and therefore keep the commandline closed, so I'm relying heavily on switching between text and graphics mode. I could not get it to work satisfactory, though, and have already filed an SR last November.
    The problem has several aspects:
    - BricsCAD doesn't report properly the screenstate in the respective vars (SCREENMODE and WNDLTEXT), so toggling via lisp doesn't really work.
    - the functions keys / keyboard shortcuts do not work in the text window.
    - (graphscr) closes the text window instead of sending it to the back.

    I bet the main problem is that bricscad doesn't know which window is in the foreground, since this is also controlled by the window manager. The solution I proposed in the discussion following the SR is as follows:

    - make screenmode read/write
    - if screenmode is 0 or 1, don't create a text window, but just a text buffer that you display instead of the GUI in the main window, when the user presses F2, and vice versa (of course, this would need to be transparent). This way, there would be no interference with system window handling, and bricscad would always know what the user sees.
    - if screenmode has the second bit set, create a text window (so that the few still using two monitors can move it to another screen) and ignore any calls to textscr or graphscr, just leaving everything to the window manager.

    Did not get feedback on this one, what do you think?

    @Jason
    Saving the screen state on your own looks like a clever workaround for me  - that you would often have to invoke the function twice is certainly not perfect, but if I could bind it to F2, it would be good enough for me...
  • - the functions keys / keyboard shortcuts do not work in the text window.

    I found that out yesterday too...

    About your suggestion:
    The fact that Bricsys is sticking to a solution similar to the Windows implementation seems reasonable. But obviously these issues should be fixed.

    After some playing around I find that superkey+alt will switch from textscr to graphscr. But the superkey should not be held down too long.
  • ... As for the text screen not staying maximized from session to session:
    There is a nice tool called 'Devil's Pie' that can be used to manipulate windows on Linux.
    Link: http://ubuntu-tutorials.com/2007/07/25/how-to-set-default-workspace-size-and-window-effects-in-gnome/

    Just follow the instructions (including the paragraph on persistence) and create a .ds that looks like this:
    [code]; Change the window name to suite your translation.
    (if (matches (window_name) "BricsCAD Prompt History")
      (maximize)
    )[/code]
    You may have to restart Linux for the changes to take effect.
  • Hello Roy,
    seems to be a handy little tool, very useful for people that are using 'lean' window managers. I'm sticking to a configurable window manager (lxde/openbox) though, so I can just put
    <application title="BricsCAD Prompt History">
       <maximized>true</maximized>
    </application>
    into its configuration file.
    As to my suggestion: it wasn't meant to be linux only, I think this would make sense on windows, too - having a text window and a nearly identical looking pseudo-window (floating command bar) is kind of confusing in my view...
  • @ Knut:
    I can't say that having the text screen as a separate window has ever bothered me. But if your suggestion helps to solve some of the windows management issues on Linux I would not be against it.
This discussion has been closed.