Recent

Author Topic: How to toggle back to the editor ?  (Read 542 times)

440bx

  • Hero Member
  • *****
  • Posts: 5593
How to toggle back to the editor ?
« on: June 19, 2025, 05:25:16 am »
Hello,

The question is easier to understand by starting with an example.  This is under Windows, I don't know if the behavior is the same in other O/Ss.

Click anywhere on an editor window of a file that is being edited.  The caret will be, as expected, where the click occurred.

Press the Alt key (just the Alt key, nothing else), this should cause the first menu that is accessible using Alt to be selected.  Press the Alt key again and the menu is deselected and the editing caret/window is active again.  Repeat that and, it becomes quite evident that successive presses of the Alt key toggle back and forth from the editor window to the menu.

Now, instead of pressing just the Alt key, press simultaneously Alt and Ctrl.  this causes the mouse cursor to change and, releasing and pressing Alt-Ctrl again does NOT make the editing window back active.  Instead it seems the only way to make the window active again is to click on it.

Is there some setting in Lazarus that would cause it to be a toggle instead of having to click the edit window ?  IOW, make Alt-Ctrl be a toggle just like Alt by itself is ?

Thank you for your help.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

ASerge

  • Hero Member
  • *****
  • Posts: 2443
Re: How to toggle back to the editor ?
« Reply #1 on: June 19, 2025, 07:42:13 am »
Now, instead of pressing just the Alt key, press simultaneously Alt and Ctrl.  this causes the mouse cursor to change and, releasing and pressing Alt-Ctrl again does NOT make the editing window back active.
Nothing happens at all when pressing Alt+Ctrl. The cursor does not change, the focus does not go anywhere.

munair

  • Hero Member
  • *****
  • Posts: 884
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: How to toggle back to the editor ?
« Reply #2 on: June 19, 2025, 08:59:54 am »
Alt+Ctrl does indeed seem to do nothing, neither on Windows nor Linux. It doesn't even stop the cursor from blinking. On Windows when pressing Alt, the focus shifts from the editor window to the menu window and back when pressing Alt again. On Linux with XFWM, when the editor window has focus, pressing Alt does nothing. The menu window must be selected explicitly in order for keeping Alt pressed to underscore the menu shortcuts.

Tested on Lazarus 3.2 (no docked interface).

It's only logical.

440bx

  • Hero Member
  • *****
  • Posts: 5593
Re: How to toggle back to the editor ?
« Reply #3 on: June 19, 2025, 09:16:26 am »
I failed to mention that I have several macros that use a combination of ctrl-alt-<number>. My mistake, I should have mentioned that.

I guess that must be the reason it doesn't do anything in your installation while in mine, it changes the cursor, deactivates the editor window and then the only way to re-activate the editor window is to click on it.

HOWEVER, if a macro is run, say that there is a macro assigned to Ctrl-Alt-1 and that macro is executed then the source editor window is reactivated once the macro is run.  If no macro is run then clicking seems to be the only way to reactivate the source editor window.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11475
  • Debugger - SynEdit - and more
    • wiki
Re: How to toggle back to the editor ?
« Reply #4 on: June 19, 2025, 09:31:06 am »
If the IDE still has focus / get the keystrokes, then you can likely use the key command "Toggle view Source Editor" to which you can assign a key-combo.

 

TinyPortal © 2005-2018